aboutsummaryrefslogtreecommitdiff
path: root/src/game/GridNotifiersImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GridNotifiersImpl.h')
-rw-r--r--src/game/GridNotifiersImpl.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h
index 7726d5647bd..7b7911820c6 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,7 @@ 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());
+ target->AddAuraEffect(spellInfo, eff_index, i_dynobject.GetCaster());
i_dynobject.AddAffected(target);
}