aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-04 15:48:10 +0200
committerQAston <none@none>2009-05-04 15:48:10 +0200
commit6bee2f988af8da474ecebe776e61768bcc730f46 (patch)
tree85e81f2950ff1ae1f151c9f9f981b8e8e6c5ebd5 /src/game/Spell.cpp
parent30ac988ad3273d38ed9b32ba80822c04f87ae696 (diff)
*Do not take ammo for shockwave
*Do not check weapon skills for hits against players' summons *Apply range mods for channeled spell range check --HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 91d4fd0bc07..9d9c0ad6cc3 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -377,7 +377,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
m_attackType = BASE_ATTACK;
break;
case SPELL_DAMAGE_CLASS_RANGED:
- m_attackType = RANGED_ATTACK;
+ m_attackType = IsRangedSpell() ? RANGED_ATTACK : BASE_ATTACK;
break;
default:
// Wands
@@ -1345,7 +1345,10 @@ bool Spell::UpdateChanneledTargetList()
{
if(Aura * aur = unit->GetAura(m_spellInfo->Id, m_caster->GetGUID()))
{
- if (m_caster != unit && !m_caster->IsWithinDistInMap(unit,m_caster->GetSpellMaxRangeForTarget(unit,GetSpellRangeStore()->LookupEntry(m_spellInfo->rangeIndex))))
+ float range = m_caster->GetSpellMaxRangeForTarget(unit,GetSpellRangeStore()->LookupEntry(m_spellInfo->rangeIndex));
+ if(Player * modOwner = m_caster->GetSpellModOwner())
+ modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
+ if (m_caster != unit && !m_caster->IsWithinDistInMap(unit,range))
{
ihit->effectMask &= ~aur->GetEffectMask();
unit->RemoveAura(aur);