Jump to content

LFD grouptype and SMSG_GROUP_LIST structure


Guest Wojta

Recommended Posts

What bug does the patch fix? What features does the patch add?

Add one GroupType and add comment to SMSG_GROUP_LIST for LFD

For which repository revision was the patch created?

10554

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

No

Who has been writing this patch? Please include either forum user names or email addresses.

Me

I am working on Dungeon Finder system for my server, but because I am not programmer, my code is just too dirty and i would not make it into master branch anyway, so I just post some things which I have noticed and can help someone who is working on it.

1. Add 0x04 to GroupType enum, it is another lfd type, this one cause client to show vote to kick instead of uninvite and to show "Dungeon Guide" instead of "Party leader".

WorldPacket data(SMSG_GROUP_LIST, (1+1+1+1+8+4+GetMembersCount()*20));
data << uint8(m_groupType);                         // group type (flags in 3.3)
data << uint8(citr->group);                         // groupid
data << uint8(GetFlags(*citr));                     // group flags
[b][color="#ff0000"]data << uint8(isBGGroup() ? 1 : 0);                      <--- (2)[/color] [/b]
if(m_groupType & GROUPTYPE_LFD)
{
   [b][color="#ff0000"]data << uint8(0);                                   <--- (3)
   data << uint32(0);[/color][/b]
}
data << uint64(0x50000000FFFFFFFELL);               // related to voice chat?
data << uint32(0);                                  // 3.3, this value increments every time SMSG_GROUP_LIST is sent
data << uint32(GetMembersCount()-1);
for(member_citerator citr2 = m_memberSlots.begin(); citr2 != m_memberSlots.end(); ++citr2)
{
   if(citr->guid == citr2->guid)
       continue;
   Player* member = sObjectMgr.GetPlayer(citr2->guid);
   uint8 onlineState = (member) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
   onlineState = onlineState | ((isBGGroup()) ? MEMBER_STATUS_PVP : 0);

   data << citr2->name;
   data << citr2->guid;
   data << uint8(onlineState);                     // online-state
   data << uint8(citr2->group);                    // groupid
   data << uint8(GetFlags(*citr2));                // group flags
[b][color="#ff0000"]    data << uint8(0);                               // 3.3, role? <--- (*)[/color][/b]
}

2. As far as i can tell, this is correct, but it is also player role if in dungeon group. Other players have their role set at *(look to highlight in above code), but current one have it here. Most packet parsers expect bool in here, but I tried int and then saw something like "IsBgGroup: 8". Funny actually :)

3. Most people know what are these fields, but it is in the same packet so I added them. uint8 is instance status (0 = not saved, 1 = saved, 2 = complete) and uint32 is entry of dungeon.

http://gist.github.com/601665

Link to comment
Share on other sites

(2) only seen 1 and 0 in packets, but will check again.

(3) correct - status and dungeonId (from LFGDungeons.dbc)

(*) correct - player role

With check group flag GROUPTYPE_RANDOM = 0x04. In my Dungeon Finder implementation only used 0x08.

"Kick" and "Dungeon guide" is show with 0x08, will also check with 0x04, but i can confirm 0x08 is working as my implementation of Dungeon Finder works.

Link to comment
Share on other sites

as you said, 0x04 only appears with 0x08. But sometimes only 0x08 appears. Will do some tests about joining random or selecting dungeon, alone or as a group.

about (2), again you are right, is player role. As SMSG_GROUP_LIST only list other people stats, that's your own role (values 0, 2, 3, 4, 5, 8 and 9) pushing a patch and giving you credits :)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use