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
@@ -3520,7 +3520,7 @@ void Unit::_UnapplyAura(AuraApplication * aurApp, AuraRemoveMode removeMode)
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
void Unit::_RemoveNoStackAurasDueToAura(Aura* aura)
|
||||
@@ -3630,7 +3630,7 @@ void Unit::RemoveOwnedAura(Aura* aura, AuraRemoveMode removeMode)
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
Aura* Unit::GetOwnedAura(uint32 spellId, ObjectGuid casterGUID, ObjectGuid itemCasterGUID, uint8 reqEffMask, Aura* except) const
|
||||
@@ -9450,7 +9450,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
|
||||
{
|
||||
OutDebugInfo();
|
||||
(*itr)->OutDebugInfo();
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
ASSERT((*itr)->GetTypeId() == TYPEID_UNIT);
|
||||
|
||||
@@ -13604,7 +13604,7 @@ void Unit::RemoveFromWorld()
|
||||
if (GetCharmerGUID())
|
||||
{
|
||||
TC_LOG_FATAL("entities.unit", "Unit %u has charmer guid when removed from world", GetEntry());
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
if (Unit* owner = GetOwner())
|
||||
@@ -13612,7 +13612,7 @@ void Unit::RemoveFromWorld()
|
||||
if (owner->m_Controlled.find(this) != owner->m_Controlled.end())
|
||||
{
|
||||
TC_LOG_FATAL("entities.unit", "Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry());
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15980,7 +15980,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
|
||||
{
|
||||
// TC_LOG_FATAL("entities.unit", "Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD,
|
||||
// GetGUID(), GetCharmerGUID(), charmer->GetGUID());
|
||||
// ASSERT(false);
|
||||
// ABORT();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user