aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwin32 <none@none>2009-12-17 13:30:40 +0200
committerwin32 <none@none>2009-12-17 13:30:40 +0200
commit087352a367f619f093e3fcae757fefadacfb9f12 (patch)
tree115fa88614eee17520c3f845527157e8d3e7b69a /src
parentb6c67d9202cfae59dcc15f30eeb8c381d9fd7d47 (diff)
speed-up code,Thanks QAtson.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 3d6d3ca8671..3f90a52c7df 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2822,12 +2822,14 @@ void Spell::SpellDamageHeal(uint32 /*i*/)
{
addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL);
- Unit::AuraEffectList const& Periodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_HEAL);
- for (Unit::AuraEffectList::const_iterator i = Periodic.begin(); i != Periodic.end(); ++i)
+ if (AuraEffect const* aurEff = m_caster->GetAuraEffect(62971, 0))
{
- if (m_caster->HasAura(62971))
+ Unit::AuraEffectList const& Periodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_HEAL);
+ for (Unit::AuraEffectList::const_iterator i = Periodic.begin(); i != Periodic.end(); ++i)
+ {
if (m_caster->GetGUID() == (*i)->GetCasterGUID())
- addhealth += addhealth * (*i)->GetParentAura()->GetStackAmount() * 0.06f;
+ addhealth += addhealth * (*i)->GetParentAura()->GetStackAmount() * aurEff->GetAmount() / 100;
+ }
}
}
// Riptide - increase healing done by Chain Heal