diff options
Diffstat (limited to 'src/game/GridNotifiersImpl.h')
-rw-r--r-- | src/game/GridNotifiersImpl.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h index 7726d5647bd..12f3706c4e2 100644 --- a/src/game/GridNotifiersImpl.h +++ b/src/game/GridNotifiersImpl.h @@ -178,8 +178,11 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target) if (i_dynobject.IsAffecting(target)) return; - SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId()); uint32 eff_index = i_dynobject.GetEffIndex(); + if(target->HasAuraEffect(i_dynobject.GetSpellId(), eff_index, i_check->GetGUID())) + return; + + SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId()); if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_DEST_DYNOBJ_ALLY || spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_DST) { @@ -205,7 +208,9 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target) if (target->IsImmunedToSpell(spellInfo) || target->IsImmunedToSpellEffect(spellInfo, eff_index)) return; // Apply PersistentAreaAura on target - target->AddAuraEffect(spellInfo->Id, eff_index, i_dynobject.GetCaster()); + if(Aura *aur = target->AddAuraEffect(spellInfo, eff_index, i_dynobject.GetCaster())) + aur->SetAuraDuration(i_dynobject.GetDuration()); + i_dynobject.AddAffected(target); } |