diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 228ad0a83..974c9a773 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -628,27 +628,20 @@ void Aura::Update(uint32 diff) return; } - // Get spell range - float radius; - SpellModOp mod; - if (m_spellProto->EffectRadiusIndex[GetEffIndex()]) + // need check distance for channeled target only + if (caster->GetChannelObjectGUID() == m_target->GetGUID()) { - radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellProto->EffectRadiusIndex[GetEffIndex()])); - mod = SPELLMOD_RADIUS; - } - else - { - radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->rangeIndex)); - mod = SPELLMOD_RANGE; - } + // Get spell range + float max_range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->rangeIndex)); - if(Player* modOwner = caster->GetSpellModOwner()) - modOwner->ApplySpellMod(GetId(), mod, radius, NULL); + if(Player* modOwner = caster->GetSpellModOwner()) + modOwner->ApplySpellMod(GetId(), SPELLMOD_RANGE, max_range, NULL); - if(!caster->IsWithinDistInMap(m_target, radius)) - { - m_target->RemoveAura(GetId(), GetEffIndex()); - return; + if(!caster->IsWithinDistInMap(m_target, max_range)) + { + m_target->RemoveAura(GetId(), GetEffIndex()); + return; + } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index fc0e7c3d2..ab8a2f4a2 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8983" + #define REVISION_NR "8984" #endif // __REVISION_NR_H__