mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[8785] Use macro instead of explicit call to singleton Instance().
* For: ObjectAccessor, MapManager.
This commit is contained in:
parent
6abf7e7f58
commit
dc725ad6b8
28 changed files with 77 additions and 72 deletions
|
|
@ -520,7 +520,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
|||
objmgr.AddCreatureToGrid(*itr, data);
|
||||
|
||||
// Spawn if necessary (loaded grids only)
|
||||
Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(data->mapid));
|
||||
Map* map = const_cast<Map*>(mapmgr.CreateBaseMap(data->mapid));
|
||||
// We use spawn coords to spawn
|
||||
if(!map->Instanceable() && map->IsLoaded(data->posX,data->posY))
|
||||
{
|
||||
|
|
@ -553,7 +553,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
|||
objmgr.AddGameobjectToGrid(*itr, data);
|
||||
// Spawn if necessary (loaded grids only)
|
||||
// this base map checked as non-instanced and then only existed
|
||||
Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(data->mapid));
|
||||
Map* map = const_cast<Map*>(mapmgr.CreateBaseMap(data->mapid));
|
||||
// We use current coords to unspawn, not spawn coords since creature can have changed grid
|
||||
if(!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue