From dca9c4cc1f0229ab97dbe4e6e8486deaef978fcf Mon Sep 17 00:00:00 2001 From: QAston Date: Mon, 2 Feb 2009 17:42:05 +0100 Subject: *Remove hack from spell::cast. --HG-- branch : trunk --- src/game/Spell.cpp | 49 +++++++++---------------------------------------- 1 file changed, 9 insertions(+), 40 deletions(-) (limited to 'src/game/Spell.cpp') 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 -- cgit v1.2.3