From 7b245a0b6b9902ebea98d2a945d4ee0e26a62681 Mon Sep 17 00:00:00 2001 From: StormBytePP Date: Mon, 21 Sep 2015 15:09:41 +0200 Subject: Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert --- src/server/game/Spells/Spell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 03f14d1cdc8..ca6946554d4 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6586,7 +6586,7 @@ SpellEvent::~SpellEvent() { TC_LOG_ERROR("spells", "~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.", (m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUIDLow(), m_Spell->m_spellInfo->Id); - ASSERT(false); + ABORT(); } } @@ -7044,7 +7044,7 @@ bool Spell::CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMo hookType = SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET; break; default: - ASSERT(false); + ABORT(); return false; } (*scritr)->_PrepareScriptCall(hookType); -- cgit v1.2.3