diff options
| author | Shocker <shocker@freakz.ro> | 2015-01-05 23:49:43 +0200 |
|---|---|---|
| committer | Shocker <shocker@freakz.ro> | 2015-01-05 23:49:43 +0200 |
| commit | e99411e40538d2c6598a8a5deabd5b0b3b14bb32 (patch) | |
| tree | 8f3a72c925b62b9e2f70e44a156496e410f5a4bc /src/server/game/Spells/SpellEffects.cpp | |
| parent | 77bf34e8d53f4e38d8570b4dec25c134868387fc (diff) | |
Core/Spells: Implement HasAttribute() helper for SpellInfo for easier readability
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 4369f945147..3817cfc9405 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -407,7 +407,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) case SPELLFAMILY_GENERIC: { // Meteor like spells (divided damage to targets) - if (m_spellInfo->AttributesCu & SPELL_ATTR0_CU_SHARE_DAMAGE) + if (m_spellInfo->HasAttribute(SPELL_ATTR0_CU_SHARE_DAMAGE)) { uint32 count = 0; for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) @@ -1630,7 +1630,7 @@ void Spell::EffectEnergize(SpellEffIndex /*effIndex*/) Powers power = Powers(effectInfo->MiscValue); - if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !(m_spellInfo->AttributesEx7 & SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER)) + if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER)) return; if (unitTarget->GetMaxPower(power) == 0) @@ -1739,7 +1739,7 @@ void Spell::EffectEnergizePct(SpellEffIndex /*effIndex*/) Powers power = Powers(effectInfo->MiscValue); - if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !(m_spellInfo->AttributesEx7 & SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER)) + if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->getPowerType() != power && !m_spellInfo->HasAttribute(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER)) return; uint32 maxPower = unitTarget->GetMaxPower(power); @@ -5604,7 +5604,7 @@ void Spell::EffectCastButtons(SpellEffIndex /*effIndex*/) if (!p_caster->HasSpell(spell_id) || p_caster->HasSpellCooldown(spell_id)) continue; - if (!(spellInfo->AttributesEx9 & SPELL_ATTR9_SUMMON_PLAYER_TOTEM)) + if (!spellInfo->HasAttribute(SPELL_ATTR9_SUMMON_PLAYER_TOTEM)) continue; int32 cost = spellInfo->CalcPowerCost(m_caster, spellInfo->GetSchoolMask()); |
