Fix bug in serviceBonus triggered when hitting file sharing level.

This commit is contained in:
Simon Marsh 2023-04-04 08:29:57 +01:00
parent 0949e23199
commit ef304dedb9

View File

@ -56,14 +56,14 @@ export class Bandwidth {
if (state.levels[i].unlocked) { if (state.levels[i].unlocked) {
let multiplier = state.ui.elapsed - state.levels[i].unlockTime let multiplier = state.ui.elapsed - state.levels[i].unlockTime
// multiplier = multiplier > 7200 ? 7200 : multiplier // multiplier = multiplier > 7200 ? 7200 : multiplier
bonus += (this.rate * BigInt(multiplier)) / BigInt(7200 / i) bonus += (this.rate * BigInt(multiplier)) / BigInt(Math.floor(7200 / i))
break break
} }
} }
if (state.services.time.level > 1) { if (state.services.time.level > 1) {
//let multiplier = state.ui.elapsed > 172800 ? 86400 : state.ui.elapsed //let multiplier = state.ui.elapsed > 172800 ? 86400 : state.ui.elapsed
let multiplier = state.ui.elapsed let multiplier = state.ui.elapsed
bonus += (this.rate * BigInt(multiplier)) / BigInt(86400/i) bonus += (this.rate * BigInt(multiplier)) / BigInt(Math.floor(86400/i))
} }
} }