diff --git a/project/src/helpers/RagfairOfferHelper.ts b/project/src/helpers/RagfairOfferHelper.ts index 48eaa82d..8e7107ef 100644 --- a/project/src/helpers/RagfairOfferHelper.ts +++ b/project/src/helpers/RagfairOfferHelper.ts @@ -278,8 +278,14 @@ export class RagfairOfferHelper */ public increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void { - profile.characters.pmc.RagfairInfo.rating += this.ragfairConfig.sell.reputation.gain * amountToIncrementBy; profile.characters.pmc.RagfairInfo.isRatingGrowing = true; + if (isNaN(amountToIncrementBy)) + { + this.logger.warning(`Unable to increment ragfair rating, value was not a number: ${amountToIncrementBy}`); + + return; + } + profile.characters.pmc.RagfairInfo.rating += this.ragfairConfig.sell.reputation.gain * amountToIncrementBy; } /** diff --git a/project/src/helpers/RagfairSellHelper.ts b/project/src/helpers/RagfairSellHelper.ts index bcb04714..4ab4ce0b 100644 --- a/project/src/helpers/RagfairSellHelper.ts +++ b/project/src/helpers/RagfairSellHelper.ts @@ -80,7 +80,7 @@ export class RagfairSellHelper sellChancePercent = this.ragfairConfig.sell.chance.base; } - this.logger.debug(`Rolling to sell ${itemSellCount} items (chance: ${sellChancePercent}%)`); + this.logger.debug(`Rolling to sell: ${itemSellCount} items (chance: ${sellChancePercent}%)`); // No point rolling for a sale on a 0% chance item, exit early if (sellChancePercent === 0)