diff options
author | megamage <none@none> | 2009-03-12 09:15:30 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-12 09:15:30 -0600 |
commit | e6f7a6079298619862c56905dbd7c7b6968e1730 (patch) | |
tree | 5698e24a023a40877ea7b736b6d830a7f8eba7dc /src/game/GridNotifiersImpl.h | |
parent | a9f77d07caf00771bebd37e786873f3188bc9af6 (diff) |
*Let persistant auras affect ally targets in some cases.
--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 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; |