diff options
author | QAston <none@none> | 2009-02-02 17:42:05 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-02-02 17:42:05 +0100 |
commit | dca9c4cc1f0229ab97dbe4e6e8486deaef978fcf (patch) | |
tree | 4fe72671366d1f04e669beeb11bd2066df601e86 /src | |
parent | 0480fa7339a8eeca8f563d936174bc5453aa0f4a (diff) |
*Remove hack from spell::cast.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 49 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellMgr.h | 4 |
3 files changed, 12 insertions, 43 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 874ae8faf8c..907b1036b49 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2150,48 +2150,17 @@ void Spell::cast(bool skipCheck) if(m_customAttr & SPELL_ATTR_CU_DIRECT_DAMAGE) CalculateDamageDoneForAllTargets(); - switch(m_spellInfo->SpellFamilyName) + if(m_spellInfo->SpellFamilyName) { - case SPELLFAMILY_GENERIC: - { - if (m_spellInfo->Mechanic == MECHANIC_BANDAGE) // Bandages - m_preCastSpell = 11196; // Recently Bandaged - else if(m_spellInfo->SpellIconID == 1662 && m_spellInfo->AttributesEx & 0x20) // Blood Fury (Racial) - m_preCastSpell = 23230; // Blood Fury - Healing Reduction - break; - } - case SPELLFAMILY_MAGE: - { - if (m_spellInfo->SpellFamilyFlags[1] & 0x00000080) // Ice Block - m_preCastSpell = 41425; // Hypothermia - break; - } - case SPELLFAMILY_PRIEST: - { - if (m_spellInfo->Mechanic == MECHANIC_SHIELD && - m_spellInfo->SpellIconID == 566) // Power Word: Shield - m_preCastSpell = 6788; // Weakened Soul - if (m_spellInfo->Id == 47585) // Dispersion (transform) - m_preCastSpell = 60069; // Dispersion (mana regen) - break; - } - case SPELLFAMILY_PALADIN: - { - if (m_spellInfo->SpellFamilyFlags[0] & 0x400080) // Divine Shield, Divine Protection or Hand of Protection - m_preCastSpell = 25771; // Forbearance - break; - } - case SPELLFAMILY_SHAMAN: - { - if (m_spellInfo->Id == 2825) // Bloodlust - m_preCastSpell = 57724; // Sated - else if (m_spellInfo->Id == 32182) // Heroism - m_preCastSpell = 57723; // Exhaustion - break; - } - default: - break; + if (m_spellInfo->excludeCasterAuraSpell) + m_preCastSpell = m_spellInfo->excludeCasterAuraSpell; + else if (m_spellInfo->excludeTargetAuraSpell) + m_preCastSpell = m_spellInfo->excludeTargetAuraSpell; } + else if (m_spellInfo->Mechanic == MECHANIC_BANDAGE) // Bandages + m_preCastSpell = 11196; // Recently Bandaged + else if(m_spellInfo->SpellIconID == 1662 && m_spellInfo->AttributesEx & 0x20) + m_preCastSpell = 23230; // Blood Fury - Healing Reduction // traded items have trade slot instead of guid in m_itemTargetGUID // set to real guid to be sent later to the client diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 76b22dae176..27cbb0f3098 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4943,7 +4943,7 @@ void Aura::HandleNoReagentUseAura(bool Apply, bool Real) flag96 mask; Unit::AuraList const& noReagent = m_target->GetAurasByType(SPELL_AURA_NO_REAGENT_USE); for(Unit::AuraList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i) - mask = (*i)->m_spellProto->EffectSpellClassMask[(*i)->m_effIndex]; + mask |= (*i)->m_spellProto->EffectSpellClassMask[(*i)->m_effIndex]; m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1 , mask[0]); m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1+1, mask[1]); diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 3d7ead655f2..0e48871c8fd 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -346,8 +346,8 @@ inline bool IsElementalShield(SpellEntry const *spellInfo) { // family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus return (spellInfo->SpellFamilyFlags[1] & 0x420 - || spellInfo->SpellFamilyFlags[0] & 0x00000400 - || spellInfo->Id == 23552); + || spellInfo->SpellFamilyFlags[0] & 0x00000400) + || spellInfo->Id == 23552; } inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo) |