string to mongoId changes
This commit is contained in:
@@ -248,7 +248,7 @@ public class RagfairServerHelper(
|
||||
/// </summary>
|
||||
/// <param name="itemParentType">Parent type for the item</param>
|
||||
/// <returns>randomised number between min and max</returns>
|
||||
public int GetOfferCountByBaseType(string itemParentType)
|
||||
public int GetOfferCountByBaseType(MongoId itemParentType)
|
||||
{
|
||||
if (!ragfairConfig.Dynamic.OfferItemCount.TryGetValue(itemParentType, out var minMaxRange))
|
||||
{
|
||||
|
||||
@@ -139,6 +139,7 @@ public record Dynamic
|
||||
|
||||
/// <summary>
|
||||
/// How many offers should be listed
|
||||
/// key can be mongoId or "default"
|
||||
/// </summary>
|
||||
[JsonPropertyName("offerItemCount")]
|
||||
public required Dictionary<string, MinMax<int>> OfferItemCount { get; set; }
|
||||
@@ -200,9 +201,6 @@ public record Dynamic
|
||||
[JsonPropertyName("itemPriceMultiplier")]
|
||||
public Dictionary<MongoId, double>? ItemPriceMultiplier { get; set; }
|
||||
|
||||
[JsonPropertyName("_currencies")]
|
||||
public string? CurrenciesDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Percentages to sell offers in each currency
|
||||
/// </summary>
|
||||
@@ -435,7 +433,7 @@ public record RagfairBlacklist
|
||||
/// Custom category blacklist for parent Ids
|
||||
/// </summary>
|
||||
[JsonPropertyName("customItemCategoryList")]
|
||||
public required HashSet<string> CustomItemCategoryList { get; set; }
|
||||
public required HashSet<MongoId> CustomItemCategoryList { get; set; }
|
||||
}
|
||||
|
||||
public record ArmorPlateBlacklistSettings
|
||||
@@ -498,7 +496,7 @@ public record ArmorSettings
|
||||
/// What slots are to be removed when removeRemovablePlateChance is true
|
||||
/// </summary>
|
||||
[JsonPropertyName("plateSlotIdToRemovePool")]
|
||||
public HashSet<string>? PlateSlotIdToRemovePool { get; set; }
|
||||
public HashSet<string> PlateSlotIdToRemovePool { get; set; }
|
||||
}
|
||||
|
||||
public record TieredFlea
|
||||
|
||||
@@ -69,7 +69,7 @@ public class RagfairOfferHolder(
|
||||
/// </summary>
|
||||
/// <param name="templateId">Tpl to get offers for</param>
|
||||
/// <returns>RagfairOffer list</returns>
|
||||
public List<RagfairOffer>? GetOffersByTemplate(string templateId)
|
||||
public List<RagfairOffer>? GetOffersByTemplate(MongoId templateId)
|
||||
{
|
||||
// Get the offerIds we want to return
|
||||
if (!_offersByTemplate.TryGetValue(templateId, out var offerIds))
|
||||
@@ -251,7 +251,7 @@ public class RagfairOfferHolder(
|
||||
/// <param name="template">Tpl to store offer against</param>
|
||||
/// <param name="offerId">Offer to store against tpl</param>
|
||||
/// <returns>True - offer was added</returns>
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user