diff options
| author | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:09:41 +0200 |
|---|---|---|
| committer | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:11:06 +0200 |
| commit | 7b245a0b6b9902ebea98d2a945d4ee0e26a62681 (patch) | |
| tree | a30ef097011505ac095c267fc2f667fadac409bd /src/server/game/Maps/Map.cpp | |
| parent | ff71da2b05210c1d0ed088ef12b06bf4632ff830 (diff) | |
Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
| -rw-r--r-- | src/server/game/Maps/Map.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 354bbe4e269..c758d132d6e 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2571,7 +2571,7 @@ inline void Map::setNGrid(NGridType *grid, uint32 x, uint32 y) if (x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS) { TC_LOG_ERROR("maps", "map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y); - ASSERT(false); + ABORT(); } i_grids[x][y] = grid; } @@ -2630,7 +2630,7 @@ void Map::AddObjectToSwitchList(WorldObject* obj, bool on) else if (itr->second != on) i_objectsToSwitch.erase(itr); else - ASSERT(false); + ABORT(); } void Map::RemoveAllObjectsInRemoveList() @@ -2867,7 +2867,7 @@ bool InstanceMap::CanEnter(Player* player) if (player->GetMapRef().getTarget() == this) { TC_LOG_ERROR("maps", "InstanceMap::CanEnter - player %s(%u) already in map %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode()); - ASSERT(false); + ABORT(); return false; } @@ -2976,7 +2976,7 @@ bool InstanceMap::AddPlayerToMap(Player* player) TC_LOG_ERROR("maps", "InstanceMap::Add: player %s(%d) is being put into instance %s %d, %d, %d, %d, %d, %d but he is in group %s and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), GetMapName(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), group->GetLeaderGUID().ToString().c_str(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset()); if (groupBind) TC_LOG_ERROR("maps", "InstanceMap::Add: the group is bound to the instance %s %d, %d, %d, %d, %d, %d", GetMapName(), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset()); - //ASSERT(false); + //ABORT(); return false; } // bind to the group or keep using the group save @@ -3256,7 +3256,7 @@ bool BattlegroundMap::CanEnter(Player* player) if (player->GetMapRef().getTarget() == this) { TC_LOG_ERROR("maps", "BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow()); - ASSERT(false); + ABORT(); return false; } |
