mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 13:47:23 +01:00
@@ -111,9 +111,6 @@ void BattlegroundMgr::Update(uint32 diff)
|
||||
if (!m_ClientBattlegroundIds[i][bg->GetBracketId()].empty())
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,9 +245,15 @@ bool MapInstanced::DestroyInstance(InstancedMaps::iterator &itr)
|
||||
// so in the next map creation, (EnsureGridCreated actually) VMaps will be reloaded
|
||||
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
|
||||
delete itr->second;
|
||||
m_InstancedMaps.erase(itr++);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user