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.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h
index 4fe61076b18..b7660d90c3b 100644
--- a/src/game/GridNotifiersImpl.h
+++ b/src/game/GridNotifiersImpl.h
@@ -175,7 +175,18 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
if( target->GetTypeId()==TYPEID_PLAYER && target != i_check && (((Player*)target)->isGameMaster() || ((Player*)target)->GetVisibility()==VISIBILITY_OFF) )
return;
- if( i_check->GetTypeId()==TYPEID_PLAYER )
+ if (i_dynobject.IsAffecting(target))
+ return;
+
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
+ uint32 eff_index = i_dynobject.GetEffIndex();
+ if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_CHANNEL
+ || spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_GROUND)
+ {
+ if(!i_check->IsFriendlyTo(target))
+ return;
+ }
+ else if( i_check->GetTypeId()==TYPEID_PLAYER )
{
if (i_check->IsFriendlyTo( target ))
return;
@@ -186,11 +197,6 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
return;
}
- if (i_dynobject.IsAffecting(target))
- return;
-
- SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
- uint32 eff_index = i_dynobject.GetEffIndex();
// Check target immune to spell or aura
if (target->IsImmunedToSpell(spellInfo) || target->IsImmunedToSpellEffect(spellInfo->Effect[eff_index], spellInfo->EffectMechanic[eff_index]))
return;