Remove unnecessary const_cast<Map*>.
This commit is contained in:
@@ -1599,7 +1599,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
|
||||
if (!goinfo)
|
||||
return 0;
|
||||
|
||||
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(mapId));
|
||||
Map* map = sMapMgr->CreateBaseMap(mapId);
|
||||
if (!map)
|
||||
return 0;
|
||||
|
||||
@@ -1660,7 +1660,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
|
||||
AddCreatureToGrid(guid, &data);
|
||||
|
||||
// Spawn if necessary (loaded grids only)
|
||||
if (Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(mapId)))
|
||||
if (Map* map = sMapMgr->CreateBaseMap(mapId))
|
||||
{
|
||||
// We use spawn coords to spawn
|
||||
if (!map->Instanceable() && map->IsGridLoaded(data.posX, data.posY))
|
||||
@@ -1713,7 +1713,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
|
||||
AddCreatureToGrid(guid, &data);
|
||||
|
||||
// Spawn if necessary (loaded grids only)
|
||||
if (Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(mapId)))
|
||||
if (Map* map = sMapMgr->CreateBaseMap(mapId))
|
||||
{
|
||||
// We use spawn coords to spawn
|
||||
if (!map->Instanceable() && !map->IsRemovalGrid(x, y))
|
||||
|
||||
Reference in New Issue
Block a user