mirror of
https://github.com/thepeacockproject/Peacock
synced 2024-11-22 22:12:45 +01:00
Fixed a nullability issue (#243)
This commit is contained in:
parent
35845c4b53
commit
75a4b259e4
@ -20,6 +20,7 @@ import { getUserData, writeUserData } from "./databaseHandler"
|
||||
import { getConfig } from "./configSwizzleManager"
|
||||
import { ContractProgressionData } from "./types/types"
|
||||
import { getFlag } from "./flags"
|
||||
import { EVERGREEN_LEVEL_INFO } from "./utils"
|
||||
|
||||
export async function setCpd(
|
||||
data: ContractProgressionData,
|
||||
@ -48,20 +49,13 @@ export async function getCpd(
|
||||
false,
|
||||
) as ContractProgressionData
|
||||
|
||||
//NOTE: Override the EvergreenLevel with the latest Mastery Level
|
||||
if (getFlag("gameplayUnlockAllFreelancerMasteries")) {
|
||||
//TODO: Get rid of hardcoded values
|
||||
userData.Extensions.CPD[cpdID]["EvergreenLevel"] = 100
|
||||
}
|
||||
|
||||
await setCpd(defaultCPD, uID, cpdID)
|
||||
return defaultCPD
|
||||
}
|
||||
|
||||
//NOTE: Override the EvergreenLevel with the latest Mastery Level
|
||||
if (getFlag("gameplayUnlockAllFreelancerMasteries")) {
|
||||
//TODO: Get rid of hardcoded values
|
||||
userData.Extensions.CPD[cpdID]["EvergreenLevel"] = 100
|
||||
userData.Extensions.CPD[cpdID]["EvergreenLevel"] =
|
||||
EVERGREEN_LEVEL_INFO.length
|
||||
}
|
||||
|
||||
return userData.Extensions.CPD[cpdID]
|
||||
|
Loading…
Reference in New Issue
Block a user