mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +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;
|
return false;
|
||||||
|
|
||||||
if (!seat->second.IsEmpty())
|
if (!seat->second.IsEmpty())
|
||||||
{
|
return false;
|
||||||
if (Unit* passenger = ObjectAccessor::GetUnit(*GetBase(), seat->second.Passenger.Guid))
|
|
||||||
passenger->ExitVehicle();
|
|
||||||
|
|
||||||
seat->second.Passenger.Guid.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT(seat->second.IsEmpty());
|
ASSERT(seat->second.IsEmpty());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user