mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[11535] More wide use IsFitToFamilyMask
Simplify check for one from cases base at recheck spell data.
This commit is contained in:
parent
2cbde12458
commit
78a4460501
6 changed files with 47 additions and 57 deletions
|
|
@ -2224,7 +2224,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
|||
|
||||
// Fire Ward or Frost Ward or Ice Barrier (or Mana Shield)
|
||||
// for Incanter's Absorption converting to spell power
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_MAGE && spellProto->SpellFamilyFlags2 & 0x000008)
|
||||
if (spellProto->IsFitToFamily(SPELLFAMILY_MAGE, UI64LIT(0x0000000000000000), 0x00000008))
|
||||
incanterAbsorption += currentAbsorb;
|
||||
|
||||
// Reduce shield amount
|
||||
|
|
@ -2290,7 +2290,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
|
|||
|
||||
// Mana Shield (or Fire Ward or Frost Ward or Ice Barrier)
|
||||
// for Incanter's Absorption converting to spell power
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_MAGE && (*i)->GetSpellProto()->SpellFamilyFlags2 & 0x000008)
|
||||
if ((*i)->GetSpellProto()->IsFitToFamily(SPELLFAMILY_MAGE, UI64LIT(0x0000000000000000), 0x000008))
|
||||
incanterAbsorption += currentAbsorb;
|
||||
|
||||
(*i)->GetModifier()->m_amount -= currentAbsorb;
|
||||
|
|
@ -5791,12 +5791,9 @@ bool Unit::HasAuraStateForCaster(AuraState flag, ObjectGuid casterGuid) const
|
|||
Unit::AuraList const& dotList = GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
for (Unit::AuraList::const_iterator i = dotList.begin(); i != dotList.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
|
||||
(*i)->GetCasterGuid() == casterGuid &&
|
||||
// Immolate
|
||||
(((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004)) ||
|
||||
// Shadowflame
|
||||
((*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002)))
|
||||
if ((*i)->GetCasterGuid() == casterGuid &&
|
||||
// Immolate or Shadowflame
|
||||
(*i)->GetSpellProto()->IsFitToFamily(SPELLFAMILY_WARLOCK, UI64LIT(0x0000000000000004), 0x00000002))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -9792,8 +9789,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||
{
|
||||
if (spellProcEvent->spellFamilyMask[i] || spellProcEvent->spellFamilyMask2[i])
|
||||
{
|
||||
if ((spellProcEvent->spellFamilyMask[i] & procSpell->SpellFamilyFlags ) == 0 &&
|
||||
(spellProcEvent->spellFamilyMask2[i] & procSpell->SpellFamilyFlags2) == 0)
|
||||
if (!procSpell->IsFitToFamilyMask(spellProcEvent->spellFamilyMask[i], spellProcEvent->spellFamilyMask2[i]))
|
||||
continue;
|
||||
}
|
||||
// don't check dbc FamilyFlags if schoolMask exists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue