Core/Vehicles: Added new field CustomFlags to vehicle_template

Port From (https://github.com/TrinityCore/TrinityCore/commit/00eed485156963cab5caa75b8e36dd7a332a423e)
This commit is contained in:
Hondacrx
2025-08-20 22:05:25 -04:00
parent fc02d76af7
commit 09a90c4daf
2 changed files with 15 additions and 3 deletions
+12 -1
View File
@@ -389,7 +389,11 @@ namespace Game.Entities
// only for flyable vehicles
if (unit.IsFlying())
_me.CastSpell(unit, SharedConst.VehicleSpellParachute, true);
{
VehicleTemplate vehicleTemplate = Global.ObjectMgr.GetVehicleTemplate(this);
if (vehicleTemplate == null || !vehicleTemplate.CustomFlags.HasFlag(VehicleCustomFlags.DontForceParachuteOnExit))
_me.CastSpell(unit, SharedConst.VehicleSpellParachute, true);
}
if (_me.IsTypeId(TypeId.Unit) && _me.ToCreature().IsAIEnabled())
_me.ToCreature().GetAI().PassengerBoarded(unit, seat.Key, false);
@@ -828,10 +832,17 @@ namespace Game.Entities
public uint? RideSpellID;
}
public enum VehicleCustomFlags
{
None = 0x0,
DontForceParachuteOnExit = 0x1
}
public class VehicleTemplate
{
public TimeSpan DespawnDelay;
public float? Pitch;
public VehicleCustomFlags CustomFlags;
}
public class VehicleSeatAddon