Update src/controllers/api/activateRandomModController.ts
All checks were successful
Build / build (pull_request) Successful in 1m59s
All checks were successful
Build / build (pull_request) Successful in 1m59s
This commit is contained in:
parent
ace27347cd
commit
caa08f89de
@ -1,5 +1,9 @@
|
|||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
|
import { toOid } from "@/src/helpers/inventoryHelpers";
|
||||||
import { createVeiledRivenFingerprint, createUnveiledRivenFingerprint, rivenRawToRealWeighted } from "@/src/helpers/rivenHelper";
|
import {
|
||||||
|
createVeiledRivenFingerprint,
|
||||||
|
createUnveiledRivenFingerprint,
|
||||||
|
rivenRawToRealWeighted
|
||||||
|
} from "@/src/helpers/rivenHelper";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { addMods, getInventory } from "@/src/services/inventoryService";
|
import { addMods, getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
@ -19,7 +23,9 @@ export const activateRandomModController: RequestHandler = async (req, res) => {
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
const rivenType = getRandomElement(rivenRawToRealWeighted[request.ItemType])!;
|
const rivenType = getRandomElement(rivenRawToRealWeighted[request.ItemType])!;
|
||||||
const fingerprint = config.instantFinishRivenChallenge ? createUnveiledRivenFingerprint(ExportUpgrades[rivenType]) : createVeiledRivenFingerprint(ExportUpgrades[rivenType]);
|
const fingerprint = config.instantFinishRivenChallenge
|
||||||
|
? createUnveiledRivenFingerprint(ExportUpgrades[rivenType])
|
||||||
|
: createVeiledRivenFingerprint(ExportUpgrades[rivenType]);
|
||||||
const upgradeIndex =
|
const upgradeIndex =
|
||||||
inventory.Upgrades.push({
|
inventory.Upgrades.push({
|
||||||
ItemType: rivenType,
|
ItemType: rivenType,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user