diff options
author | megamage <none@none> | 2009-08-12 20:27:00 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-12 20:27:00 -0500 |
commit | 4f4775a31bd6f6aa8e3896100aeded0f23c7169d (patch) | |
tree | fe17026bb66f34d231d4b778ea74fdebf4b22e45 /src/game/BattleGroundHandler.cpp | |
parent | ed637fbf1fec965c8eaaf6e41e939107a5ea9aab (diff) |
[8339] Improved storing/restoring BG entry point
* Introduced new table character_battleground_data
* Entry point is now stored on BG enter event not join event
* Entry point for dungeons is now correctly set to nearest graveyard
(this prevent well known assert in GetInstance because of porting to already destroyed instance)
* Teleporting from BG correctly restore mount state
* Teleporting from BG correctly restore taxi flight
(in multipath flight you will end up in nearest transition point on the route)
Signed-off-by: ApoC <apoc@nymfe.net>
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGroundHandler.cpp')
-rw-r--r-- | src/game/BattleGroundHandler.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp index 497db2ceadd..b1309063b3b 100644 --- a/src/game/BattleGroundHandler.cpp +++ b/src/game/BattleGroundHandler.cpp @@ -164,9 +164,6 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data ) uint32 queueSlot = member->AddBattleGroundQueueId(bgQueueTypeId); // add to queue - // store entry point coords - member->SetBattleGroundEntryPoint(member->GetMapId(),member->GetPositionX(),member->GetPositionY(),member->GetPositionZ(),member->GetOrientation()); - WorldPacket data; // send status packet (in queue) sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType); @@ -182,8 +179,6 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data ) { // already checked if queueSlot is valid, now just get it uint32 queueSlot = _player->AddBattleGroundQueueId(bgQueueTypeId); - // store entry point coords - _player->SetBattleGroundEntryPoint(_player->GetMapId(),_player->GetPositionX(),_player->GetPositionY(),_player->GetPositionZ(),_player->GetOrientation()); WorldPacket data; // send status packet (in queue) @@ -438,6 +433,9 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data ) case 1: // port to battleground if (!_player->IsInvitedForBattleGroundQueueType(bgQueueTypeId)) return; // cheating? + + _player->SetBattleGroundEntryPoint(); + // resurrect the player if (!_player->isAlive()) { @@ -758,9 +756,6 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data ) uint32 queueSlot = member->AddBattleGroundQueueId(bgQueueTypeId);// add to queue - // store entry point coords (same as leader entry point) - member->SetBattleGroundEntryPoint(_player->GetMapId(),_player->GetPositionX(),_player->GetPositionY(),_player->GetPositionZ(),_player->GetOrientation()); - WorldPacket data; // send status packet (in queue) sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype); @@ -778,9 +773,6 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data ) { uint32 queueSlot = _player->AddBattleGroundQueueId(bgQueueTypeId); - // store entry point coords - _player->SetBattleGroundEntryPoint(_player->GetMapId(),_player->GetPositionX(),_player->GetPositionY(),_player->GetPositionZ(),_player->GetOrientation()); - WorldPacket data; // send status packet (in queue) sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype); |