[9157] Prevent crash after .goname/namego teleports at same bg/arena.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
mns 2010-01-12 07:36:12 +03:00 committed by VladimirMangos
parent 07d121b6f7
commit dd6a6fcd58
2 changed files with 5 additions and 3 deletions

View file

@ -393,7 +393,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())
{ {
@ -507,7 +508,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())
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9156" #define REVISION_NR "9157"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__