mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8026] Obtain object's map directly by calling appropriate WorldObject::GetMap()/GetBaseMap() functions instead of accessing MapManager. Code cleanups. Big thanks Infinity for tests.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
parent
1187c8698c
commit
b76c4c2f3c
29 changed files with 99 additions and 99 deletions
|
|
@ -558,7 +558,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;
|
||||
|
||||
|
|
@ -575,7 +575,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue