From 9ba44b7eb8416fe5f32f5ba9b6827cb36cb655de Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 10 Apr 2009 14:35:17 +0200 Subject: *Make shattered barrier and prayer of mending work again, Refresh aura when recasted on target with full stackamount. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/game/SpellAuras.cpp') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index c4857fc9ccf..063450b471a 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1192,22 +1192,23 @@ void Aura::SetStackAmount(uint8 stackAmount) { Unit *target = GetTarget(); Unit *caster = GetCaster(); - if (!target || !caster) - return; - m_stackAmount = stackAmount; - for (uint8 i=0;iCalculateSpellDamage(m_spellProto, part->GetEffIndex(), part->GetBasePoints(), target); - // Reapply if amount change - if (amount!=part->GetAmount()) + if (AuraEffect * part = GetPartAura(i)) { - bool Real = bool (part->m_spellmod); - // Auras which are applying spellmod should have removed spellmods for real - part->ApplyModifier(false,Real); - part->SetAmount(amount); - part->ApplyModifier(true, Real); + int32 amount = m_stackAmount * caster->CalculateSpellDamage(m_spellProto, part->GetEffIndex(), part->GetBasePoints(), target); + // Reapply if amount change + if (amount!=part->GetAmount()) + { + bool Real = bool (part->m_spellmod); + // Auras which are applying spellmod should have removed spellmods for real + part->ApplyModifier(false,Real); + part->SetAmount(amount); + part->ApplyModifier(true, Real); + } } } } -- cgit v1.2.3