From e9fc7d05b25a0a55e827aa3ae839d53b09d989d9 Mon Sep 17 00:00:00 2001 From: Daggy Date: Tue, 11 Jan 2011 09:26:43 +0100 Subject: [PATCH] [10999] Add teleport destination for TARGET_EFFECT_SELECT cases Signed-off-by: NoFantasy --- src/game/SpellEffects.cpp | 12 ++++++++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 30befc24f..38842856e 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3092,6 +3092,18 @@ void Spell::EffectTeleportUnits(SpellEffectIndex eff_idx) ((Player*)unitTarget)->TeleportTo(st->target_mapId,st->target_X,st->target_Y,st->target_Z,st->target_Orientation,unitTarget==m_caster ? TELE_TO_SPELL : 0); break; } + case TARGET_EFFECT_SELECT: + { + // m_destN filled, but sometimes for wrong dest and does not have TARGET_FLAG_DEST_LOCATION + + float x = unitTarget->GetPositionX(); + float y = unitTarget->GetPositionY(); + float z = unitTarget->GetPositionZ(); + float orientation = m_caster->GetOrientation(); + + m_caster->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster); + return; + } case TARGET_BEHIND_VICTIM: { Unit *pTarget = NULL; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ece1259eb..1ad420f5b 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10998" + #define REVISION_NR "10999" #endif // __REVISION_NR_H__