From 110564e757fefbfbddfab876a96ca9eb5aa7dd7b Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 28 Dec 2020 11:29:33 +0100 Subject: [PATCH] Core/Vehicles: Treat entering other vehicles mounted on main vehicle as swapping seats --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index b9b599be9ea..bd05a5fbc41 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3023,7 +3023,10 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m caster->ToCreature()->DespawnOrUnsummon(); } - if (!(mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT)) + bool seatChange = (mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT) // Seat change on the same direct vehicle + || target->HasAuraType(SPELL_AURA_CONTROL_VEHICLE); // Seat change to a proxy vehicle (for example turret mounted on a siege engine) + + if (!seatChange) caster->_ExitVehicle(); else target->GetVehicleKit()->RemovePassenger(caster); // Only remove passenger from vehicle without launching exit movement or despawning the vehicle