Renamed Minmax to MinMaxDouble and added MinMaxInt
Swapped various doubles for ints across loot generator and airdrop code paths Fixed forced airdrop loot being returned with a decimal stack count
This commit is contained in:
@@ -388,7 +388,7 @@ public class BotController(
|
||||
};
|
||||
}
|
||||
|
||||
private MinMax? GetPmcConversionMinMaxForLocation(string? requestedBotRole, string? location)
|
||||
private MinMaxDouble? GetPmcConversionMinMaxForLocation(string? requestedBotRole, string? location)
|
||||
{
|
||||
return _pmcConfig.ConvertIntoPmcChance!.TryGetValue(location?.ToLower() ?? "", out var mapSpecificConversionValues)
|
||||
? mapSpecificConversionValues.GetValueOrDefault(requestedBotRole?.ToLower())
|
||||
@@ -409,7 +409,7 @@ public class BotController(
|
||||
return raidSettings;
|
||||
}
|
||||
|
||||
private MinMax? GetPmcLevelRangeForMap(string? location)
|
||||
private MinMaxDouble? GetPmcLevelRangeForMap(string? location)
|
||||
{
|
||||
return _pmcConfig.LocationSpecificPmcLevelOverride!.GetValueOrDefault(location?.ToLower() ?? "", null);
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ public class RagfairController
|
||||
if (offers.Count > 0)
|
||||
{
|
||||
// These get calculated while iterating through the list below
|
||||
var minMax = new MinMax(int.MaxValue, 0);
|
||||
var minMax = new MinMaxDouble(int.MaxValue, 0);
|
||||
|
||||
// Get the average offer price, excluding barter offers
|
||||
var average = GetAveragePriceFromOffers(offers, minMax, ignoreTraderOffers);
|
||||
@@ -398,7 +398,7 @@ public class RagfairController
|
||||
};
|
||||
}
|
||||
|
||||
private double GetAveragePriceFromOffers(List<RagfairOffer> offers, MinMax minMax, bool ignoreTraderOffers)
|
||||
private double GetAveragePriceFromOffers(List<RagfairOffer> offers, MinMaxDouble minMax, bool ignoreTraderOffers)
|
||||
{
|
||||
var sum = 0d;
|
||||
var totalOfferCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user