public void LoadSpeed()
{
// only load speed if you dont use custom speed
if (!IsVehicled && !IsCustomSpeed)
{
Speed = CharacterHelper.SpeedData[(byte)Class];
if (UseSp)
{
SpecialistInstance specialist = Inventory?.LoadBySlotAndType<SpecialistInstance>((byte)EquipmentType.Sp, InventoryType.Wear);
if (specialist != null)
{
Speed += specialist.Item.Speed;
}
}
}
if (IsShopping)
{
Speed = 0;
IsCustomSpeed = false;
return;
}
// reload vehicle speed after opening an shop for instance
if (IsVehicled)
{
Speed = VehicleSpeed;
}
}