[10999] Add teleport destination for TARGET_EFFECT_SELECT cases

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
Daggy 2011-01-11 09:26:43 +01:00 committed by NoFantasy
parent b7f4a41fcd
commit e9fc7d05b2
2 changed files with 13 additions and 1 deletions

View file

@ -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;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10998"
#define REVISION_NR "10999"
#endif // __REVISION_NR_H__