Refactor Json key name to offerCurrencyChancePercent

This commit is contained in:
R3ality
2025-07-27 13:36:38 +03:00
parent 7733d2df96
commit 82efbfc7db
3 changed files with 5 additions and 6 deletions
@@ -1,6 +1,5 @@
{
"dynamic": {
"_currencies": "what percentage of the offers are in each currency",
"armor": {
"plateSlotIdToRemovePool": [
"front_plate",
@@ -229,7 +228,7 @@
}
}
},
"currencies": {
"offerCurrencyChancePercent": {
"5449016a4bdc2d6f028b456f": 78,
"5696686a4bdc2da3298b456a": 14,
"569668774bdc2da2298b4568": 8
@@ -199,7 +199,7 @@ public class RagfairServerHelper(
/// <returns>Currency TPL</returns>
public MongoId GetDynamicOfferCurrency()
{
return weightedRandomHelper.GetWeightedValue(ragfairConfig.Dynamic.Currencies);
return weightedRandomHelper.GetWeightedValue(ragfairConfig.Dynamic.OfferCurrencyChangePercent);
}
/// <summary>
@@ -202,10 +202,10 @@ public record Dynamic
public Dictionary<MongoId, double>? ItemPriceMultiplier { get; set; }
/// <summary>
/// Percentages to sell offers in each currency
/// Percentage chance for offers to be listed in specified currency
/// </summary>
[JsonPropertyName("currencies")]
public required Dictionary<MongoId, double> Currencies { get; set; }
[JsonPropertyName("offerCurrencyChancePercent")]
public required Dictionary<MongoId, double> OfferCurrencyChangePercent { get; set; }
/// <summary>
/// Item tpls that should be forced to sell as a single item