diff options
| author | Shauren <shauren.trinity@gmail.com> | 2013-10-22 17:02:01 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2013-10-22 17:02:01 +0200 |
| commit | 3e12fe84c860567b2a6097b99f202b56aaf51ccf (patch) | |
| tree | 56bde2453bd5d61ceb9f7dada01f555fbed22b28 /src/server/game/Spells/SpellEffects.cpp | |
| parent | 0cc32e28e3b101d9880753544cc97b6158eb24b4 (diff) | |
Core/Transports: Fixed players taking fall damage when teleporting from transports
Closes #11076
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 562d7fee518..0732c389bfa 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1150,10 +1150,15 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) orientation = m_targets.GetUnitTarget()->GetOrientation(); TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation); - if (mapid == unitTarget->GetMapId()) - unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster); - else if (unitTarget->GetTypeId() == TYPEID_PLAYER) + if (unitTarget->GetTypeId() == TYPEID_PLAYER) unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL : 0); + else if (mapid == unitTarget->GetMapId()) + unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster); + else + { + TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id); + return; + } // post effects for TARGET_DEST_DB switch (m_spellInfo->Id) |
