[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

@ -2705,6 +2705,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
targetUnitMap.push_back(owner); targetUnitMap.push_back(owner);
} }
break; break;
case SPELL_EFFECT_TELEPORT_UNITS:
case SPELL_EFFECT_SUMMON: case SPELL_EFFECT_SUMMON:
case SPELL_EFFECT_SUMMON_CHANGE_ITEM: case SPELL_EFFECT_SUMMON_CHANGE_ITEM:
case SPELL_EFFECT_TRANS_DOOR: case SPELL_EFFECT_TRANS_DOOR:

View file

@ -3600,7 +3600,12 @@ void Spell::EffectTeleportUnits(SpellEffectIndex eff_idx)
if(!unitTarget || unitTarget->IsTaxiFlying()) if(!unitTarget || unitTarget->IsTaxiFlying())
return; 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: case TARGET_INNKEEPER_COORDINATES:
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11846" #define REVISION_NR "11847"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__