mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/ICC: Fix teleporter not removing players from Gunship
A more generic solution might be better, maybe depending on spell flags
Ref #25652
(cherry picked from commit 0ad1854d1c)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user