diff options
| author | Sovak <Sovak007@gmail.com> | 2012-09-02 12:17:38 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2012-09-02 12:17:38 +0200 |
| commit | 13e1e2361170c6e4a1fb5bcddc21b007d8681352 (patch) | |
| tree | c2dd220b88563ecff7e136f66effab535ea22bbf /src/server/game/Handlers/BattleGroundHandler.cpp | |
| parent | 2e1de60593fda0c1ad766fb0333a1992b17c35b9 (diff) | |
Core/Battlegrounds: More battleground fixes
Signed-off-by: Shauren <shauren.trinity@gmail.com>
Diffstat (limited to 'src/server/game/Handlers/BattleGroundHandler.cpp')
| -rwxr-xr-x | src/server/game/Handlers/BattleGroundHandler.cpp | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index d3e28bd84d1..085b5181913 100755 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -354,7 +354,7 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recvD void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recvData*/) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd MSG_PVP_LOG_DATA Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_PVP_LOG_DATA Message"); Battleground* bg = _player->GetBattleground(); if (!bg) @@ -368,7 +368,7 @@ void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recvData*/) sBattlegroundMgr->BuildPvpLogDataPacket(&data, bg); SendPacket(&data); - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent MSG_PVP_LOG_DATA Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_PVP_LOG_DATA Message"); } void WorldSession::HandleBattlefieldListOpcode(WorldPacket& recvData) @@ -394,13 +394,35 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_PORT Message"); - uint8 type; // arenatype if arena - uint8 unk2; // unk, can be 0x0 (may be if was invited?) and 0x1 + uint32 time; + uint32 type; // guessed uint32 bgTypeId_; // type id from dbc - uint16 unk; // 0x1F90 constant? uint8 action; // enter battle 0x1, leave queue 0x0 + ObjectGuid guid; + + recvData >> time; + recvData >> type; + recvData >> bgTypeId_; + + guid[0] = recvData.ReadBit(); + guid[1] = recvData.ReadBit(); + guid[5] = recvData.ReadBit(); + guid[6] = recvData.ReadBit(); + guid[7] = recvData.ReadBit(); + guid[4] = recvData.ReadBit(); + guid[3] = recvData.ReadBit(); + guid[2] = recvData.ReadBit(); - recvData >> type >> unk2 >> bgTypeId_ >> unk >> action; + action = recvData.ReadBit(); + + recvData.ReadByteSeq(guid[1]); + recvData.ReadByteSeq(guid[3]); + recvData.ReadByteSeq(guid[5]); + recvData.ReadByteSeq(guid[7]); + recvData.ReadByteSeq(guid[0]); + recvData.ReadByteSeq(guid[2]); + recvData.ReadByteSeq(guid[6]); + recvData.ReadByteSeq(guid[4]); if (!sBattlemasterListStore.LookupEntry(bgTypeId_)) { @@ -539,14 +561,9 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData) } } -void WorldSession::HandleLeaveBattlefieldOpcode(WorldPacket& recvData) +void WorldSession::HandleBattlefieldLeaveOpcode(WorldPacket& recvData) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message"); - - recvData.read_skip<uint8>(); // unk1 - recvData.read_skip<uint8>(); // unk2 - recvData.read_skip<uint32>(); // BattlegroundTypeId - recvData.read_skip<uint16>(); // unk3 + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_LEAVE Message"); // not allow leave battleground in combat if (_player->isInCombat()) |
