From 751cbaf307be93db8931dc6ee7e9e5cc6aefcbf4 Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 26 Aug 2011 16:30:56 +0200 Subject: Core/Spells: Fix a typo (!GetDst() instead of !HasDst()) which prevented from automatical lconverion of spell unit target to destination target (this is only used in script casts). Closes #2761. --- src/server/game/Spells/Spell.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index f2e491eab79..6c7a0411812 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -667,10 +667,10 @@ void Spell::InitExplicitTargets(SpellCastTargets const& targets) if (neededTargets & TARGET_FLAG_DEST_LOCATION) { // and target isn't set - if (!targets.GetDst()) + if (!m_targets.HasDst()) { // try to use unit target if provided - if (Unit* target = targets.GetUnitTarget()) + if (WorldObject* target = targets.GetObjectTarget()) m_targets.SetDst(*target); // or use self if not available else @@ -682,7 +682,7 @@ void Spell::InitExplicitTargets(SpellCastTargets const& targets) if (neededTargets & TARGET_FLAG_SOURCE_LOCATION) { - if (!targets.GetSrc()) + if (!targets.HasSrc()) m_targets.SetSrc(*m_caster); } else -- cgit v1.2.3