Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert
This commit is contained in:
1 parent
ff71da2b05
commit
7b245a0b6b
23 files changed
+62
-55
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user