Prevent crash after .goname/namego teleports at same bg/arena, by mns.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-01-16 19:38:19 +03:00
parent c9a3698a11
commit 1557f9db9b
+2
View File
@@ -824,6 +824,7 @@ 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
if (!target->GetMap()->IsBattleGroundOrArena())
target->SetBattleGroundEntryPoint();
}
else if (pMap->IsDungeon())
@@ -940,6 +941,7 @@ 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
if (!_player->GetMap()->IsBattleGroundOrArena())
_player->SetBattleGroundEntryPoint();
}
else if(cMap->IsDungeon())