fix: correctly apply riven cipher
All checks were successful
Build / build (pull_request) Successful in 1m19s
All checks were successful
Build / build (pull_request) Successful in 1m19s
The completeRandomModChallenge endpoint is only supposed to complete the challenge, what a shocker. Because we directly set a unveiled fingerprint, the game was not showing the expected UI.
This commit is contained in:
parent
bb3c3e01b0
commit
6073ab6d36
@ -4,8 +4,7 @@ import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inven
|
||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||
import { createUnveiledRivenFingerprint } from "@/src/helpers/rivenHelper";
|
||||
import { ExportUpgrades } from "warframe-public-export-plus";
|
||||
import { IVeiledRivenFingerprint } from "@/src/helpers/rivenHelper";
|
||||
|
||||
export const completeRandomModChallengeController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
@ -29,8 +28,9 @@ export const completeRandomModChallengeController: RequestHandler = async (req,
|
||||
|
||||
// Update riven fingerprint to a randomised unveiled state
|
||||
const upgrade = inventory.Upgrades.id(request.ItemId)!;
|
||||
const meta = ExportUpgrades[upgrade.ItemType];
|
||||
upgrade.UpgradeFingerprint = JSON.stringify(createUnveiledRivenFingerprint(meta));
|
||||
const fp = JSON.parse(upgrade.UpgradeFingerprint!) as IVeiledRivenFingerprint;
|
||||
fp.challenge.Progress = fp.challenge.Required;
|
||||
upgrade.UpgradeFingerprint = JSON.stringify(fp);
|
||||
|
||||
await inventory.save();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user