mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +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
|
|
@ -434,11 +434,11 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
return SPELL_CURSE;
|
||||
|
||||
// Warlock (Demon Armor | Demon Skin | Fel Armor)
|
||||
if (spellInfo->SpellFamilyFlags & UI64LIT(0x2000002000000000) || spellInfo->SpellFamilyFlags2 & 0x00000010)
|
||||
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x2000002000000000), 0x00000010))
|
||||
return SPELL_WARLOCK_ARMOR;
|
||||
|
||||
// Unstable Affliction | Immolate
|
||||
if (spellInfo->SpellFamilyFlags & UI64LIT(0x10000000004))
|
||||
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x0000010000000004)))
|
||||
return SPELL_UA_IMMOLATE;
|
||||
break;
|
||||
}
|
||||
|
|
@ -458,7 +458,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
return SPELL_STING;
|
||||
|
||||
// only hunter aspects have this
|
||||
if( spellInfo->SpellFamilyFlags & UI64LIT(0x0044000000380000) || spellInfo->SpellFamilyFlags2 & 0x00001010)
|
||||
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x0044000000380000), 0x00001010))
|
||||
return SPELL_ASPECT;
|
||||
|
||||
break;
|
||||
|
|
@ -468,18 +468,18 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
if (IsSealSpell(spellInfo))
|
||||
return SPELL_SEAL;
|
||||
|
||||
if (spellInfo->SpellFamilyFlags & UI64LIT(0x0000000011010002))
|
||||
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000011010002)))
|
||||
return SPELL_BLESSING;
|
||||
|
||||
if (spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000002190))
|
||||
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000002190)))
|
||||
return SPELL_HAND;
|
||||
|
||||
// skip Heart of the Crusader that have also same spell family mask
|
||||
if ((spellInfo->SpellFamilyFlags & UI64LIT(0x00000820180400)) && (spellInfo->AttributesEx3 & 0x200) && (spellInfo->SpellIconID != 237))
|
||||
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x00000820180400)) && (spellInfo->AttributesEx3 & 0x200) && (spellInfo->SpellIconID != 237))
|
||||
return SPELL_JUDGEMENT;
|
||||
|
||||
// only paladin auras have this (for palaldin class family)
|
||||
if( spellInfo->SpellFamilyFlags2 & 0x00000020 )
|
||||
if (spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x00000020))
|
||||
return SPELL_AURA;
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue