*A temp fix for the crash caused by players disconnected in bg. Replace assert(false) by return NULL;
--HG-- branch : trunk
This commit is contained in:
@@ -148,7 +148,13 @@ Map* MapInstanced::GetInstance(const WorldObject* obj)
|
|||||||
// instantiate or find existing bg map for player
|
// instantiate or find existing bg map for player
|
||||||
// the instance id is set in battlegroundid
|
// the instance id is set in battlegroundid
|
||||||
NewInstanceId = player->GetBattleGroundId();
|
NewInstanceId = player->GetBattleGroundId();
|
||||||
assert(NewInstanceId);
|
if(!NewInstanceId)
|
||||||
|
{
|
||||||
|
if(player->GetSession()->PlayerLoading())
|
||||||
|
return NULL;
|
||||||
|
else
|
||||||
|
assert(NewInstanceId);
|
||||||
|
}
|
||||||
map = _FindMap(NewInstanceId);
|
map = _FindMap(NewInstanceId);
|
||||||
if(!map)
|
if(!map)
|
||||||
map = CreateBattleGround(NewInstanceId);
|
map = CreateBattleGround(NewInstanceId);
|
||||||
|
|||||||
Reference in New Issue
Block a user