aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorDrahy <none@none>2009-05-03 19:24:24 +0200
committerDrahy <none@none>2009-05-03 19:24:24 +0200
commit23933c7412a4ad81677a2d345bdb6f53f0d7dbe9 (patch)
treea7ba215204e4cc6c5b3f624cb4d18a7a17c945ef /src/game/Spell.cpp
parent260a864031c6c8b6ce1bfda2db4c2060c9437a90 (diff)
parent2e364b61027dc67ac729b96af290e25d2015db39 (diff)
* Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index ab48515053d..4c2fe39ee1b 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1983,7 +1983,7 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
m_damageMultipliers[i] = 1.0f;
m_applyMultiplierMask |= 1 << i;
- float radius;
+ float range;
std::list<Unit*> unitList;
switch(cur)
@@ -1991,17 +1991,17 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
case TARGET_UNIT_NEARBY_ENEMY:
case TARGET_UNIT_TARGET_ENEMY:
case TARGET_UNIT_NEARBY_ENTRY: // fix me
- radius = GetSpellRadius(m_spellInfo, i, false);
- if(modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius, this);
- SearchChainTarget(unitList, radius, maxTargets, SPELL_TARGETS_ENEMY);
+ range = GetSpellMaxRange(m_spellInfo, false);
+ if(modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
+ SearchChainTarget(unitList, range, maxTargets, SPELL_TARGETS_ENEMY);
break;
case TARGET_UNIT_CHAINHEAL:
case TARGET_UNIT_NEARBY_ALLY: // fix me
case TARGET_UNIT_NEARBY_ALLY_UNK:
case TARGET_UNIT_NEARBY_RAID:
- radius = GetSpellRadius(m_spellInfo, i, true);
- if(modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius, this);
- SearchChainTarget(unitList, radius, maxTargets, SPELL_TARGETS_CHAINHEAL);
+ range = GetSpellMaxRange(m_spellInfo, true);
+ if(modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
+ SearchChainTarget(unitList, range, maxTargets, SPELL_TARGETS_CHAINHEAL);
break;
}
@@ -2060,9 +2060,9 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
sLog.outErrorDb("Spell (ID: %u) (caster Entry: %u) does not have record in `spell_script_target`", m_spellInfo->Id, m_caster->GetEntry());
if(IsPositiveEffect(m_spellInfo->Id, i))
- SearchAreaTarget(unitList, radius, targetType, SPELL_TARGETS_ALLY);
+ SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ALLY);
else
- SearchAreaTarget(unitList, radius, targetType, SPELL_TARGETS_ENEMY);
+ SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENEMY);
}
// let it be done in one check?
else
@@ -2070,7 +2070,7 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
for(SpellScriptTarget::const_iterator i_spellST = lower; i_spellST != upper; ++i_spellST)
{
if(i_spellST->second.type == SPELL_TARGET_TYPE_CREATURE)
- SearchAreaTarget(unitList, radius, targetType, SPELL_TARGETS_ENTRY, i_spellST->second.targetEntry);
+ SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, i_spellST->second.targetEntry);
}
}
}