diff options
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/go_icecrown_citadel_teleport.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/go_icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/go_icecrown_citadel_teleport.cpp index 1e4fd7a595e..7e1259fdcc4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/go_icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/go_icecrown_citadel_teleport.cpp @@ -26,6 +26,7 @@ #include "Spell.h" #include "SpellInfo.h" #include "SpellMgr.h" +#include "Transport.h" static std::vector<uint32> const TeleportSpells = { @@ -69,6 +70,11 @@ class icecrown_citadel_teleport : public GameObjectScript return true; } + // If the player is on the ship, Unit::NearTeleport() will try to keep the player on the ship, causing issues. + // For that we simply always remove the player from the ship. + if (Transport* transport = player->GetTransport()) + transport->RemovePassenger(player); + player->CastSpell(player, spell->Id, true); return true; } |