From b7ec91f72d640bb694b82b0adafaa66935174d42 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 5 Mar 2009 13:08:46 -0600 Subject: *Do not let farsight dynobj apply non-exist auras. This fixed farsight. --HG-- branch : trunk --- src/game/DynamicObject.cpp | 13 ++++++++----- src/game/SpellEffects.cpp | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index 0ae3656fc9d..fd3e16e79d7 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -113,12 +113,15 @@ void DynamicObject::Update(uint32 p_time) else deleteThis = true; - if(m_updateTimer < p_time) + if(m_effIndex < 4) { - Trinity::DynamicObjectUpdater notifier(*this,caster); - VisitNearbyObject(GetRadius(), notifier); - m_updateTimer = 500; // is this official-like? - }else m_updateTimer -= p_time; + if(m_updateTimer < p_time) + { + Trinity::DynamicObjectUpdater notifier(*this,caster); + VisitNearbyObject(GetRadius(), notifier); + m_updateTimer = 500; // is this official-like? + }else m_updateTimer -= p_time; + } if(deleteThis) { diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index dbdef569a5c..cad6190294d 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3485,7 +3485,7 @@ void Spell::EffectAddFarsight(uint32 i) float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); int32 duration = GetSpellDuration(m_spellInfo); DynamicObject* dynObj = new DynamicObject; - if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, i, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius)) + if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, 4, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius)) { delete dynObj; return; -- cgit v1.2.3