Messed up the commit history, so here is all the files rip, Credit to TrinityCore

This commit is contained in:
hondacrx
2023-09-16 08:42:35 -04:00
parent 87284bbded
commit f636ea225f
373 changed files with 158910 additions and 2170 deletions
+9
View File
@@ -188,6 +188,15 @@ namespace Game.Entities
// We just remove the aura and the unapply handler will make the target leave the vehicle.
// We don't need to iterate over Seats
_me.RemoveAurasByType(AuraType.ControlVehicle);
// Aura script might cause the vehicle to be despawned in the middle of handling SPELL_AURA_CONTROL_VEHICLE removal
// In that case, aura effect has already been unregistered but passenger may still be found in Seats
foreach (var (_, seat) in Seats)
{
Unit passenger = Global.ObjAccessor.GetUnit(_me, seat.Passenger.Guid);
if (passenger != null)
passenger._ExitVehicle();
}
}
public bool HasEmptySeat(sbyte seatId)