diff options
| author | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:17:05 +0200 |
|---|---|---|
| committer | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:17:05 +0200 |
| commit | 0bed9d56cb9f10979492187c51042802272ce8ed (patch) | |
| tree | 626a32a25a1486bf650e20518235f5ff6c7bffe0 /src/server/game/Maps/Map.cpp | |
| parent | 32a2e584296556e852830e50cfa612ce279360b6 (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 b10d6aa6896..fb0dc751da7 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2604,7 +2604,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; } @@ -2684,7 +2684,7 @@ void Map::AddObjectToSwitchList(WorldObject* obj, bool on) else if (itr->second != on) i_objectsToSwitch.erase(itr); else - ASSERT(false); + ABORT(); } void Map::RemoveAllObjectsInRemoveList() @@ -2926,7 +2926,7 @@ bool InstanceMap::CanEnter(Player* player) if (player->GetMapRef().getTarget() == this) { TC_LOG_ERROR("maps", "InstanceMap::CanEnter - player %s(%s) already in map %d, %d, %d!", player->GetName().c_str(), player->GetGUID().ToString().c_str(), GetId(), GetInstanceId(), GetSpawnMode()); - ASSERT(false); + ABORT(); return false; } @@ -3035,7 +3035,7 @@ bool InstanceMap::AddPlayerToMap(Player* player, bool initPlayer /*= true*/) TC_LOG_ERROR("maps", "InstanceMap::Add: player %s(%s) 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->GetGUID().ToString().c_str(), GetMapName(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficultyID(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), group->GetLeaderGUID().ToString().c_str(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficultyID(), 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->GetDifficultyID(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset()); - //ASSERT(false); + //ABORT(); return false; } // bind to the group or keep using the group save @@ -3338,7 +3338,7 @@ bool BattlegroundMap::CanEnter(Player* player) if (player->GetMapRef().getTarget() == this) { TC_LOG_ERROR("maps", "BGMap::CanEnter - %s is already in map!", player->GetGUID().ToString().c_str()); - ASSERT(false); + ABORT(); return false; } |
