Skip to content

Commit

Permalink
Core/Protocol: Fixed SMSG_NAME_QUERY_RESPONSE for offline players (fi…
Browse files Browse the repository at this point in the history
…xes friend lists)
  • Loading branch information
Shauren committed Apr 2, 2012
1 parent f03af56 commit 3831e76
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/server/game/Handlers/QueryHandler.cpp
Expand Up @@ -38,15 +38,9 @@ void WorldSession::SendNameQueryOpcode(uint64 guid)

WorldPacket data(SMSG_NAME_QUERY_RESPONSE, (8+1+1+1+1+1+10));
data.appendPackGUID(guid);
if (!player)
{
data << uint8(1); // player unknown
SendPacket(&data);
return;
}
if (!nameData)
{
data << uint8(2); // name unknown
data << uint8(1); // name unknown
SendPacket(&data);
return;
}
Expand All @@ -58,7 +52,7 @@ void WorldSession::SendNameQueryOpcode(uint64 guid)
data << uint8(nameData->m_gender);
data << uint8(nameData->m_class);

if (DeclinedName const* names = player->GetDeclinedNames())
if (DeclinedName const* names = (player ? player->GetDeclinedNames() : NULL))
{
data << uint8(1); // Name is declined
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
Expand Down

0 comments on commit 3831e76

Please sign in to comment.