diff options
author | megamage <none@none> | 2009-03-12 14:22:59 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-12 14:22:59 -0600 |
commit | 16ee4a46c271bd7c234ffa7579f5f90cf2007772 (patch) | |
tree | 6d547d8228472fcc97ead5dfcdd8a9aaf8f70233 /src/game/GridNotifiersImpl.h | |
parent | 6e12d3f1b9f40f3f95390245f3fcbb30fbd8657f (diff) | |
parent | 1fbfc6da645058a6da3073dafde0e6bca621e31c (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/GridNotifiersImpl.h')
-rw-r--r-- | src/game/GridNotifiersImpl.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h index 9bf0bbe6fb3..33e3563ae7e 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, eff_index)) return; |