[11535] More wide use IsFitToFamilyMask

Simplify check for one from cases base at recheck spell data.
This commit is contained in:
VladimirMangos 2011-05-25 04:00:47 +04:00
parent 2cbde12458
commit 78a4460501
6 changed files with 47 additions and 57 deletions

View file

@ -508,14 +508,14 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
continue;
// Immolate
if ((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004))
if ((*i)->GetSpellProto()->IsFitToFamilyMask(UI64LIT(0x0000000000000004)))
{
aura = *i; // it selected always if exist
break;
}
// Shadowflame
if ((*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002)
if ((*i)->GetSpellProto()->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x00000002))
aura = *i; // remember but wait possible Immolate as primary priority
}
@ -2681,7 +2681,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
case SPELLFAMILY_DRUID:
{
// Starfall
if (m_spellInfo->SpellFamilyFlags2 & 0x00000100)
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x00000100))
{
//Shapeshifting into an animal form or mounting cancels the effect.
if(m_caster->GetCreatureType() == CREATURE_TYPE_BEAST || m_caster->IsMounted())
@ -3069,7 +3069,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
return;
}
// Lava Lash
if (m_spellInfo->SpellFamilyFlags2 & 0x00000004)
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x00000004))
{
if (m_caster->GetTypeId()!=TYPEID_PLAYER)
return;