From 6a5cbd05492a822711bf7b207ea65740dd4c4138 Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 5 Nov 2024 15:11:20 +0000 Subject: [PATCH] Repair buff changes: Capitalize item buff properties to match live tofixed(2) the bonus value to match live --- project/src/models/eft/common/tables/IItem.ts | 8 ++++---- project/src/services/RepairService.ts | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/project/src/models/eft/common/tables/IItem.ts b/project/src/models/eft/common/tables/IItem.ts index 21820ab7..9b0aa77c 100644 --- a/project/src/models/eft/common/tables/IItem.ts +++ b/project/src/models/eft/common/tables/IItem.ts @@ -54,10 +54,10 @@ export enum PinLockState { } export interface IUpdBuff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + Rarity: string; + BuffType: string; + Value: number; + ThresholdDurability?: number; } export interface IUpdTogglable { diff --git a/project/src/services/RepairService.ts b/project/src/services/RepairService.ts index 12f7a31e..00a85e41 100644 --- a/project/src/services/RepairService.ts +++ b/project/src/services/RepairService.ts @@ -481,12 +481,11 @@ export class RepairService { const bonusThresholdPercent = this.randomUtil.getInt(bonusThresholdPercents.min, bonusThresholdPercents.max); item.upd.Buff = { - rarity: bonusRarity, - buffType: bonusType, - value: bonusValue, - thresholdDurability: this.randomUtil.getPercentOfValue( - bonusThresholdPercent, - item.upd.Repairable.Durability, + Rarity: bonusRarity, + BuffType: bonusType, + Value: bonusValue, + ThresholdDurability: Number( + this.randomUtil.getPercentOfValue(bonusThresholdPercent, item.upd.Repairable.Durability, 2).toFixed(2), ), }; }