mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-07-11 03:13:10 +00:00
fix(Core/Vehicle): no longer eject and overwrite an existing passenger (#25591)
Reject boarding a specific occupied seat instead of force-ejecting the current passenger. Followup to #25587 (Hyldnir Harpoon seat overwrite).
This commit is contained in:
@@ -359,12 +359,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
|
||||
return false;
|
||||
|
||||
if (!seat->second.IsEmpty())
|
||||
{
|
||||
if (Unit* passenger = ObjectAccessor::GetUnit(*GetBase(), seat->second.Passenger.Guid))
|
||||
passenger->ExitVehicle();
|
||||
|
||||
seat->second.Passenger.Guid.Clear();
|
||||
}
|
||||
return false;
|
||||
|
||||
ASSERT(seat->second.IsEmpty());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user