mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[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:
parent
b6ea36192e
commit
81b6cb2751
4 changed files with 12 additions and 12 deletions
|
|
@ -2864,7 +2864,7 @@ bool Unit::IsSpellBlocked(Unit *pCaster, SpellEntry const *spellEntry, WeaponAtt
|
|||
|
||||
float blockChance = GetUnitBlockChance();
|
||||
blockChance += (int32(pCaster->GetWeaponSkillValue(attackType)) - int32(GetMaxSkillValueForLevel()))*0.04f;
|
||||
|
||||
|
||||
return roll_chance_f(blockChance);
|
||||
}
|
||||
|
||||
|
|
@ -9762,11 +9762,11 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||
(spellProcEvent->spellFamilyMask2[i] & procSpell->SpellFamilyFlags2) == 0)
|
||||
continue;
|
||||
}
|
||||
// don't check FamilyFlags if schoolMask exists
|
||||
else if (!spellProcEvent->schoolMask && !triggeredByAura->CanProcFrom(procSpell, spellProcEvent->procEx, procExtra, damage != 0))
|
||||
// don't check dbc FamilyFlags unless spellFamilyName != 0
|
||||
else if (!triggeredByAura->CanProcFrom(procSpell, spellProcEvent->procEx, procExtra, damage != 0, spellProcEvent->spellFamilyName != 0))
|
||||
continue;
|
||||
}
|
||||
else if (!triggeredByAura->CanProcFrom(procSpell, PROC_EX_NONE, procExtra, damage != 0))
|
||||
else if (!triggeredByAura->CanProcFrom(procSpell, PROC_EX_NONE, procExtra, damage != 0, true))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -10797,4 +10797,4 @@ bool Unit::IsAllowedDamageInArea(Unit* pVictim) const
|
|||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue