Core/Maps: Moved object respawn time storage from global to map level. This removes unneccessary locking since all objects run within its map's thread.

This commit is contained in:
Shauren
2012-06-07 23:20:57 +02:00
parent 426145373b
commit c7775c8d72
15 changed files with 189 additions and 248 deletions
@@ -543,7 +543,7 @@ void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
if (iMap && iMap->IsDungeon())
((InstanceMap*)iMap)->Reset(INSTANCE_RESET_RESPAWN_DELAY);
sObjectMgr->DeleteRespawnTimeForInstance(instanceId); // even if map is not loaded
iMap->DeleteRespawnTimes();
// Free up the instance id and allow it to be reused
sMapMgr->FreeInstanceId(instanceId);