Core/Spells: Prevent assertion failure in Spell::SelectImplicitDestDestTargets by setting dest to caster if no dest provided.

This commit is contained in:
QAston
2012-02-22 21:06:29 +01:00
parent a7e5c3c7c4
commit fb5d05c198

View File

@@ -1441,6 +1441,13 @@ void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplici
void Spell::SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
{
// set destination to caster if no dest provided
// can only happen if previous destination target could not be set for some reason
// (not found nearby target, or channel target for example
// maybe we should abort the spell in such case?
if (!m_targets.HasDst())
m_targets.SetDst(*m_caster);
switch(targetType.GetTarget())
{
case TARGET_DEST_DYNOBJ_ENEMY: