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:
Viste
2019-09-26 10:51:34 +03:00
committed by Stoabrogga
parent 58f3cfe387
commit 854b426978
28 changed files with 127 additions and 74 deletions

View File

@@ -700,7 +700,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Mov
// Owner already found and different than expected owner - remove object from old owner
if (owner && GetOwnerGUID() && GetOwnerGUID() != owner)
{
ASSERT(false);
ABORT();
}
m_spawnedByDefault = false; // all object with owner is despawned after delay
SetUInt64Value(OBJECT_FIELD_CREATED_BY, owner);