mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10486] Use casterGUID check for delaying holder since possible stacking same spell from different casters
This commit is contained in:
parent
63cdd66bcb
commit
abbf4f5331
5 changed files with 10 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue