diff options
author | QAston <qaston@gmail.com> | 2011-08-26 16:30:56 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-08-26 16:30:56 +0200 |
commit | 751cbaf307be93db8931dc6ee7e9e5cc6aefcbf4 (patch) | |
tree | 64b58143226c94718edbcef0ae589e885e4f62af /src | |
parent | 79427354aa8ae056f5750052133cd6b2b3bd5bb0 (diff) |
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.
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 |