mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +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
|
|
@ -696,39 +696,38 @@ void Spell::prepareDataForTriggerSystem()
|
|||
{
|
||||
case SPELLFAMILY_MAGE:
|
||||
// Arcane Missiles / Blizzard triggers need do it
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000200080))
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000200080)))
|
||||
m_canTrigger = true;
|
||||
// Clearcasting trigger need do it
|
||||
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000200000000) && m_spellInfo->SpellFamilyFlags2 & 0x8)
|
||||
else if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000200000000)))
|
||||
m_canTrigger = true;
|
||||
// Replenish Mana, item spell with triggered cases (Mana Agate, etc mana gems)
|
||||
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000010000000000))
|
||||
else if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000010000000000)))
|
||||
m_canTrigger = true;
|
||||
break;
|
||||
case SPELLFAMILY_WARLOCK:
|
||||
// For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000800000000060))
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000800000000060)))
|
||||
m_canTrigger = true;
|
||||
break;
|
||||
case SPELLFAMILY_PRIEST:
|
||||
// For Penance,Mind Sear,Mind Flay heal/damage triggers need do it
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001800000800000) || (m_spellInfo->SpellFamilyFlags2 & 0x00000040))
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0001800000800000), 0x00000040))
|
||||
m_canTrigger = true;
|
||||
break;
|
||||
case SPELLFAMILY_ROGUE:
|
||||
// For poisons need do it
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x000000101001E000))
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x000000101001E000)))
|
||||
m_canTrigger = true;
|
||||
break;
|
||||
case SPELLFAMILY_HUNTER:
|
||||
// Hunter Rapid Killing/Explosive Trap Effect/Immolation Trap Effect/Frost Trap Aura/Snake Trap Effect/Explosive Shot
|
||||
if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x0100200000000214)) ||
|
||||
m_spellInfo->SpellFamilyFlags2 & 0x200)
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0100200000000214), 0x00000200))
|
||||
m_canTrigger = true;
|
||||
break;
|
||||
case SPELLFAMILY_PALADIN:
|
||||
// For Judgements (all) / Holy Shock triggers need do it
|
||||
if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0001000900B80400))
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0001000900B80400)))
|
||||
m_canTrigger = true;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1587,7 +1586,8 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
}
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
if (m_spellInfo->SpellFamilyFlags2 & 0x00000100)// Starfall
|
||||
// Starfall
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x00000100))
|
||||
unMaxTargets = 2;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue