Fixed periodic damage for stackable auras (Deadly Poison...). Patch by Lyall. Closes issue #1368.
--HG-- branch : trunk
This commit is contained in:
@@ -3496,7 +3496,19 @@ void Unit::_AddAura(UnitAura * aura, Unit * caster)
|
||||
if (Aura * foundAura = GetOwnedAura(aura->GetId(), aura->GetCasterGUID(), 0, aura))
|
||||
{
|
||||
if (aura->GetSpellProto()->StackAmount)
|
||||
{
|
||||
aura->ModStackAmount(foundAura->GetStackAmount());
|
||||
|
||||
// Update periodic timers from the previous aura
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
AuraEffect *existingEff = foundAura->GetEffect(i);
|
||||
AuraEffect *newEff = aura->GetEffect(i);
|
||||
if (!existingEff || !newEff)
|
||||
continue;
|
||||
newEff->SetPeriodicTimer(existingEff->GetPeriodicTimer());
|
||||
}
|
||||
}
|
||||
|
||||
// Use the new one to replace the old one
|
||||
// This is the only place where AURA_REMOVE_BY_STACK should be used
|
||||
|
||||
Reference in New Issue
Block a user