mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9157] Prevent crash after .goname/namego teleports at same bg/arena.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
07d121b6f7
commit
dd6a6fcd58
2 changed files with 5 additions and 3 deletions
|
|
@ -393,7 +393,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())
|
||||
{
|
||||
|
|
@ -507,7 +508,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())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue