diff --git a/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs index edf8f073..4c1b4a45 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs @@ -503,7 +503,7 @@ public class LocationLootGenerator( { X = result.X, Y = result.Y, - R = result.Rotation.GetValueOrDefault(false) ? 1 : 0 + R = result.Rotation.GetValueOrDefault(false) ? ItemRotation.Vertical : ItemRotation.Horizontal }; // Add loot to container before returning diff --git a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs index bb25ed63..1873ea63 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs @@ -651,7 +651,7 @@ public class BotGeneratorHelper( { X = findSlotResult.X, Y = findSlotResult.Y, - R = findSlotResult.Rotation ?? false ? 1 : 0 + R = findSlotResult.Rotation ?? false ? ItemRotation.Vertical : ItemRotation.Horizontal } ; } diff --git a/Libraries/SPTarkov.Server.Core/Helpers/InventoryHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/InventoryHelper.cs index 3b6ab782..64063bc1 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/InventoryHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/InventoryHelper.cs @@ -324,7 +324,7 @@ public class InventoryHelper( { X = findSlotResult.X, Y = findSlotResult.Y, - R = findSlotResult.Rotation.GetValueOrDefault(false) ? 1 : 0, + R = findSlotResult.Rotation.GetValueOrDefault(false) ? ItemRotation.Vertical : ItemRotation.Horizontal, Rotation = findSlotResult.Rotation }; @@ -382,7 +382,7 @@ public class InventoryHelper( { X = findSlotResult.X, Y = findSlotResult.Y, - R = findSlotResult.Rotation.Value ? 1 : 0, + R = findSlotResult.Rotation.Value ? ItemRotation.Vertical : ItemRotation.Horizontal, Rotation = findSlotResult.Rotation }; @@ -423,7 +423,7 @@ public class InventoryHelper( { X = findSortingSlotResult.X, Y = findSortingSlotResult.Y, - R = findSortingSlotResult.Rotation.Value ? 1 : 0, + R = findSortingSlotResult.Rotation.Value ? ItemRotation.Vertical : ItemRotation.Horizontal, Rotation = findSortingSlotResult.Rotation }; } diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Item.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Item.cs index 2fc37124..e4a98e80 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Item.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/Item.cs @@ -176,13 +176,6 @@ public record ItemLocation set; } - [JsonPropertyName("r")] - public int R - { - get; - set; - } - [JsonPropertyName("isSearched")] public bool? IsSearched { @@ -199,6 +192,22 @@ public record ItemLocation get; set; } + + [JsonPropertyName("r")] + [JsonConverter(typeof(JsonStringEnumConverter))] + public ItemRotation R + { + get; + set; + } +} + +public enum ItemRotation +{ + // Token: 0x0400259F RID: 9631 + Horizontal, + // Token: 0x040025A0 RID: 9632 + Vertical } public record Upd