[10830] Prevent spell_proc_event entries to proc on any spell cast when SpellFamilyName is zero.

Now only spells that actually deal damage or heal will trigger
when neither SpellFamilyName nor ProcEx & PROC_EX_EX_TRIGGER_ALWAYS are set.
Before, setting a SchoolMask would override this check, causing many bogus procs.
This commit is contained in:
Lynx3d 2010-12-06 21:18:25 +01:00
parent b6ea36192e
commit 81b6cb2751
4 changed files with 12 additions and 12 deletions

View file

@ -909,13 +909,13 @@ bool Aura::isAffectedOnSpell(SpellEntry const *spell) const
return false;
}
bool Aura::CanProcFrom(SpellEntry const *spell, uint32 EventProcEx, uint32 procEx, bool active) const
bool Aura::CanProcFrom(SpellEntry const *spell, uint32 EventProcEx, uint32 procEx, bool active, bool useClassMask) const
{
// Check EffectClassMask
uint32 const *ptr = getAuraSpellClassMask();
// if no class mask defined - allow proc
if (!((uint64*)ptr)[0] && !ptr[2])
// if no class mask defined, or spell_proc_event has SpellFamilyName=0 - allow proc
if (!useClassMask || (!((uint64*)ptr)[0] && !ptr[2]))
{
if (!(EventProcEx & PROC_EX_EX_TRIGGER_ALWAYS))
{