From 807cc460f85f48a36849033d3a9e8ac30872e239 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 16 Apr 2009 14:04:11 -0500 Subject: *A temp fix for broken taunt spell. *Note: sequence of applying effects is important for some spells. --HG-- branch : trunk --- src/game/Spell.cpp | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index ec07bde8f72..7bf965fb159 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1161,15 +1161,23 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) else m_caster->CastSpell(unit,m_preCastSpell, true, m_CastItem); } - uint8 t_effmask=0; - for (uint8 i=0;i<3;++i) + + uint8 aura_effmask = 0; + for (uint8 i = 0; i < 3; ++i) if (effectMask & (1<Effect[i] == SPELL_EFFECT_APPLY_AURA || IsAreaAuraEffect(m_spellInfo->Effect[i]))) - t_effmask |=1<IsAreaAura()) { @@ -1198,26 +1206,8 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) if (unit->AddAura(Aur)) m_spellAura = Aur; } - t_effmask = effectMask& ~t_effmask; - for(uint32 effectNumber=0;effectNumber<3;effectNumber++) - { - if (t_effmask & (1<DmgMultiplier[effectNumber]; - // Apply multiplier mods - if(m_originalCaster) - if(Player* modOwner = m_originalCaster->GetSpellModOwner()) - modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_EFFECT_PAST_FIRST, multiplier,this); - m_damageMultipliers[effectNumber] *= multiplier; - }*/ - } - } + //AI functions if(unit->GetTypeId() == TYPEID_UNIT && ((Creature*)unit)->IsAIEnabled) ((Creature*)unit)->AI()->SpellHit(m_caster, m_spellInfo); -- cgit v1.2.3