Cast trader property to number before use

This commit is contained in:
Dev 2024-01-08 21:14:13 +00:00
parent c9de59b5bf
commit e18f75a60c

View File

@ -68,7 +68,7 @@ export class RepairService
const priceCoef = this.traderHelper.getLoyaltyLevel(traderId, pmcData).repair_price_coef;
const traderRepairDetails = this.traderHelper.getTrader(traderId, sessionID).repair;
const repairQualityMultiplier = traderRepairDetails.quality;
const repairQualityMultiplier = Number(traderRepairDetails.quality);
const repairRate = (priceCoef <= 0) ? 1 : (priceCoef / 100 + 1);
const itemToRepairDetails = this.databaseServer.getTables().templates.items[itemToRepair._tpl];