mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/CharacterHandler: fixed guid reading in PlayerLoginOpcode handler
thanks to Nay && Shauren
This commit is contained in:
@@ -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)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user