Guilds: the invite message carries the inviter's surname

Live 70938 (sniff 4, 2026-11-15) sends the inviter's surname with a
9 bit length after the name, like the other guild messages: bits name
(6), surname (9), guild (7), old guild (7), and the surname text right
after the name text. Our 6/7/7 layout put the guild name length off by
9 bits, so the invite popup could show a wrong guild name.
This commit is contained in:
Karrz1
2026-11-16 12:56:23 +00:00
parent 0191ae1aa7
commit cc7a45b6f1
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -1765,6 +1765,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string_view name)
invite.AchievementPoints = GetAchievementMgr().GetAchievementPoints();
invite.InviterName = player->GetName();
invite.InviterSurname = sCharacterCache->GetCharacterSurnameByGuid(player->GetGUID());
invite.GuildName = GetName();
if (Guild* oldGuild = pInvitee->GetGuild())
@@ -185,7 +185,10 @@ void GuildInviteByName::Read()
WorldPacket const* GuildInvite::Write()
{
// Classic 1.60 (live 70938 sniff 4, 2026-11-15): the inviter's surname (9 bit length) follows the name, like the other guild
// messages; bits name (6), surname (9), guild (7), old guild (7), and the surname text right after the name text
_worldPacket << SizedString::BitsSize<6>(InviterName);
_worldPacket << SizedString::BitsSize<9>(InviterSurname);
_worldPacket << SizedString::BitsSize<7>(GuildName);
_worldPacket << SizedString::BitsSize<7>(OldGuildName);
_worldPacket.FlushBits();
@@ -203,6 +206,7 @@ WorldPacket const* GuildInvite::Write()
_worldPacket << int32(AchievementPoints);
_worldPacket << SizedString::Data(InviterName);
_worldPacket << SizedString::Data(InviterSurname);
_worldPacket << SizedString::Data(GuildName);
_worldPacket << SizedString::Data(OldGuildName);
@@ -219,6 +219,7 @@ namespace WorldPackets
uint32 OldGuildVirtualRealmAddress = 0;
uint32 InviterVirtualRealmAddress = 0;
std::string InviterName;
std::string InviterSurname;
std::string GuildName;
std::string OldGuildName;
};