aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index db3d05036f6..4cd3a5d298a 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2021,8 +2021,7 @@ void Spell::SetTargetMap(uint32 i, uint32 cur)
float range = GetSpellMaxRange(m_spellInfo, IsPositiveSpell(m_spellInfo->Id));
if(modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- WorldObject *target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY);
- if(target)
+ if(WorldObject *target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY))
m_targets.setDestination(target);
break;
}