diff options
author | n0n4m3 <none@none> | 2010-01-16 19:38:19 +0300 |
---|---|---|
committer | n0n4m3 <none@none> | 2010-01-16 19:38:19 +0300 |
commit | 1557f9db9b0e0e2bc5567a5ba2620b6d563f2a8f (patch) | |
tree | 3e702ebb5626bc9fbb17c2684afee0232d493a1d | |
parent | c9a3698a1130fc4b150ff0574da043e38f61bc99 (diff) |
Prevent crash after .goname/namego teleports at same bg/arena, by mns.
--HG--
branch : trunk
-rw-r--r-- | src/game/Level1.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 4163aaa40e1..6ac68997cbc 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -824,7 +824,8 @@ bool ChatHandler::HandleNamegoCommand(const char* args) // when porting out from the bg, it will be reset to 0 target->SetBattleGroundId(m_session->GetPlayer()->GetBattleGroundId(), m_session->GetPlayer()->GetBattleGroundTypeId()); // remember current position as entry point for return at bg end teleportation - target->SetBattleGroundEntryPoint(); + if (!target->GetMap()->IsBattleGroundOrArena()) + target->SetBattleGroundEntryPoint(); } else if (pMap->IsDungeon()) { @@ -940,7 +941,8 @@ bool ChatHandler::HandleGonameCommand(const char* args) // when porting out from the bg, it will be reset to 0 _player->SetBattleGroundId(target->GetBattleGroundId(), target->GetBattleGroundTypeId()); // remember current position as entry point for return at bg end teleportation - _player->SetBattleGroundEntryPoint(); + if (!_player->GetMap()->IsBattleGroundOrArena()) + _player->SetBattleGroundEntryPoint(); } else if(cMap->IsDungeon()) { |