diff options
| author | QAston <qaston@gmail.com> | 2012-02-22 21:06:29 +0100 |
|---|---|---|
| committer | QAston <qaston@gmail.com> | 2012-02-22 21:06:29 +0100 |
| commit | fb5d05c1987df4fd4673e6f6831ce0579db9df2a (patch) | |
| tree | 7635797420846909e8114d882b10e437ee406e1f /src | |
| parent | a7e5c3c7c4a8b4e8f312c6334d890dcd56d2a0c1 (diff) | |
Core/Spells: Prevent assertion failure in Spell::SelectImplicitDestDestTargets by setting dest to caster if no dest provided.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/server/game/Spells/Spell.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index d4f23d1d68e..b4ee4febbef 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -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: |
