Core/Vehicles: Prevent players from eating and drinking while on vehicles (#31367)

Don't drink and drive
This commit is contained in:
kik0
2025-11-11 13:58:00 -05:00
committed by GitHub
parent 70f1278c96
commit 2a0e9633b6

View File

@@ -851,6 +851,9 @@ bool VehicleJoinEvent::Execute(uint64, uint32)
player->SendOnCancelExpectedVehicleRideAura();
if (!veSeat->HasFlag(VEHICLE_SEAT_FLAG_B_KEEP_PET))
player->UnsummonPetTemporaryIfAny();
// This is not perfectly mirroring official behavior (aura removal is delayed, most likely on heartbeat)
player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_NOT_SEATED);
}
if (veSeat->HasFlag(VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE))