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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 6d34d29b644..77fbf5e3380 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -408,6 +408,13 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
}
}
+ if(!m_targets.getUnitTargetGUID() && m_spellInfo->Targets & TARGET_FLAG_UNIT)
+ {
+ if(Unit *target = ObjectAccessor::GetUnit(*m_caster, m_caster->GetUInt64Value(UNIT_FIELD_TARGET)))
+ if(IsValidSingleTargetSpell(target))
+ m_targets.setUnitTarget(target);
+ }
+
CleanupTargetList();
}