[10486] Use casterGUID check for delaying holder since possible stacking same spell from different casters

This commit is contained in:
Laise 2010-09-15 11:35:33 +02:00
parent 63cdd66bcb
commit abbf4f5331
5 changed files with 10 additions and 7 deletions

View file

@ -4783,11 +4783,14 @@ void Unit::RemoveAllAurasOnDeath()
}
}
void Unit::DelaySpellAuraHolder(uint32 spellId, int32 delaytime)
void Unit::DelaySpellAuraHolder(uint32 spellId, int32 delaytime, uint64 casterGUID)
{
SpellAuraHolderBounds bounds = GetSpellAuraHolderBounds(spellId);
for (SpellAuraHolderMap::iterator iter = bounds.first; iter != bounds.second; ++iter)
{
if (casterGUID != iter->second->GetCasterGUID())
continue;
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
{
if (Aura *aur = iter->second->GetAuraByEffectIndex(SpellEffectIndex(i)))
@ -4797,7 +4800,7 @@ void Unit::DelaySpellAuraHolder(uint32 spellId, int32 delaytime)
else
aur->SetAuraDuration(aur->GetAuraDuration() - delaytime);
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Spell %u partially interrupted on unit %u, new duration: %u ms",spellId, GetGUIDLow(), aur->GetAuraDuration());
DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "Spell %u, EffectIndex %u partially interrupted on unit %u, new duration: %u ms",spellId, i, GetGUIDLow(), aur->GetAuraDuration());
}
}
iter->second->SendAuraUpdate(false);