Changed flea rep gain code to use globals data instead of ragfair json
This commit is contained in:
parent
c64e5f7239
commit
002279c787
@ -12,10 +12,6 @@
|
||||
"min": 0,
|
||||
"max": 1.0
|
||||
},
|
||||
"reputation": {
|
||||
"gain": 0.0000002,
|
||||
"loss": 0.0000002
|
||||
},
|
||||
"expireSeconds": 71
|
||||
},
|
||||
"traders": {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user