mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 19:31:59 +01:00
Core/PacketIO: Cleaned up manual shifting for account name length reads in CMSG_AUTH_SESSION
This commit is contained in:
@@ -870,11 +870,9 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
addonsData.resize(addonSize);
|
||||
recvPacket.read((uint8*)addonsData.contents(), addonSize);
|
||||
|
||||
uint8 highBitsAccountLen;
|
||||
uint8 lowBitsAccountLen;
|
||||
recvPacket >> highBitsAccountLen;
|
||||
recvPacket >> lowBitsAccountLen;
|
||||
account = recvPacket.ReadString(((highBitsAccountLen << 5) & 0xFF) | (lowBitsAccountLen >> 3));
|
||||
recvPacket.ReadBit();
|
||||
uint32 accountNameLength = recvPacket.ReadBits(12);
|
||||
account = recvPacket.ReadString(accountNameLength);
|
||||
|
||||
if (sWorld->IsClosed())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user