aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-04-02 18:37:25 +0200
committerShauren <shauren.trinity@gmail.com>2012-04-02 18:37:25 +0200
commit3831e76b9ad3964a02df8f9086aa574859f06cdd (patch)
treec4538e27933159be0bd797b9a5e6b835e32856f4
parentf03af56d5daa225d0e42ce9c1a8d5309d91ff190 (diff)
Core/Protocol: Fixed SMSG_NAME_QUERY_RESPONSE for offline players (fixes friend lists)
-rwxr-xr-xsrc/server/game/Handlers/QueryHandler.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 5061331b8de..628cdbbdd5e 100755
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -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;
}
@@ -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)