diff --git a/Libraries/SPTarkov.Server.Core/Extensions/VitalityExtensions.cs b/Libraries/SPTarkov.Server.Core/Extensions/VitalityExtensions.cs deleted file mode 100644 index b3839475..00000000 --- a/Libraries/SPTarkov.Server.Core/Extensions/VitalityExtensions.cs +++ /dev/null @@ -1,79 +0,0 @@ -using SPTarkov.Server.Core.Models.Eft.Common.Tables; -using SPTarkov.Server.Core.Models.Eft.Profile; - -namespace SPTarkov.Server.Core.Extensions -{ - public static class VitalityExtensions - { - public static void SetDefaults(this Vitality? vitality) - { - vitality ??= new Vitality - { - Health = null, - Energy = 0, - Temperature = 0, - Hydration = 0, - }; - - vitality.Health = new Dictionary - { - { - "Head", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "Chest", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "Stomach", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "LeftArm", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "RightArm", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "LeftLeg", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "RightLeg", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - }; - } - } -} diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Profile/SptProfile.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Profile/SptProfile.cs index 8b1ee037..42252d1a 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Profile/SptProfile.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Profile/SptProfile.cs @@ -34,9 +34,6 @@ public record SptProfile [JsonPropertyName("spt")] public Spt? SptData { get; set; } - [JsonPropertyName("vitality")] - public Vitality? VitalityData { get; set; } - [JsonPropertyName("inraid")] public Inraid? InraidData { get; set; } @@ -514,24 +511,6 @@ public record ReceivedGift public int? Current { get; set; } } -public record Vitality -{ - [JsonExtensionData] - public Dictionary? ExtensionData { get; set; } - - [JsonPropertyName("Hydration")] - public double? Hydration { get; set; } - - [JsonPropertyName("Energy")] - public double? Energy { get; set; } - - [JsonPropertyName("Temperature")] - public double? Temperature { get; set; } - - [JsonPropertyName("Health")] // This now does health and effects to each bodypart - public Dictionary? Health { get; set; } -} - public record Inraid { [JsonExtensionData] diff --git a/Libraries/SPTarkov.Server.Core/Routers/SaveLoad/HealthSaveLoadRouter.cs b/Libraries/SPTarkov.Server.Core/Routers/SaveLoad/HealthSaveLoadRouter.cs index af6af3b6..672cfa67 100644 --- a/Libraries/SPTarkov.Server.Core/Routers/SaveLoad/HealthSaveLoadRouter.cs +++ b/Libraries/SPTarkov.Server.Core/Routers/SaveLoad/HealthSaveLoadRouter.cs @@ -1,6 +1,5 @@ using SPTarkov.DI.Annotations; using SPTarkov.Server.Core.DI; -using SPTarkov.Server.Core.Models.Eft.Common.Tables; using SPTarkov.Server.Core.Models.Eft.Profile; namespace SPTarkov.Server.Core.Routers.SaveLoad; @@ -15,79 +14,6 @@ public class HealthSaveLoadRouter : SaveLoadRouter public override SptProfile HandleLoad(SptProfile profile) { - DefaultVitality(profile.VitalityData); - return profile; } - - public void DefaultVitality(Vitality? vitality) - { - vitality ??= new Vitality - { - Health = null, - Energy = 0, - Temperature = 0, - Hydration = 0, - }; - - vitality.Health = new Dictionary - { - { - "Head", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "Chest", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "Stomach", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "LeftArm", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "RightArm", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "LeftLeg", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - { - "RightLeg", - new BodyPartHealth - { - Health = new CurrentMinMax { Current = 0 }, - Effects = new Dictionary(), - } - }, - }; - } } diff --git a/Libraries/SPTarkov.Server.Core/Services/CreateProfileService.cs b/Libraries/SPTarkov.Server.Core/Services/CreateProfileService.cs index f4856ea5..c5272ace 100644 --- a/Libraries/SPTarkov.Server.Core/Services/CreateProfileService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/CreateProfileService.cs @@ -13,7 +13,6 @@ using SPTarkov.Server.Core.Routers; using SPTarkov.Server.Core.Servers; using SPTarkov.Server.Core.Utils; using SPTarkov.Server.Core.Utils.Cloners; -using Vitality = SPTarkov.Server.Core.Models.Eft.Profile.Vitality; namespace SPTarkov.Server.Core.Services; @@ -114,7 +113,6 @@ public class CreateProfileService( UserBuildData = profileTemplateClone.UserBuilds, DialogueRecords = profileTemplateClone.Dialogues, SptData = _profileHelper.GetDefaultSptDataObject(), - VitalityData = new Vitality(), InraidData = new Inraid(), InsuranceList = [], BtrDeliveryList = [],