diff options
| author | kaelima <kaelima@live.se> | 2012-09-01 05:03:15 +0200 |
|---|---|---|
| committer | kaelima <kaelima@live.se> | 2012-09-01 05:03:15 +0200 |
| commit | c0602889b57b3a6ab07a7d8ba9b4b91a560f086e (patch) | |
| tree | 7ef8aa9c8282f332ccba87414dfdaf16523865bb /src/server/game/Handlers/MiscHandler.cpp | |
| parent | 8bfdfd18cd97fc80846809eae80e81e1315d329e (diff) | |
Core/PacketIO:
- Rename and fix: CMSG_INSPECT_HONOR_STATS and SMSG_INSPECT_HONOR_STATS.
- Replaced SMSG_TRAINER_BUY_SUCCEEDED with new SMSG_TRAINER_SERVICE.
- Fix sending SMSG_PLAY_SPELL_VISUAL_KIT and removed obsolate SMSG_PLAY_SPELL_IMPACT.
Thanks to mangos
Diffstat (limited to 'src/server/game/Handlers/MiscHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/MiscHandler.cpp | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 76aae192c41..18ec0067623 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -1253,29 +1253,61 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recvData) data << uint64(guild->GetGUID()); data << uint32(guild->GetLevel()); data << uint64(0/*guild->GetXP()*/); - data << uint32(0/*guild->GetMembersCount()*/); // number of members + data << uint32(guild->GetMembersCount()); } SendPacket(&data); } void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recvData) { - uint64 guid; - recvData >> guid; + ObjectGuid guid; + guid[1] = recvData.ReadBit(); + guid[5] = recvData.ReadBit(); + guid[7] = recvData.ReadBit(); + guid[3] = recvData.ReadBit(); + guid[2] = recvData.ReadBit(); + guid[4] = recvData.ReadBit(); + guid[0] = recvData.ReadBit(); + guid[6] = recvData.ReadBit(); + recvData.ReadByteSeq(guid[4]); + recvData.ReadByteSeq(guid[7]); + recvData.ReadByteSeq(guid[0]); + recvData.ReadByteSeq(guid[5]); + recvData.ReadByteSeq(guid[1]); + recvData.ReadByteSeq(guid[6]); + recvData.ReadByteSeq(guid[2]); + recvData.ReadByteSeq(guid[3]); Player* player = ObjectAccessor::FindPlayer(guid); if (!player) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, guid); return; } - WorldPacket data(SMSG_INSPECT_HONOR_STATS, 4+1+4+8); - data << uint32(player->GetUInt32Value(PLAYER_FIELD_KILLS)); - data << uint8(0); // rank + ObjectGuid playerGuid = player->GetGUID(); + WorldPacket data(SMSG_INSPECT_HONOR_STATS, 8+1+4+4); + data.WriteBit(playerGuid[4]); + data.WriteBit(playerGuid[3]); + data.WriteBit(playerGuid[6]); + data.WriteBit(playerGuid[2]); + data.WriteBit(playerGuid[5]); + data.WriteBit(playerGuid[0]); + data.WriteBit(playerGuid[7]); + data.WriteBit(playerGuid[1]); + data << uint8(0); // rank + data << uint16(player->GetUInt16Value(PLAYER_FIELD_KILLS, 1)); // yesterday kills + data << uint16(player->GetUInt16Value(PLAYER_FIELD_KILLS, 0)); // today kills + data.WriteByteSeq(playerGuid[2]); + data.WriteByteSeq(playerGuid[0]); + data.WriteByteSeq(playerGuid[6]); + data.WriteByteSeq(playerGuid[3]); + data.WriteByteSeq(playerGuid[4]); + data.WriteByteSeq(playerGuid[1]); + data.WriteByteSeq(playerGuid[5]); data << uint32(player->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS)); - data << uint64(player->GetGUID()); + data.WriteByteSeq(playerGuid[7]); SendPacket(&data); } |
