Changed flea rep gain code to use globals data instead of ragfair json

This commit is contained in:
Dev 2024-02-29 12:19:43 +00:00
parent c64e5f7239
commit 002279c787
3 changed files with 4 additions and 18 deletions

View File

@ -12,10 +12,6 @@
"min": 0,
"max": 1.0
},
"reputation": {
"gain": 0.0000002,
"loss": 0.0000002
},
"expireSeconds": 71
},
"traders": {

View File

@ -359,7 +359,8 @@ export class RagfairOfferHelper
return;
}
profile.characters.pmc.RagfairInfo.rating += this.ragfairConfig.sell.reputation.gain * amountToIncrementBy;
profile.characters.pmc.RagfairInfo.rating +=
this.databaseServer.getTables().globals.config.RagFair.ratingIncreaseCount + amountToIncrementBy;
}
/**
@ -670,10 +671,7 @@ export class RagfairOfferHelper
* @param offer The flea offer
* @returns True if the given item is functional
*/
public isItemFunctional(
offerRootItem: Item,
offer: IRagfairOffer
): boolean
public isItemFunctional(offerRootItem: Item, offer: IRagfairOffer): boolean
{
// Non-presets are always functional
if (!this.presetHelper.hasPreset(offerRootItem._tpl))
@ -685,7 +683,7 @@ export class RagfairOfferHelper
if (this.itemHelper.armorItemCanHoldMods(offerRootItem._tpl))
{
const offerRootTemplate = this.itemHelper.getItem(offerRootItem._tpl)[1];
const requiredPlateCount = offerRootTemplate._props.Slots?.filter(item => item._required)?.length;
const requiredPlateCount = offerRootTemplate._props.Slots?.filter((item) => item._required)?.length;
return offer.items.length > requiredPlateCount;
}

View File

@ -21,8 +21,6 @@ export interface Sell
chance: Chance;
/** Settings to control how long it takes for a player offer to sell */
time: MinMax;
/** Player offer reputation gain/loss settings */
reputation: Reputation;
/**Seconds from clicking remove to remove offer from market */
expireSeconds: number;
}
@ -39,12 +37,6 @@ export interface Chance
minSellChancePercent: number;
}
export interface Reputation
{
gain: number;
loss: number;
}
export interface Dynamic
{
// Should a purchased dynamic offers items be flagged as found in raid