mirror of
https://github.com/mangosfour/server.git
synced 2025-12-31 04:37:04 +00:00
[11761] change conditions for default cast end proc
This commit is contained in:
parent
98bd7918f4
commit
43e45c2b35
4 changed files with 44 additions and 13 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue