CMSG_INSPECT 5.4.7 (18019)

This commit is contained in:
zamalaev 2020-02-19 13:32:16 +00:00 committed by Antz
parent 4443111890
commit 63f8364827
2 changed files with 23 additions and 3 deletions

View file

@ -342,7 +342,7 @@ enum Opcodes
CMSG_DESTROYITEM = 0x4A27, // 4.3.4 15595
SMSG_INVENTORY_CHANGE_FAILURE = 0x2236, // 4.3.4 15595
SMSG_OPEN_CONTAINER = 0x4714, // 4.3.4 15595
CMSG_INSPECT = 0x0927, // 4.3.4 15595
CMSG_INSPECT = 0x01D4, // 5.4.7 18019
SMSG_INSPECT_RESULTS_UPDATE = 0x0B98, // 5.3.0 17128
CMSG_INITIATE_TRADE = 0x7916, // 4.3.4 15595
CMSG_BEGIN_TRADE = 0x721E, // 4.3.4 15595

View file

@ -1161,12 +1161,32 @@ void WorldSession::HandlePlayedTime(WorldPacket& recv_data)
SendPacket(&data);
}
void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
void WorldSession::HandleInspectOpcode(WorldPacket& recvData)
{
ObjectGuid guid;
recv_data >> guid;
guid[5] = recvData.ReadBit();
guid[0] = recvData.ReadBit();
guid[7] = recvData.ReadBit();
guid[4] = recvData.ReadBit();
guid[6] = recvData.ReadBit();
guid[2] = recvData.ReadBit();
guid[1] = recvData.ReadBit();
guid[3] = recvData.ReadBit();
recvData.ReadByteSeq(guid[5]);
recvData.ReadByteSeq(guid[6]);
recvData.ReadByteSeq(guid[3]);
recvData.ReadByteSeq(guid[4]);
recvData.ReadByteSeq(guid[0]);
recvData.ReadByteSeq(guid[1]);
recvData.ReadByteSeq(guid[7]);
recvData.ReadByteSeq(guid[2]);
DEBUG_LOG("Inspected guid is %s", guid.GetString().c_str());
_player->SetSelectionGuid(guid);
Player* plr = sObjectMgr.GetPlayer(guid);
if (!plr) // wrong player
{