mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +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:
@@ -7595,7 +7595,7 @@ SpellEvent::~SpellEvent()
|
||||
{
|
||||
sLog->outError("~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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8093,7 +8093,7 @@ bool Spell::CallScriptEffectHandlers(SpellEffIndex effIndex, SpellEffectHandleMo
|
||||
hookType = SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
ABORT();
|
||||
return false;
|
||||
}
|
||||
(*scritr)->_PrepareScriptCall(hookType);
|
||||
|
||||
Reference in New Issue
Block a user