aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Object.h2
-rw-r--r--src/game/SpellAuras.cpp11
2 files changed, 7 insertions, 6 deletions
diff --git a/src/game/Object.h b/src/game/Object.h
index 328df30492a..9fc799ef235 100644
--- a/src/game/Object.h
+++ b/src/game/Object.h
@@ -411,7 +411,7 @@ class TRINITY_DLL_SPEC WorldObject : public Object
float GetObjectSize() const
{
- return ( m_valuesCount > UNIT_FIELD_BOUNDINGRADIUS ) ? m_floatValues[UNIT_FIELD_BOUNDINGRADIUS] : DEFAULT_WORLD_OBJECT_SIZE;
+ return ( m_valuesCount > UNIT_FIELD_COMBATREACH ) ? m_floatValues[UNIT_FIELD_COMBATREACH] : DEFAULT_WORLD_OBJECT_SIZE;
}
bool IsPositionValid() const;
void UpdateGroundPositionZ(float x, float y, float &z) const;
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 64e8887fd15..b3ee5acbe3b 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -543,7 +543,11 @@ void Aura::Update(uint32 diff)
}
// Channeled aura required check distance from caster except in possessed cases
- if(IsChanneledSpell(m_spellProto) && m_caster_guid != m_target->GetGUID() && !m_target->isPossessed())
+ Unit *pRealTarget = (GetSpellProto()->EffectApplyAuraName[GetEffIndex()] == SPELL_AURA_PERIODIC_TRIGGER_SPELL) ? GetTriggerTarget() : m_target;
+ if(!pRealTarget)
+ return;
+
+ if(IsChanneledSpell(m_spellProto) && !pRealTarget->isPossessed() && pRealTarget->GetGUID() != GetCasterGUID())
{
Unit* caster = GetCaster();
if(!caster)
@@ -569,11 +573,8 @@ void Aura::Update(uint32 diff)
if(Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(GetId(), mod, radius,NULL);
- if(!caster->IsWithinDistInMap(m_target,radius))
- {
- m_target->RemoveAura(GetId(),GetEffIndex());
+ if(!caster->IsWithinDistInMap(pRealTarget, radius))
return;
- }
}
if(m_isPeriodic && (m_duration >= 0 || m_isPassive || m_permanent))