diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 734a755dc..091573323 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -910,6 +910,29 @@ bool Aura::isAffectedOnSpell(SpellEntry const *spell) const return false; } +bool Aura::CanProcFrom(SpellEntry const *spell) const +{ + // Check EffectClassMask + uint32 const *ptr = getAuraSpellClassMask(); + + // if no class mask defined - allow proc + if (!((uint64*)ptr)[0] && !ptr[2]) + return true; + else + { + // Check family name + if (spell->SpellFamilyName != GetSpellProto()->SpellFamilyName) + return false; + + if (((uint64*)ptr)[0] & spell->SpellFamilyFlags) + return true; + + if (ptr[2] & spell->SpellFamilyFlags2) + return true; + } + return false; +} + void Aura::ReapplyAffectedPassiveAuras( Unit* target, bool owner_mode ) { std::set affectedSelf; diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 22dffa7f2..203497f47 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -436,6 +436,7 @@ class MANGOS_DLL_SPEC Aura uint32 const *getAuraSpellClassMask() const { return m_spellAuraHolder->GetSpellProto()->GetEffectSpellClassMask(m_effIndex); } bool isAffectedOnSpell(SpellEntry const *spell) const; + bool CanProcFrom(SpellEntry const *spell) const; //SpellAuraHolder const* GetHolder() const { return m_spellHolder; } SpellAuraHolder* GetHolder() { return m_spellAuraHolder; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 168a0f4f8..cc1c35997 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9519,10 +9519,10 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag (spellProcEvent->spellFamilyMask2[i] & procSpell->SpellFamilyFlags2) == 0) continue; } - else if (!spellProcEvent->schoolMask && !triggeredByAura->isAffectedOnSpell(procSpell)) + else if (!spellProcEvent->schoolMask && !triggeredByAura->CanProcFrom(procSpell)) continue; } - else if (!triggeredByAura->isAffectedOnSpell(procSpell)) + else if (!triggeredByAura->CanProcFrom(procSpell)) continue; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 42f1087c0..0a53caed4 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10217" + #define REVISION_NR "10218" #endif // __REVISION_NR_H__