mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +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:
@@ -92,7 +92,7 @@ WorldObject::~WorldObject()
|
||||
if (GetTypeId() == TYPEID_CORPSE)
|
||||
{
|
||||
sLog->outCrash("Object::~Object Corpse guid=" UI64FMTD ", type=%d, entry=%u deleted but still in map!!", GetGUID(), ((Corpse*)this)->GetType(), GetEntry());
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
ResetMap();
|
||||
}
|
||||
@@ -105,14 +105,14 @@ Object::~Object()
|
||||
sLog->outCrash("Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry());
|
||||
if (isType(TYPEMASK_ITEM))
|
||||
sLog->outCrash("Item slot %u", ((Item*)this)->GetSlot());
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
RemoveFromWorld();
|
||||
}
|
||||
|
||||
if (m_objectUpdated)
|
||||
{
|
||||
sLog->outCrash("Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry());
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
sObjectAccessor->RemoveUpdateObject(this);
|
||||
}
|
||||
|
||||
@@ -2059,7 +2059,7 @@ void WorldObject::SetMap(Map* map)
|
||||
if (m_currMap)
|
||||
{
|
||||
sLog->outCrash("WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId());
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
m_currMap = map;
|
||||
m_mapId = map->GetId();
|
||||
|
||||
Reference in New Issue
Block a user