Skip to content

Commit 751cbaf

Browse files
committed
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.
1 parent 7942735 commit 751cbaf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/server/game/Spells/Spell.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,10 @@ void Spell::InitExplicitTargets(SpellCastTargets const& targets)
667667
if (neededTargets & TARGET_FLAG_DEST_LOCATION)
668668
{
669669
// and target isn't set
670-
if (!targets.GetDst())
670+
if (!m_targets.HasDst())
671671
{
672672
// try to use unit target if provided
673-
if (Unit* target = targets.GetUnitTarget())
673+
if (WorldObject* target = targets.GetObjectTarget())
674674
m_targets.SetDst(*target);
675675
// or use self if not available
676676
else
@@ -682,7 +682,7 @@ void Spell::InitExplicitTargets(SpellCastTargets const& targets)
682682

683683
if (neededTargets & TARGET_FLAG_SOURCE_LOCATION)
684684
{
685-
if (!targets.GetSrc())
685+
if (!targets.HasSrc())
686686
m_targets.SetSrc(*m_caster);
687687
}
688688
else

0 commit comments

Comments
 (0)