diff options
| author | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:09:41 +0200 |
|---|---|---|
| committer | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:11:06 +0200 |
| commit | 7b245a0b6b9902ebea98d2a945d4ee0e26a62681 (patch) | |
| tree | a30ef097011505ac095c267fc2f667fadac409bd /src/server/game/Entities/Unit | |
| parent | ff71da2b05210c1d0ed088ef12b06bf4632ff830 (diff) | |
Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 598bc5f8475..f8810c9d14f 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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; } |
