aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsilinoron <none@none>2010-12-04 10:59:06 -0800
committersilinoron <none@none>2010-12-04 10:59:06 -0800
commit1b5ff6231432273cf39a0fb3adf8dcfa7e2c5c04 (patch)
treef6486485e5b40950f6e4c1ad85dcac702d9197b9 /src
parent3661ed82319c140b691006c61a0b14f475a367ad (diff)
Core/Auras: Replenishment should stack duration, not several instances.
Patch by dr.tenma. Fixes issue #4370. --HG-- branch : trunk
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 1ae359f38fa..e105da7ca4d 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2745,6 +2745,19 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
unitList.sort(Trinity::PowerPctOrderPred((Powers)power));
unitList.resize(maxSize);
}
+
+ // Replenishment: refresh existing auras
+ if (m_spellInfo->Id == 57669)
+ for (std::list<Unit *>::iterator itr = unitList.begin(); itr != unitList.end();)
+ if (AuraEffect *aurEff = (*itr)->GetAuraEffect(SPELL_AURA_PERIODIC_ENERGIZE, SPELLFAMILY_GENERIC, 3184, EFFECT_0))
+ {
+ aurEff->SetAmount((*itr)->GetMaxPower(POWER_MANA) * 25 / 10000);
+ aurEff->GetBase()->RefreshDuration();
+
+ itr = unitList.erase(itr);
+ }
+ else
+ ++itr;
}
}