some changes.

This commit is contained in:
Ordis 2023-09-05 14:30:05 +02:00
parent 2cf5c8a46f
commit 7be55990db
2 changed files with 5 additions and 16 deletions

View File

@ -25,13 +25,13 @@ import { IMissionInventoryUpdate } from "@/src/types/missionInventoryUpdateType"
- [ ] hosts - [ ] hosts
- [x] ChallengeProgress - [x] ChallengeProgress
- [ ] SeasonChallengeHistory - [ ] 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 - [ ] ActiveDojoColorResearch
- [ ] RewardInfo - [ ] RewardInfo
- [ ] ReceivedCeremonyMsg - [ ] ReceivedCeremonyMsg
- [ ] LastCeremonyResetDate - [ ] LastCeremonyResetDate
- [ ] MissionPTS (Used to validate the mission/alive time above. @nk for more info.) - [ ] MissionPTS (Used to validate the mission/alive time above.)
- [ ] RepHash (A hash from the replication manager/RepMgr (IDA search it). Unknown what it does.) - [ ] RepHash (A hash from the replication manager/RepMgr Unknown what it does.)
- [ ] EndOfMatchUpload - [ ] EndOfMatchUpload
- [ ] ObjectiveReached - [ ] ObjectiveReached
- [ ] FpsAvg - [ ] FpsAvg

View File

@ -197,17 +197,6 @@ export const missionInventoryUpdate = async (data: IMissionInventoryUpdate, acco
const { RawUpgrades, MiscItems, RegularCredits, ChallengeProgress } = data; const { RawUpgrades, MiscItems, RegularCredits, ChallengeProgress } = data;
const inventory = await getInventory(accountId); 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 // Gear XP
gearKeys.forEach((key: GearKeysType) => addGearExpByCategory(inventory, data[key], key)); gearKeys.forEach((key: GearKeysType) => addGearExpByCategory(inventory, data[key], key));