Core/Auras: Replenishment should stack duration, not several instances.

Patch by dr.tenma.
Fixes issue #4370.

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-12-04 10:59:06 -08:00
parent 3661ed8231
commit 1b5ff62314

View File

@@ -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;
}
}