Packet 2051 Broadcast List Version 5017

05/14/2014 11:15 Korvacs#1
Does anyone have the packet structure for this, a complete one? I've asked around a couple of people and all I can come up with is some notes in Bone's C++ source.

The closest I've got is from Haydz which is as follows:

Code:
0 - size
2 - type
4 - page number
8 - message number (not too sure on this)
10 - page count
loop-> 12  = broadcast id (unique identifier, not sure here, why is bone-you so bad)
loop-> 16  = broadcast number (this seems to be (pageNumber * 10) + Number in page)
loop-> 20  = Broadcaster Id (clients unique identifier)
loop-> 24  = Broadcaster name (16 characters)
loop-> 40  = CPs spent
loop-> 44  = Message
So I'm looking for something concrete if possible. The structure from Haydz looks pretty good though it is just what he determined from Bone's source, so a confirmation of that would be good.

On a related note, this is the last packet I need for 5017 on the wiki I believe, please check to see if you have any other packets which are not listed:

[Only registered and activated users can see links. Click Here To Register...]
05/14/2014 15:37 Korvacs#2
Quote:
Originally Posted by Y u k i View Post
cops6 got a full implementation afaik.
It doesn't, but thanks.
05/14/2014 17:26 -impulse-#3
Quote:
Originally Posted by Korvacs View Post
It doesn't, but thanks.
When I implemented broadcast on Trinity I used bone's C++ code... and afaik it wasn't ever changed.
05/15/2014 11:55 Korvacs#4
Anyone else have any input? Failing that I'll just run with this I think and then proceed onto 5065. If anyone has a decent resource for 5065 please let me know.
05/15/2014 17:02 Mr_PoP#5
here is how I implemented it :-
Code:
public struct BroadcastStr
    {
        public uint HeroId;
        public string HeroName;
        public uint SpentCPs;
        public string Message;
    }

public BroadCastMsgPacket(uint page, IEnumerable<BroadcastStr> msgs) :
            base(PacketType.BroadCastMsg, (ushort)(12 + msgs.Count() > 8 ? 8 * 112 : msgs.Count() * 112))
        {
            int offset = 12;
            int index = (int)page * 8;
            int count = msgs.Count() - index > 8 ? 8 : msgs.Count() - index;
            WriteUInt32(4, page);
            WriteUInt32(10, (uint)count);
            for (int i = index; i < count; i++)
            {
                BroadcastStr temp = msgs.ElementAtOrDefault(i);
                WriteUInt32(offset, (uint)i); offset += 4;
                WriteUInt32(offset, (uint)i); offset += 4;
                WriteUInt32(offset, temp.HeroId); offset += 4;
                WriteString(offset, temp.HeroName, 16); offset += 16;
                WriteUInt32(offset, temp.SpentCPs); offset += 4;
                WriteString(offset, temp.Message, temp.Message.Length); offset += 80;
            }
        }
05/15/2014 17:29 Korvacs#6
Thank you for the confirmation.
05/15/2014 20:30 Aceking#7
Redux should have 90+% of the packets for 5065.
I think the spawn packet may have had one or two offsets that were off, but I can post that whenever you get to that point.
05/15/2014 20:34 Korvacs#8
Quote:
Originally Posted by Aceking View Post
Redux should have 90+% of the packets for 5065.
I think the spawn packet may have had one or two offsets that were off, but I can post that whenever you get to that point.
Redux has 13 out of a minimum of 48 packets required to do a complete server. So I could do with something abit better than that to be honest.

Edit: Oh its been updated, I'll take another look.

Edit2: Much more like it! Pro <3
05/15/2014 20:39 Aceking#9
Quote:
Originally Posted by Korvacs View Post
Redux has 13 out of a minimum of 48 packets required to do a complete server. So I could do with something abit better than that to be honest.
Do you have the latest version and not the first?
Because I know it has alot more than 13. I think the first even did.

The only packets missing were mentor, the broadcast list packet in this thread, flowers and a couple others that I cannot think of off the top of my head.
05/16/2014 01:57 CptSky#10
Quote:
Originally Posted by Aceking View Post
Redux should have 90+% of the packets for 5065.
I think the spawn packet may have had one or two offsets that were off, but I can post that whenever you get to that point.
Last time I checked, it wasn't "quality" structures.

@Korvacs, COPS v7 have somes (MsgItem is not up-to-date in current release), but you can always PM me if you need mores that aren't implemented yet.
05/16/2014 02:08 Aceking#11
Quote:
Originally Posted by CptSky View Post
Last time I checked, it wasn't "quality" structures.

@Korvacs, COPS v7 have somes (MsgItem is not up-to-date in current release), but you can always PM me if you need mores that aren't implemented yet.
Quality as in accurate?
As I said, the only packet I know of that isn't 100% accurate in the public release is the spawn packet. Which I would gladly post the accurate offsets.