diff --git a/project/src/helpers/ItemHelper.ts b/project/src/helpers/ItemHelper.ts index d34785b8..2de92170 100644 --- a/project/src/helpers/ItemHelper.ts +++ b/project/src/helpers/ItemHelper.ts @@ -854,7 +854,7 @@ class ItemHelper */ public isAttachmentAttached(item: Item): boolean { - return item.slotId !== "hideout" && item.slotId !== "main" && isNaN(Number(item.slotId)); + return item.slotId !== "hideout" && item.slotId !== "main" && Number.isNaN(Number(item.slotId)); } /** diff --git a/project/src/helpers/RagfairOfferHelper.ts b/project/src/helpers/RagfairOfferHelper.ts index 45f2e7d4..6543ad18 100644 --- a/project/src/helpers/RagfairOfferHelper.ts +++ b/project/src/helpers/RagfairOfferHelper.ts @@ -297,7 +297,7 @@ export class RagfairOfferHelper public increaseProfileRagfairRating(profile: IAkiProfile, amountToIncrementBy: number): void { profile.characters.pmc.RagfairInfo.isRatingGrowing = true; - if (isNaN(amountToIncrementBy)) + if (Number.isNaN(amountToIncrementBy)) { this.logger.warning(`Unable to increment ragfair rating, value was not a number: ${amountToIncrementBy}`); @@ -595,7 +595,7 @@ export class RagfairOfferHelper return false; } - if (isNaN(offer.requirementsCost)) + if (Number.isNaN(offer.requirementsCost)) { // don't include offers with null or NaN in it return false; diff --git a/project/src/helpers/RagfairSellHelper.ts b/project/src/helpers/RagfairSellHelper.ts index 43f95f93..12d0ba55 100644 --- a/project/src/helpers/RagfairSellHelper.ts +++ b/project/src/helpers/RagfairSellHelper.ts @@ -77,7 +77,7 @@ export class RagfairSellHelper const result: SellResult[] = []; // Value can sometimes be NaN for whatever reason, default to base chance if that happens - if (isNaN(sellChancePercent)) + if (Number.isNaN(sellChancePercent)) { this.logger.warning(`Sell chance was not a number: ${sellChancePercent}, defaulting to ${this.ragfairConfig.sell.chance.base} %`); sellChancePercent = this.ragfairConfig.sell.chance.base; diff --git a/project/src/services/ProfileFixerService.ts b/project/src/services/ProfileFixerService.ts index de0a45d7..24cf3994 100644 --- a/project/src/services/ProfileFixerService.ts +++ b/project/src/services/ProfileFixerService.ts @@ -970,7 +970,7 @@ export class ProfileFixerService public fixIncorrectAidValue(fullProfile: IAkiProfile): void { // Not a number, regenerate - if (isNaN(fullProfile.characters.pmc.aid)) + if (Number.isNaN(fullProfile.characters.pmc.aid)) { fullProfile.characters.pmc.sessionId = fullProfile.characters.pmc.aid; fullProfile.characters.pmc.aid = this.hashUtil.generateAccountId();