Added ability to ignore price variance based on item quality

This commit is contained in:
Dev 2024-10-26 09:57:49 +01:00
parent 38f20e76ea
commit e728c04865
3 changed files with 9 additions and 2 deletions

View File

@ -88,6 +88,11 @@
"max": 0.96 "max": 0.96
} }
}, },
"ignoreQualityPriceVarianceBlacklist": [
"59e3577886f774176a362503",
"5d02797c86f774203f38e30a",
"5ab8e79e86f7742d8b372e78"
],
"showDefaultPresetsOnly": true, "showDefaultPresetsOnly": true,
"endTimeSeconds": { "endTimeSeconds": {
"min": 360, "min": 360,

View File

@ -55,6 +55,8 @@ export interface IDynamic {
priceRanges: IPriceRanges; priceRanges: IPriceRanges;
/** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */
showDefaultPresetsOnly: boolean; showDefaultPresetsOnly: boolean;
/** Tpls that should not use the variable price system when their quality is < 100% (lower dura/uses = lower price) */
ignoreQualityPriceVarianceBlacklist: string[];
endTimeSeconds: MinMax; endTimeSeconds: MinMax;
/** Settings to control the durability range of item items listed on flea */ /** Settings to control the durability range of item items listed on flea */
condition: Condition; condition: Condition;

View File

@ -278,8 +278,8 @@ export class RagfairPriceService implements OnLoad {
price *= multiplier; price *= multiplier;
} }
// The quality of the item affects the price. // The quality of the item affects the price + not on the ignore list
if (item) { if (item && !this.ragfairConfig.dynamic.ignoreQualityPriceVarianceBlacklist.includes(itemTemplateId)) {
const qualityModifier = this.itemHelper.getItemQualityModifier(item); const qualityModifier = this.itemHelper.getItemQualityModifier(item);
price *= qualityModifier; price *= qualityModifier;
} }