[11847] Fix teleport spells with TargetType (TARGET_TABLE_X_Y_Z_COORDINATES, NO_TARGET)

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Schmoozerd 2011-11-15 19:55:35 +01:00
parent f4d862ac0a
commit a427718cab
3 changed files with 8 additions and 2 deletions

View file

@ -3600,7 +3600,12 @@ void Spell::EffectTeleportUnits(SpellEffectIndex eff_idx)
if(!unitTarget || unitTarget->IsTaxiFlying())
return;
switch (m_spellInfo->EffectImplicitTargetB[eff_idx])
// Target dependend on TargetB, if there is none provided, decide dependend on A
uint32 targetType = m_spellInfo->EffectImplicitTargetB[eff_idx];
if (!targetType)
targetType = m_spellInfo->EffectImplicitTargetA[eff_idx];
switch (targetType)
{
case TARGET_INNKEEPER_COORDINATES:
{