mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Remove unnecessary const_cast<Map*>.
This commit is contained in:
@@ -359,7 +359,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
|
||||
sObjectMgr->AddCreatureToGrid(obj->guid, data);
|
||||
|
||||
// Spawn if necessary (loaded grids only)
|
||||
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(data->mapid));
|
||||
Map* map = sMapMgr->CreateBaseMap(data->mapid);
|
||||
// We use spawn coords to spawn
|
||||
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
|
||||
{
|
||||
@@ -385,7 +385,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
|
||||
sObjectMgr->AddGameobjectToGrid(obj->guid, data);
|
||||
// Spawn if necessary (loaded grids only)
|
||||
// this base map checked as non-instanced and then only existed
|
||||
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(data->mapid));
|
||||
Map* map = sMapMgr->CreateBaseMap(data->mapid);
|
||||
// We use current coords to unspawn, not spawn coords since creature can have changed grid
|
||||
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user