aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRat <gmstreetrat@gmail.com>2011-11-26 20:38:00 +0100
committerRat <gmstreetrat@gmail.com>2011-11-26 20:38:00 +0100
commit8cf3fde3291e8fdadef564232c2981d670a1e274 (patch)
tree1c8eedd425cd663ed0869d3598a30e21d7eda4b1 /src
parente97527c24e92b7c8a521cb01f4c655776a10cdcb (diff)
Core/CharacterHandler: fixed guid reading in PlayerLoginOpcode handler
thanks to Nay && Shauren
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CharacterHandler.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index 342b8ef119f..20ccf552f50 100755
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -842,7 +842,22 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data)
sLog->outStaticDebug("WORLD: Recvd Player Logon Message");
- recv_data >> playerGuid;
+ BitStream* mask = recv_data.ReadBitStream(8);
+
+ ByteBuffer* bytes = new ByteBuffer(8, true);
+
+ if ((*mask)[6]) (*bytes)[5] = recv_data.ReadUInt8() ^ 1;
+ if ((*mask)[0]) (*bytes)[0] = recv_data.ReadUInt8() ^ 1;
+ if ((*mask)[4]) (*bytes)[3] = recv_data.ReadUInt8() ^ 1;
+ if ((*mask)[1]) (*bytes)[4] = recv_data.ReadUInt8() ^ 1;
+ if ((*mask)[2]) (*bytes)[7] = recv_data.ReadUInt8() ^ 1;
+ if ((*mask)[5]) (*bytes)[2] = recv_data.ReadUInt8() ^ 1;
+ if ((*mask)[7]) (*bytes)[6] = recv_data.ReadUInt8() ^ 1;
+ if ((*mask)[3]) (*bytes)[1] = recv_data.ReadUInt8() ^ 1;
+
+ playerGuid = BitConverter::ToUInt64((*bytes));
+
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "Character (Guid: %u) logging in", playerGuid);
if (!CharCanLogin(GUID_LOPART(playerGuid)))
{