Core/Auras: Allow preventing whole aura proc default handler from script hooks, just how it is possible for separate effects

This commit is contained in:
Shauren
2013-08-15 16:32:22 +02:00
parent 0e966c11e2
commit 2ac6380202
4 changed files with 11 additions and 6 deletions
+3 -4
View File
@@ -14064,11 +14064,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
if (spellInfo->AttributesEx3 & SPELL_ATTR3_DISABLE_PROC)
SetCantProc(true);
i->aura->CallScriptProcHandlers(aurApp, eventInfo);
bool handled = i->aura->CallScriptProcHandlers(aurApp, eventInfo);
// This bool is needed till separate aura effect procs are still here
bool handled = false;
if (HandleAuraProc(target, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
// "handled" is needed as long as proc can be handled in multiple places
if (!handled && HandleAuraProc(target, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
{
TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), Id);
takeCharges = true;