[11761] change conditions for default cast end proc

This commit is contained in:
Laise 2011-07-30 09:37:50 +03:00
parent 98bd7918f4
commit 43e45c2b35
4 changed files with 44 additions and 13 deletions

View file

@ -860,6 +860,18 @@ bool Aura::CanProcFrom(SpellEntry const *spell, uint32 procFlag, uint32 EventPro
// Check EffectClassMask
ClassFamilyMask const& mask = GetAuraSpellClassMask();
// allow proc for modifier auras with charges
if (IsCastEndProcModifierAura(GetSpellProto(), GetEffIndex(), spell))
{
if (GetHolder()->GetAuraCharges() > 0)
{
if (procEx != PROC_EX_CAST_END && EventProcEx == PROC_EX_NONE)
return false;
}
}
else if (EventProcEx == PROC_EX_NONE && procEx == PROC_EX_CAST_END)
return false;
// if no class mask defined, or spell_proc_event has SpellFamilyName=0 - allow proc
if (!useClassMask || !mask)
{
@ -868,14 +880,8 @@ bool Aura::CanProcFrom(SpellEntry const *spell, uint32 procFlag, uint32 EventPro
// Check for extra req (if none) and hit/crit
if (EventProcEx == PROC_EX_NONE)
{
// allow proc for modifier auras with charges
if (procEx == PROC_EX_CAST_END
&& IsModifierAura(GetSpellProto(), GetEffIndex())
&& GetHolder()->GetAuraCharges() > 0)
return true;
// No extra req, so can trigger only for active (damage/healing present) and hit/crit
if((procEx & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) && active)
if(((procEx & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) && active) || procEx == PROC_EX_CAST_END)
return true;
else
return false;