diff --git a/src/controllers/api/missionInventoryUpdateController.ts b/src/controllers/api/missionInventoryUpdateController.ts index c444bf9a..16eeb0e4 100644 --- a/src/controllers/api/missionInventoryUpdateController.ts +++ b/src/controllers/api/missionInventoryUpdateController.ts @@ -25,13 +25,13 @@ import { IMissionInventoryUpdate } from "@/src/types/missionInventoryUpdateType" - [ ] hosts - [x] ChallengeProgress - [ ] SeasonChallengeHistory -- [ ] PS (Passive anti-cheat data which includes your username, module list, process list, and system name. @nk for more info.) +- [ ] PS (Passive anti-cheat data which includes your username, module list, process list, and system name.) - [ ] ActiveDojoColorResearch - [ ] RewardInfo - [ ] ReceivedCeremonyMsg - [ ] LastCeremonyResetDate -- [ ] MissionPTS (Used to validate the mission/alive time above. @nk for more info.) -- [ ] RepHash (A hash from the replication manager/RepMgr (IDA search it). Unknown what it does.) +- [ ] MissionPTS (Used to validate the mission/alive time above.) +- [ ] RepHash (A hash from the replication manager/RepMgr Unknown what it does.) - [ ] EndOfMatchUpload - [ ] ObjectiveReached - [ ] FpsAvg diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index d12a0104..565dd910 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -87,14 +87,14 @@ export const updateGeneric = async (data: IGenericUpdate, accountId: string) => // Make it an array for easier parsing. if (typeof data.NodeIntrosCompleted === "string") { - data.NodeIntrosCompleted = [ data.NodeIntrosCompleted ]; + data.NodeIntrosCompleted = [data.NodeIntrosCompleted]; } // Combine the two arrays into one. data.NodeIntrosCompleted = inventory.NodeIntrosCompleted.concat(data.NodeIntrosCompleted); // Remove duplicate entries. - const nodes = [ ...new Set(data.NodeIntrosCompleted) ]; + const nodes = [...new Set(data.NodeIntrosCompleted)]; inventory.NodeIntrosCompleted = nodes; await inventory.save(); @@ -197,17 +197,6 @@ export const missionInventoryUpdate = async (data: IMissionInventoryUpdate, acco const { RawUpgrades, MiscItems, RegularCredits, ChallengeProgress } = data; const inventory = await getInventory(accountId); - // Currency - // TODO: Make a helper specifically for adding currencies with negative/positive checks shared between them. - // TODO - Multipliers (from Boosters or otherwise). - const credits = RegularCredits as number; - inventory.RegularCredits += credits < 0 ? Math.abs(credits) : credits; // If credits are negative, flip them. - - // If we added credits and the value flipped, flip it (again). Eg. -10000 turns into 10000. - if (inventory.RegularCredits < 0 && credits > 0) { - inventory.RegularCredits = Math.abs(inventory.RegularCredits); - } - // Gear XP gearKeys.forEach((key: GearKeysType) => addGearExpByCategory(inventory, data[key], key));