Renamed variable to improve clarity

This commit is contained in:
Chomp
2025-11-04 09:47:22 +00:00
parent ca3c085e76
commit 21e5b5f0fc
@@ -772,7 +772,7 @@ public class RagfairController(
var offerRootItem = offer.Items.FirstOrDefault(x => x.Id == offerRequest.Items[0]);
// Get average of items quality+children
var qualityMultiplier = itemHelper.GetItemQualityModifierForItems(offer.Items, true);
var qualityMiltiplierForPlayerOffer = itemHelper.GetItemQualityModifierForItems(offer.Items, true);
// Player may be listing a custom weapon with non-standard mods, calculate the average price of the listed weapons' mods
if (itemHelper.IsOfBaseclass(offerRootItem.Template, BaseClasses.WEAPON))
@@ -789,13 +789,14 @@ public class RagfairController(
}
// Multiply single item price by quality
averageOfferPriceSingleItem *= qualityMultiplier;
// Target price is adjusted to match quality of player item to create better comparison
averageOfferPriceSingleItem *= qualityMiltiplierForPlayerOffer;
// Packs are reduced to the average price of a single item in the pack vs the averaged single price of an item
var sellChancePercent = ragfairSellHelper.CalculateSellChance(
averageOfferPriceSingleItem.Value,
playerListedPriceInRub,
qualityMultiplier
qualityMiltiplierForPlayerOffer
);
offer.SellResults = ragfairSellHelper.RollForSale(sellChancePercent, (int)stackCountTotal);