Prevent crash after .goname/namego teleports at same bg/arena, by mns.
--HG-- branch : trunk
This commit is contained in:
+4
-2
@@ -824,7 +824,8 @@ bool ChatHandler::HandleNamegoCommand(const char* args)
|
|||||||
// when porting out from the bg, it will be reset to 0
|
// when porting out from the bg, it will be reset to 0
|
||||||
target->SetBattleGroundId(m_session->GetPlayer()->GetBattleGroundId(), m_session->GetPlayer()->GetBattleGroundTypeId());
|
target->SetBattleGroundId(m_session->GetPlayer()->GetBattleGroundId(), m_session->GetPlayer()->GetBattleGroundTypeId());
|
||||||
// remember current position as entry point for return at bg end teleportation
|
// remember current position as entry point for return at bg end teleportation
|
||||||
target->SetBattleGroundEntryPoint();
|
if (!target->GetMap()->IsBattleGroundOrArena())
|
||||||
|
target->SetBattleGroundEntryPoint();
|
||||||
}
|
}
|
||||||
else if (pMap->IsDungeon())
|
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
|
// when porting out from the bg, it will be reset to 0
|
||||||
_player->SetBattleGroundId(target->GetBattleGroundId(), target->GetBattleGroundTypeId());
|
_player->SetBattleGroundId(target->GetBattleGroundId(), target->GetBattleGroundTypeId());
|
||||||
// remember current position as entry point for return at bg end teleportation
|
// remember current position as entry point for return at bg end teleportation
|
||||||
_player->SetBattleGroundEntryPoint();
|
if (!_player->GetMap()->IsBattleGroundOrArena())
|
||||||
|
_player->SetBattleGroundEntryPoint();
|
||||||
}
|
}
|
||||||
else if(cMap->IsDungeon())
|
else if(cMap->IsDungeon())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user