diff --git a/src/game/Server/Opcodes.h b/src/game/Server/Opcodes.h index 0ed30eda9..8821b6266 100644 --- a/src/game/Server/Opcodes.h +++ b/src/game/Server/Opcodes.h @@ -102,7 +102,7 @@ enum Opcodes CMSG_AUTH_SRP6_RECODE = 0x1036, CMSG_CHAR_CREATE = 0x08CD, // 5.4.1 17538 CMSG_CHAR_ENUM = 0x0848, // 5.4.1 17538 - CMSG_CHAR_DELETE = 0x09C0, // 5.4.1 17538 + CMSG_CHAR_DELETE = 0x113B, // 5.4.7 18019 SMSG_AUTH_SRP6_RESPONSE = 0x103A, SMSG_CHAR_CREATE = 0x2D05, // 4.3.4 15595 SMSG_CHAR_ENUM = 0x10B0, // 4.3.4 15595 diff --git a/src/game/WorldHandlers/CharacterHandler.cpp b/src/game/WorldHandlers/CharacterHandler.cpp index 5b6d6459f..0c3beee0c 100644 --- a/src/game/WorldHandlers/CharacterHandler.cpp +++ b/src/game/WorldHandlers/CharacterHandler.cpp @@ -565,10 +565,27 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recv_data) delete pNewChar; // created only to call SaveToDB() } -void WorldSession::HandleCharDeleteOpcode(WorldPacket& recv_data) +void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData) { ObjectGuid guid; - recv_data >> guid; + + guid[6] = recvData.ReadBit(); + guid[4] = recvData.ReadBit(); + guid[5] = recvData.ReadBit(); + guid[1] = recvData.ReadBit(); + guid[7] = recvData.ReadBit(); + guid[3] = recvData.ReadBit(); + guid[2] = recvData.ReadBit(); + guid[0] = recvData.ReadBit(); + + recvData.ReadByteSeq(guid[1]); + recvData.ReadByteSeq(guid[2]); + recvData.ReadByteSeq(guid[3]); + recvData.ReadByteSeq(guid[4]); + recvData.ReadByteSeq(guid[0]); + recvData.ReadByteSeq(guid[7]); + recvData.ReadByteSeq(guid[6]); + recvData.ReadByteSeq(guid[5]); // can't delete loaded character if (sObjectMgr.GetPlayer(guid))