[8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests. Author: Ambal
--HG-- branch : trunk
This commit is contained in:
1 parent
aaec3c8191
commit
3cf2be6042
26 files changed
+104
-100
No files matched your search
@@ -580,7 +580,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr)
|
||||
void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
|
||||
{
|
||||
sLog.outDebug("InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
|
||||
Map *map = (MapInstanced*)MapManager::Instance().GetBaseMap(mapid);
|
||||
Map *map = (MapInstanced*)MapManager::Instance().CreateBaseMap(mapid);
|
||||
if(!map->Instanceable())
|
||||
return;
|
||||
|
||||
@@ -597,7 +597,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
|
||||
{
|
||||
// global reset for all instances of the given map
|
||||
// note: this isn't fast but it's meant to be executed very rarely
|
||||
Map const *map = MapManager::Instance().GetBaseMap(mapid);
|
||||
Map const *map = MapManager::Instance().CreateBaseMap(mapid);
|
||||
if(!map->Instanceable())
|
||||
return;
|
||||
uint64 now = (uint64)time(NULL);
|
||||
|
||||
Reference in new issue
Block a user