From 63b4a12251345f6bd7c4e85d9acc63ad6ca64cb9 Mon Sep 17 00:00:00 2001 From: QAston Date: Sun, 8 Mar 2009 01:16:57 +0100 Subject: *Fix Incanter's Absorption. *Fix Devastate and Improved Fear- by Lightguard. *Fix Glyph of devastate. *Add spell coeficient-by cccyril. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/game/SpellEffects.cpp') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 3715e5d0b4f..caf33897be9 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4332,9 +4332,12 @@ void Spell::SpellDamageWeaponDmg(uint32 i) case SPELLFAMILY_WARRIOR: { // Devastate bonus and sunder armor refresh - if(m_spellInfo->SpellVisual[0] == 671 && m_spellInfo->SpellIconID == 1508) + if(m_spellInfo->SpellFamilyFlags[1] & 0x40) { + if (m_caster->GetTypeId()!=TYPEID_PLAYER) + return; uint32 stack = 0; + int32 maxStack = 0; Unit::AuraList const& list = unitTarget->GetAurasByType(SPELL_AURA_MOD_RESISTANCE); for(Unit::AuraList::const_iterator itr=list.begin();itr!=list.end();++itr) { @@ -4345,6 +4348,9 @@ void Spell::SpellDamageWeaponDmg(uint32 i) { (*itr)->RefreshAura(); stack = (*itr)->GetStackAmount(); + maxStack = proto->StackAmount; + + ((Player*)m_caster)->ApplySpellMod(proto->Id, SPELLMOD_CHARGES, maxStack, this); break; } } @@ -4358,7 +4364,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i) } } - if(stack < 5) + if(stack < maxStack) { // get highest rank of the Sunder Armor spell const PlayerSpellMap& sp_list = ((Player*)m_caster)->GetSpellMap(); -- cgit v1.2.3