@@ -111,9 +111,6 @@ void BattlegroundMgr::Update(uint32 diff)
|
|||||||
if (!m_ClientBattlegroundIds[i][bg->GetBracketId()].empty())
|
if (!m_ClientBattlegroundIds[i][bg->GetBracketId()].empty())
|
||||||
m_ClientBattlegroundIds[i][bg->GetBracketId()].erase(bg->GetClientInstanceID());
|
m_ClientBattlegroundIds[i][bg->GetBracketId()].erase(bg->GetClientInstanceID());
|
||||||
|
|
||||||
// Free up the instance id and allow it to be reused
|
|
||||||
sMapMgr->FreeInstanceId(bg->GetInstanceID());
|
|
||||||
|
|
||||||
delete bg;
|
delete bg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,9 +245,15 @@ bool MapInstanced::DestroyInstance(InstancedMaps::iterator &itr)
|
|||||||
// so in the next map creation, (EnsureGridCreated actually) VMaps will be reloaded
|
// so in the next map creation, (EnsureGridCreated actually) VMaps will be reloaded
|
||||||
Map::UnloadAll();
|
Map::UnloadAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Free up the instance id and allow it to be reused for bgs and arenas (other instances are handled in the InstanceSaveMgr)
|
||||||
|
if (itr->second->IsBattlegroundOrArena())
|
||||||
|
sMapMgr->FreeInstanceId(itr->second->GetInstanceId());
|
||||||
|
|
||||||
// erase map
|
// erase map
|
||||||
delete itr->second;
|
delete itr->second;
|
||||||
m_InstancedMaps.erase(itr++);
|
m_InstancedMaps.erase(itr++);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user