Repair buff changes:

Capitalize item buff properties to match live
tofixed(2) the bonus value to match live
This commit is contained in:
Dev 2024-11-05 15:11:20 +00:00
parent 2c198e4dd3
commit 6a5cbd0549
2 changed files with 9 additions and 10 deletions

View File

@ -54,10 +54,10 @@ export enum PinLockState {
} }
export interface IUpdBuff { export interface IUpdBuff {
rarity: string; Rarity: string;
buffType: string; BuffType: string;
value: number; Value: number;
thresholdDurability?: number; ThresholdDurability?: number;
} }
export interface IUpdTogglable { export interface IUpdTogglable {

View File

@ -481,12 +481,11 @@ export class RepairService {
const bonusThresholdPercent = this.randomUtil.getInt(bonusThresholdPercents.min, bonusThresholdPercents.max); const bonusThresholdPercent = this.randomUtil.getInt(bonusThresholdPercents.min, bonusThresholdPercents.max);
item.upd.Buff = { item.upd.Buff = {
rarity: bonusRarity, Rarity: bonusRarity,
buffType: bonusType, BuffType: bonusType,
value: bonusValue, Value: bonusValue,
thresholdDurability: this.randomUtil.getPercentOfValue( ThresholdDurability: Number(
bonusThresholdPercent, this.randomUtil.getPercentOfValue(bonusThresholdPercent, item.upd.Repairable.Durability, 2).toFixed(2),
item.upd.Repairable.Durability,
), ),
}; };
} }