aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index f9c6b64e7f3..ca79aa1ac0e 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -778,6 +778,14 @@ void Spell::SelectSpellTargets()
if (m_spellInfo->IsChanneled())
{
+ // maybe do this for all spells?
+ if (m_UniqueTargetInfo.empty() && m_UniqueGOTargetInfo.empty() && m_UniqueItemInfo.empty() && !m_targets.HasDst())
+ {
+ SendCastResult(SPELL_FAILED_BAD_IMPLICIT_TARGETS);
+ finish(false);
+ return;
+ }
+
uint32 mask = (1 << effect->EffectIndex);
for (std::vector<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
@@ -1241,10 +1249,6 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
return;
float radius = effect->CalcRadius(m_caster) * m_spellValue->RadiusMod;
- // if this is a proximity based aoe (Frost Nova, Psychic Scream, ...), include the caster's own combat reach
- if (targetType.IsProximityBasedAoe())
- radius += GetCaster()->GetCombatReach();
-
SearchAreaTargets(targets, radius, center, referer, targetType.GetObjectType(), targetType.GetCheckType(), effect->ImplicitTargetConditions);
CallScriptObjectAreaTargetSelectHandlers(targets, effIndex, targetType);
@@ -2342,7 +2346,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
- if (!(target->effectMask & (1 << i)))
+ // in case of immunity, check all effects to choose correct procFlags, as none has technically hit
+ if (target->effectMask && !(target->effectMask & (1 << i)))
continue;
if (!m_spellInfo->IsPositiveEffect(i))