mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +00:00
feat(Core): Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert (#2273)
This commit is contained in:
@@ -2283,7 +2283,7 @@ inline void Map::setNGrid(NGridType *grid, uint32 x, uint32 y)
|
||||
if (x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS)
|
||||
{
|
||||
sLog->outError("map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y);
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
i_grids[x][y] = grid;
|
||||
}
|
||||
@@ -2328,7 +2328,7 @@ void Map::AddObjectToSwitchList(WorldObject* obj, bool on)
|
||||
else if (itr->second != on)
|
||||
i_objectsToSwitch.erase(itr);
|
||||
else
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
void Map::RemoveAllObjectsInRemoveList()
|
||||
@@ -2539,7 +2539,7 @@ bool InstanceMap::CanEnter(Player* player, bool loginCheck)
|
||||
if (!loginCheck && player->GetMapRef().getTarget() == this)
|
||||
{
|
||||
sLog->outError("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;
|
||||
}
|
||||
|
||||
@@ -2893,7 +2893,7 @@ bool BattlegroundMap::CanEnter(Player* player, bool loginCheck)
|
||||
if (!loginCheck && player->GetMapRef().getTarget() == this)
|
||||
{
|
||||
sLog->outError("BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow());
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user