diff options
| author | Shauren <shauren.trinity@gmail.com> | 2013-08-15 16:32:22 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2013-08-15 16:32:22 +0200 |
| commit | 2ac6380202ca38da318d5f147d0e33fddea9488e (patch) | |
| tree | 2a821a79393fb77718f3a0a888a4ed28143fc86c /src/server/game/Entities/Unit | |
| parent | 0e966c11e25a403fd33ab5a4c2a12f329e635237 (diff) | |
Core/Auras: Allow preventing whole aura proc default handler from script hooks, just how it is possible for separate effects
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index fd5b13c3d28..a51207ce531 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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; |
