mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Fix a crash caused by player saves with incorrect instance id.
--HG-- branch : trunk
This commit is contained in:
@@ -146,16 +146,7 @@ Map* MapInstanced::GetInstance(const WorldObject* obj)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
InstancePlayerBind *pBind = player->GetBoundInstance(GetId(), player->GetDifficulty());
|
||||
InstanceSave *pSave = pBind ? pBind->save : NULL;
|
||||
if(!pBind || !pBind->perm)
|
||||
{
|
||||
if(Group *group = player->GetGroup())
|
||||
if(InstanceGroupBind *groupBind = group->GetBoundInstance(GetId(), player->GetDifficulty()))
|
||||
pSave = groupBind->save;
|
||||
}
|
||||
|
||||
if(pSave)
|
||||
if(InstanceSave *pSave = player->GetInstanceSave(GetId()))
|
||||
{
|
||||
if(!instanceId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user