diff options
| author | QAston <none@none> | 2009-05-15 18:00:50 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2009-05-15 18:00:50 +0200 |
| commit | a796012723dd2410a150264a4f32f00bc570ef76 (patch) | |
| tree | d55cada7db3c9c752815c79d9d164069acd99edc /src/game/GridNotifiersImpl.h | |
| parent | ae461a4158d6376e28e7bc53d3f7ad5690a5064e (diff) | |
| parent | ad92f5e210b7a2c0584cdabd30560fe723d160be (diff) | |
*Merge some fixes from tc1
--HG--
branch : trunk
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); } |
