diff --git a/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs index f80c88de..22c8808e 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/RagfairServerHelper.cs @@ -248,7 +248,7 @@ public class RagfairServerHelper( /// /// Parent type for the item /// randomised number between min and max - public int GetOfferCountByBaseType(string itemParentType) + public int GetOfferCountByBaseType(MongoId itemParentType) { if (!ragfairConfig.Dynamic.OfferItemCount.TryGetValue(itemParentType, out var minMaxRange)) { diff --git a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs index fcb2726e..1a541a02 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Spt/Config/RagfairConfig.cs @@ -139,6 +139,7 @@ public record Dynamic /// /// How many offers should be listed + /// key can be mongoId or "default" /// [JsonPropertyName("offerItemCount")] public required Dictionary> OfferItemCount { get; set; } @@ -200,9 +201,6 @@ public record Dynamic [JsonPropertyName("itemPriceMultiplier")] public Dictionary? ItemPriceMultiplier { get; set; } - [JsonPropertyName("_currencies")] - public string? CurrenciesDescription { get; set; } - /// /// Percentages to sell offers in each currency /// @@ -435,7 +433,7 @@ public record RagfairBlacklist /// Custom category blacklist for parent Ids /// [JsonPropertyName("customItemCategoryList")] - public required HashSet CustomItemCategoryList { get; set; } + public required HashSet CustomItemCategoryList { get; set; } } public record ArmorPlateBlacklistSettings @@ -498,7 +496,7 @@ public record ArmorSettings /// What slots are to be removed when removeRemovablePlateChance is true /// [JsonPropertyName("plateSlotIdToRemovePool")] - public HashSet? PlateSlotIdToRemovePool { get; set; } + public HashSet PlateSlotIdToRemovePool { get; set; } } public record TieredFlea diff --git a/Libraries/SPTarkov.Server.Core/Utils/RagfairOfferHolder.cs b/Libraries/SPTarkov.Server.Core/Utils/RagfairOfferHolder.cs index 86daca33..7daa7b64 100644 --- a/Libraries/SPTarkov.Server.Core/Utils/RagfairOfferHolder.cs +++ b/Libraries/SPTarkov.Server.Core/Utils/RagfairOfferHolder.cs @@ -69,7 +69,7 @@ public class RagfairOfferHolder( /// /// Tpl to get offers for /// RagfairOffer list - public List? GetOffersByTemplate(string templateId) + public List? GetOffersByTemplate(MongoId templateId) { // Get the offerIds we want to return if (!_offersByTemplate.TryGetValue(templateId, out var offerIds)) @@ -251,7 +251,7 @@ public class RagfairOfferHolder( /// Tpl to store offer against /// Offer to store against tpl /// True - offer was added - protected bool AddOfferByTemplates(string template, string offerId) + protected bool AddOfferByTemplates(MongoId template, MongoId offerId) { // Look for hashset for tpl first if (_offersByTemplate.TryGetValue(template, out var offerIds))