chore: replace unlockAllMissions config with an account cheats button (#2241)
This way, mission completion rewards are given. This is especially import for junction rewards like quest keys (Closes #2229). Reviewed-on: #2241 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
6dd9b42f40
commit
bf12f90c88
@ -13,7 +13,6 @@
|
|||||||
"skipTutorial": false,
|
"skipTutorial": false,
|
||||||
"skipAllDialogue": false,
|
"skipAllDialogue": false,
|
||||||
"unlockAllScans": false,
|
"unlockAllScans": false,
|
||||||
"unlockAllMissions": false,
|
|
||||||
"infiniteCredits": false,
|
"infiniteCredits": false,
|
||||||
"infinitePlatinum": false,
|
"infinitePlatinum": false,
|
||||||
"infiniteEndo": false,
|
"infiniteEndo": false,
|
||||||
|
@ -6,13 +6,7 @@ import allDialogue from "@/static/fixed_responses/allDialogue.json";
|
|||||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
||||||
import { IInventoryClient, IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { IInventoryClient, IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IPolarity, ArtifactPolarity, EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IPolarity, ArtifactPolarity, EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import {
|
import { ExportCustoms, ExportFlavour, ExportResources, ExportVirtuals } from "warframe-public-export-plus";
|
||||||
ExportCustoms,
|
|
||||||
ExportFlavour,
|
|
||||||
ExportRegions,
|
|
||||||
ExportResources,
|
|
||||||
ExportVirtuals
|
|
||||||
} from "warframe-public-export-plus";
|
|
||||||
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService";
|
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService";
|
||||||
import {
|
import {
|
||||||
addMiscItems,
|
addMiscItems,
|
||||||
@ -22,7 +16,7 @@ import {
|
|||||||
generateRewardSeed
|
generateRewardSeed
|
||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { catBreadHash } from "@/src/helpers/stringHelpers";
|
import { addString, catBreadHash } from "@/src/helpers/stringHelpers";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { getNemesisManifest } from "@/src/helpers/nemesisHelpers";
|
import { getNemesisManifest } from "@/src/helpers/nemesisHelpers";
|
||||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
|
import { getPersonalRooms } from "@/src/services/personalRoomsService";
|
||||||
@ -167,18 +161,6 @@ export const getInventoryResponse = async (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.unlockAllMissions) {
|
|
||||||
inventoryResponse.Missions = [];
|
|
||||||
for (const tag of Object.keys(ExportRegions)) {
|
|
||||||
inventoryResponse.Missions.push({
|
|
||||||
Completes: 1,
|
|
||||||
Tier: 1,
|
|
||||||
Tag: tag
|
|
||||||
});
|
|
||||||
}
|
|
||||||
addString(inventoryResponse.NodeIntrosCompleted, "TeshinHardModeUnlocked");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.unlockAllShipDecorations) {
|
if (config.unlockAllShipDecorations) {
|
||||||
inventoryResponse.ShipDecorations = [];
|
inventoryResponse.ShipDecorations = [];
|
||||||
for (const [uniqueName, item] of Object.entries(ExportResources)) {
|
for (const [uniqueName, item] of Object.entries(ExportResources)) {
|
||||||
@ -362,12 +344,6 @@ const allEudicoHeistJobs = [
|
|||||||
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyFour"
|
"/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyFour"
|
||||||
];
|
];
|
||||||
|
|
||||||
const addString = (arr: string[], str: string): void => {
|
|
||||||
if (arr.indexOf(str) == -1) {
|
|
||||||
arr.push(str);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getExpRequiredForMr = (rank: number): number => {
|
const getExpRequiredForMr = (rank: number): number => {
|
||||||
if (rank <= 30) {
|
if (rank <= 30) {
|
||||||
return 2500 * rank * rank;
|
return 2500 * rank * rank;
|
||||||
|
34
src/controllers/custom/completeAllMissionsController.ts
Normal file
34
src/controllers/custom/completeAllMissionsController.ts
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { addString } from "@/src/helpers/stringHelpers";
|
||||||
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { addFixedLevelRewards } from "@/src/services/missionInventoryUpdateService";
|
||||||
|
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
|
||||||
|
import { IMissionReward } from "@/src/types/missionTypes";
|
||||||
|
import { RequestHandler } from "express";
|
||||||
|
import { ExportRegions } from "warframe-public-export-plus";
|
||||||
|
|
||||||
|
export const completeAllMissionsController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const MissionRewards: IMissionReward[] = [];
|
||||||
|
for (const [tag, node] of Object.entries(ExportRegions)) {
|
||||||
|
if (!inventory.Missions.find(x => x.Tag == tag)) {
|
||||||
|
inventory.Missions.push({
|
||||||
|
Completes: 1,
|
||||||
|
Tier: 1,
|
||||||
|
Tag: tag
|
||||||
|
});
|
||||||
|
|
||||||
|
if (node.missionReward) {
|
||||||
|
console.log(node.missionReward);
|
||||||
|
addFixedLevelRewards(node.missionReward, inventory, MissionRewards);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const reward of MissionRewards) {
|
||||||
|
await handleStoreItemAcquisition(reward.StoreItem, inventory, reward.ItemCount, undefined, true);
|
||||||
|
}
|
||||||
|
addString(inventory.NodeIntrosCompleted, "TeshinHardModeUnlocked");
|
||||||
|
await inventory.save();
|
||||||
|
res.end();
|
||||||
|
};
|
@ -54,3 +54,9 @@ export const regexEscape = (str: string): string => {
|
|||||||
str = str.split("}").join("\\}");
|
str = str.split("}").join("\\}");
|
||||||
return str;
|
return str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const addString = (arr: string[], str: string): void => {
|
||||||
|
if (arr.indexOf(str) == -1) {
|
||||||
|
arr.push(str);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@ -12,6 +12,7 @@ import { ircDroppedController } from "@/src/controllers/custom/ircDroppedControl
|
|||||||
import { unlockAllIntrinsicsController } from "@/src/controllers/custom/unlockAllIntrinsicsController";
|
import { unlockAllIntrinsicsController } from "@/src/controllers/custom/unlockAllIntrinsicsController";
|
||||||
import { addMissingMaxRankModsController } from "@/src/controllers/custom/addMissingMaxRankModsController";
|
import { addMissingMaxRankModsController } from "@/src/controllers/custom/addMissingMaxRankModsController";
|
||||||
import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController";
|
import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController";
|
||||||
|
import { completeAllMissionsController } from "@/src/controllers/custom/completeAllMissionsController";
|
||||||
|
|
||||||
import { createAccountController } from "@/src/controllers/custom/createAccountController";
|
import { createAccountController } from "@/src/controllers/custom/createAccountController";
|
||||||
import { createMessageController } from "@/src/controllers/custom/createMessageController";
|
import { createMessageController } from "@/src/controllers/custom/createMessageController";
|
||||||
@ -40,6 +41,7 @@ customRouter.get("/ircDropped", ircDroppedController);
|
|||||||
customRouter.get("/unlockAllIntrinsics", unlockAllIntrinsicsController);
|
customRouter.get("/unlockAllIntrinsics", unlockAllIntrinsicsController);
|
||||||
customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController);
|
customRouter.get("/addMissingMaxRankMods", addMissingMaxRankModsController);
|
||||||
customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController);
|
customRouter.get("/webuiFileChangeDetected", webuiFileChangeDetectedController);
|
||||||
|
customRouter.get("/completeAllMissions", completeAllMissionsController);
|
||||||
|
|
||||||
customRouter.post("/createAccount", createAccountController);
|
customRouter.post("/createAccount", createAccountController);
|
||||||
customRouter.post("/createMessage", createMessageController);
|
customRouter.post("/createMessage", createMessageController);
|
||||||
|
@ -19,7 +19,6 @@ export interface IConfig {
|
|||||||
skipTutorial?: boolean;
|
skipTutorial?: boolean;
|
||||||
skipAllDialogue?: boolean;
|
skipAllDialogue?: boolean;
|
||||||
unlockAllScans?: boolean;
|
unlockAllScans?: boolean;
|
||||||
unlockAllMissions?: boolean;
|
|
||||||
infiniteCredits?: boolean;
|
infiniteCredits?: boolean;
|
||||||
infinitePlatinum?: boolean;
|
infinitePlatinum?: boolean;
|
||||||
infiniteEndo?: boolean;
|
infiniteEndo?: boolean;
|
||||||
|
@ -1367,7 +1367,7 @@ export const addFixedLevelRewards = (
|
|||||||
if (rewards.countedItems) {
|
if (rewards.countedItems) {
|
||||||
for (const item of rewards.countedItems) {
|
for (const item of rewards.countedItems) {
|
||||||
MissionRewards.push({
|
MissionRewards.push({
|
||||||
StoreItem: `/Lotus/StoreItems${item.ItemType.substring("Lotus/".length)}`,
|
StoreItem: toStoreItem(item.ItemType),
|
||||||
ItemCount: item.ItemCount
|
ItemCount: item.ItemCount
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -452,9 +452,6 @@
|
|||||||
<button class="btn btn-success" onclick="maxRankAllEquipment(['SentinelWeapons']);" data-loc="inventory_bulkRankUpSentinelWeapons"></button>
|
<button class="btn btn-success" onclick="maxRankAllEquipment(['SentinelWeapons']);" data-loc="inventory_bulkRankUpSentinelWeapons"></button>
|
||||||
<button class="btn btn-success" onclick="maxRankAllEvolutions();" data-loc="inventory_bulkRankUpEvolutionProgress"></button>
|
<button class="btn btn-success" onclick="maxRankAllEvolutions();" data-loc="inventory_bulkRankUpEvolutionProgress"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-2 d-flex flex-wrap gap-2">
|
|
||||||
<button class="btn btn-primary" onclick="debounce(doMaxPlexus);" data-loc="inventory_maxPlexus"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -587,10 +584,6 @@
|
|||||||
<input class="form-check-input" type="checkbox" id="unlockAllScans" />
|
<input class="form-check-input" type="checkbox" id="unlockAllScans" />
|
||||||
<label class="form-check-label" for="unlockAllScans" data-loc="cheats_unlockAllScans"></label>
|
<label class="form-check-label" for="unlockAllScans" data-loc="cheats_unlockAllScans"></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" type="checkbox" id="unlockAllMissions" />
|
|
||||||
<label class="form-check-label" for="unlockAllMissions" data-loc="cheats_unlockAllMissions"></label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="infiniteCredits" />
|
<input class="form-check-input" type="checkbox" id="infiniteCredits" />
|
||||||
<label class="form-check-label" for="infiniteCredits" data-loc="cheats_infiniteCredits"></label>
|
<label class="form-check-label" for="infiniteCredits" data-loc="cheats_infiniteCredits"></label>
|
||||||
@ -782,9 +775,11 @@
|
|||||||
<h5 class="card-header" data-loc="cheats_account"></h5>
|
<h5 class="card-header" data-loc="cheats_account"></h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="mb-2 d-flex flex-wrap gap-2">
|
<div class="mb-2 d-flex flex-wrap gap-2">
|
||||||
|
<button class="btn btn-primary" onclick="debounce(doUnlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
|
||||||
<button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button>
|
<button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button>
|
||||||
<button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button>
|
<button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button>
|
||||||
<button class="btn btn-primary" onclick="doIntrinsicsUnlockAll();" data-loc="cheats_intrinsicsUnlockAll"></button>
|
<button class="btn btn-primary" onclick="doIntrinsicsUnlockAll();" data-loc="cheats_intrinsicsUnlockAll"></button>
|
||||||
|
<button class="btn btn-primary" onclick="debounce(doMaxPlexus);" data-loc="inventory_maxPlexus"></button>
|
||||||
</div>
|
</div>
|
||||||
<form class="mt-2" onsubmit="doChangeSupportedSyndicate(); return false;">
|
<form class="mt-2" onsubmit="doChangeSupportedSyndicate(); return false;">
|
||||||
<label class="form-label" for="changeSyndicate" data-loc="cheats_changeSupportedSyndicate"></label>
|
<label class="form-label" for="changeSyndicate" data-loc="cheats_changeSupportedSyndicate"></label>
|
||||||
|
@ -114,11 +114,9 @@ function doLogin() {
|
|||||||
window.registerSubmit = false;
|
window.registerSubmit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function revalidateAuthz(succ_cb) {
|
async function revalidateAuthz() {
|
||||||
getWebSocket().then(() => {
|
await getWebSocket();
|
||||||
// We have a websocket connection, so authz should be good.
|
// We have a websocket connection, so authz should be good.
|
||||||
succ_cb();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
@ -138,7 +136,7 @@ function doLogout() {
|
|||||||
function renameAccount() {
|
function renameAccount() {
|
||||||
const newname = window.prompt(loc("code_changeNameConfirm"));
|
const newname = window.prompt(loc("code_changeNameConfirm"));
|
||||||
if (newname) {
|
if (newname) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
fetch("/custom/renameAccount?" + window.authz + "&newname=" + newname).then(() => {
|
fetch("/custom/renameAccount?" + window.authz + "&newname=" + newname).then(() => {
|
||||||
$(".displayname").text(newname);
|
$(".displayname").text(newname);
|
||||||
updateLocElements();
|
updateLocElements();
|
||||||
@ -149,7 +147,7 @@ function renameAccount() {
|
|||||||
|
|
||||||
function deleteAccount() {
|
function deleteAccount() {
|
||||||
if (window.confirm(loc("code_deleteAccountConfirm"))) {
|
if (window.confirm(loc("code_deleteAccountConfirm"))) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
fetch("/custom/deleteAccount?" + window.authz).then(() => {
|
fetch("/custom/deleteAccount?" + window.authz).then(() => {
|
||||||
logout();
|
logout();
|
||||||
single.loadRoute("/webui/"); // Show login screen
|
single.loadRoute("/webui/"); // Show login screen
|
||||||
@ -649,7 +647,7 @@ function updateInventory() {
|
|||||||
a.href = "#";
|
a.href = "#";
|
||||||
a.onclick = function (event) {
|
a.onclick = function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const promises = [];
|
const promises = [];
|
||||||
if (item.XP < maxXP) {
|
if (item.XP < maxXP) {
|
||||||
promises.push(addGearExp(category, item.ItemId.$oid, maxXP - item.XP));
|
promises.push(addGearExp(category, item.ItemId.$oid, maxXP - item.XP));
|
||||||
@ -1239,7 +1237,7 @@ function doAcquireEquipment(category) {
|
|||||||
.focus();
|
.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const req = $.post({
|
const req = $.post({
|
||||||
url: "/custom/addItems?" + window.authz,
|
url: "/custom/addItems?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -1366,7 +1364,7 @@ function doAcquireModularEquipment(category, WeaponType) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (category == "KubrowPets") Parts.unshift(WeaponType);
|
if (category == "KubrowPets") Parts.unshift(WeaponType);
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const req = $.post({
|
const req = $.post({
|
||||||
url: "/api/modularWeaponCrafting.php?" + window.authz,
|
url: "/api/modularWeaponCrafting.php?" + window.authz,
|
||||||
contentType: "application/octet-stream",
|
contentType: "application/octet-stream",
|
||||||
@ -1419,7 +1417,7 @@ $("input[list]").on("input", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function dispatchAddItemsRequestsBatch(requests) {
|
function dispatchAddItemsRequestsBatch(requests) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const req = $.post({
|
const req = $.post({
|
||||||
url: "/custom/addItems?" + window.authz,
|
url: "/custom/addItems?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -1463,7 +1461,7 @@ function addMissingEvolutionProgress() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function maxRankAllEvolutions() {
|
function maxRankAllEvolutions() {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
||||||
req.done(data => {
|
req.done(data => {
|
||||||
const requests = [];
|
const requests = [];
|
||||||
@ -1487,7 +1485,7 @@ function maxRankAllEvolutions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function maxRankAllEquipment(categories) {
|
function maxRankAllEquipment(categories) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
||||||
req.done(data => {
|
req.done(data => {
|
||||||
window.itemListPromise.then(itemMap => {
|
window.itemListPromise.then(itemMap => {
|
||||||
@ -1561,7 +1559,7 @@ function addGearExp(category, oid, xp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sendBatchGearExp(data) {
|
function sendBatchGearExp(data) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/addXp?" + window.authz,
|
url: "/custom/addXp?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -1574,7 +1572,7 @@ function sendBatchGearExp(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renameGear(category, oid, name) {
|
function renameGear(category, oid, name) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
if (category == "KubrowPets") {
|
if (category == "KubrowPets") {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/renamePet.php?" + window.authz + "&webui=1",
|
url: "/api/renamePet.php?" + window.authz + "&webui=1",
|
||||||
@ -1602,7 +1600,7 @@ function renameGear(category, oid, name) {
|
|||||||
|
|
||||||
function disposeOfGear(category, oid) {
|
function disposeOfGear(category, oid) {
|
||||||
if (category == "KubrowPets") {
|
if (category == "KubrowPets") {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/releasePet.php?" + window.authz,
|
url: "/api/releasePet.php?" + window.authz,
|
||||||
contentType: "application/octet-stream",
|
contentType: "application/octet-stream",
|
||||||
@ -1624,7 +1622,7 @@ function disposeOfGear(category, oid) {
|
|||||||
Count: 0
|
Count: 0
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/sell.php?" + window.authz,
|
url: "/api/sell.php?" + window.authz,
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
@ -1646,7 +1644,7 @@ function disposeOfItems(category, type, count) {
|
|||||||
Count: count
|
Count: count
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/sell.php?" + window.authz,
|
url: "/api/sell.php?" + window.authz,
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
@ -1656,7 +1654,7 @@ function disposeOfItems(category, type, count) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gildEquipment(category, oid) {
|
function gildEquipment(category, oid) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/gildWeapon.php?" + window.authz + "&ItemId=" + oid + "&Category=" + category,
|
url: "/api/gildWeapon.php?" + window.authz + "&ItemId=" + oid + "&Category=" + category,
|
||||||
contentType: "application/octet-stream",
|
contentType: "application/octet-stream",
|
||||||
@ -1670,7 +1668,7 @@ function gildEquipment(category, oid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function maturePet(oid, revert) {
|
function maturePet(oid, revert) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/maturePet.php?" + window.authz,
|
url: "/api/maturePet.php?" + window.authz,
|
||||||
contentType: "application/octet-stream",
|
contentType: "application/octet-stream",
|
||||||
@ -1685,7 +1683,7 @@ function maturePet(oid, revert) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setEvolutionProgress(requests) {
|
function setEvolutionProgress(requests) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const req = $.post({
|
const req = $.post({
|
||||||
url: "/custom/setEvolutionProgress?" + window.authz,
|
url: "/custom/setEvolutionProgress?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -1705,7 +1703,7 @@ function doAcquireMiscItems() {
|
|||||||
}
|
}
|
||||||
const count = parseInt($("#miscitem-count").val());
|
const count = parseInt($("#miscitem-count").val());
|
||||||
if (count != 0) {
|
if (count != 0) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/addItems?" + window.authz,
|
url: "/custom/addItems?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -1746,7 +1744,7 @@ function doAcquireRiven() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const uniqueName = "/Lotus/Upgrades/Mods/Randomized/" + $("#addriven-type").val();
|
const uniqueName = "/Lotus/Upgrades/Mods/Randomized/" + $("#addriven-type").val();
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
// Add riven type to inventory
|
// Add riven type to inventory
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/addItems?" + window.authz,
|
url: "/custom/addItems?" + window.authz,
|
||||||
@ -1793,7 +1791,7 @@ $("#addriven-fingerprint").on("input", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function setFingerprint(ItemType, ItemId, fingerprint) {
|
function setFingerprint(ItemType, ItemId, fingerprint) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/artifacts.php?" + window.authz,
|
url: "/api/artifacts.php?" + window.authz,
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
@ -1821,7 +1819,7 @@ function doAcquireMod() {
|
|||||||
}
|
}
|
||||||
const count = parseInt($("#mod-count").val());
|
const count = parseInt($("#mod-count").val());
|
||||||
if (count != 0) {
|
if (count != 0) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/addItems?" + window.authz,
|
url: "/custom/addItems?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -1898,7 +1896,7 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if ((await res.text()) == "Log-in expired") {
|
if ((await res.text()) == "Log-in expired") {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
if (single.getCurrentPath() == "/webui/cheats") {
|
if (single.getCurrentPath() == "/webui/cheats") {
|
||||||
single.loadRoute("/webui/cheats");
|
single.loadRoute("/webui/cheats");
|
||||||
}
|
}
|
||||||
@ -1915,7 +1913,7 @@ single.getRoute("/webui/cheats").on("beforeload", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function doUnlockAllFocusSchools() {
|
function doUnlockAllFocusSchools() {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1").done(async data => {
|
$.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1").done(async data => {
|
||||||
const missingFocusUpgrades = {
|
const missingFocusUpgrades = {
|
||||||
"/Lotus/Upgrades/Focus/Attack/AttackFocusAbility": true,
|
"/Lotus/Upgrades/Focus/Attack/AttackFocusAbility": true,
|
||||||
@ -1966,13 +1964,13 @@ function unlockFocusSchool(upgradeType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doHelminthUnlockAll() {
|
function doHelminthUnlockAll() {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post("/api/infestedFoundry.php?" + window.authz + "&mode=custom_unlockall");
|
$.post("/api/infestedFoundry.php?" + window.authz + "&mode=custom_unlockall");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function doIntrinsicsUnlockAll() {
|
function doIntrinsicsUnlockAll() {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.get("/custom/unlockAllIntrinsics?" + window.authz);
|
$.get("/custom/unlockAllIntrinsics?" + window.authz);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1984,7 +1982,7 @@ function doAddAllMods() {
|
|||||||
}
|
}
|
||||||
modsAll.delete("/Lotus/Upgrades/Mods/Fusers/LegendaryModFuser");
|
modsAll.delete("/Lotus/Upgrades/Mods/Fusers/LegendaryModFuser");
|
||||||
|
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
||||||
req.done(data => {
|
req.done(data => {
|
||||||
for (const modOwned of data.RawUpgrades) {
|
for (const modOwned of data.RawUpgrades) {
|
||||||
@ -2016,7 +2014,7 @@ function doAddAllMods() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doRemoveUnrankedMods() {
|
function doRemoveUnrankedMods() {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
||||||
req.done(inventory => {
|
req.done(inventory => {
|
||||||
window.itemListPromise.then(itemMap => {
|
window.itemListPromise.then(itemMap => {
|
||||||
@ -2041,7 +2039,7 @@ function doRemoveUnrankedMods() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doAddMissingMaxRankMods() {
|
function doAddMissingMaxRankMods() {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
fetch("/custom/addMissingMaxRankMods?" + window.authz).then(() => {
|
fetch("/custom/addMissingMaxRankMods?" + window.authz).then(() => {
|
||||||
updateInventory();
|
updateInventory();
|
||||||
});
|
});
|
||||||
@ -2063,7 +2061,7 @@ function doPushArchonCrystalUpgrade() {
|
|||||||
$("[list='datalist-archonCrystalUpgrades']").addClass("is-invalid").focus();
|
$("[list='datalist-archonCrystalUpgrades']").addClass("is-invalid").focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.get(
|
$.get(
|
||||||
"/custom/pushArchonCrystalUpgrade?" +
|
"/custom/pushArchonCrystalUpgrade?" +
|
||||||
window.authz +
|
window.authz +
|
||||||
@ -2081,7 +2079,7 @@ function doPushArchonCrystalUpgrade() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doPopArchonCrystalUpgrade(type) {
|
function doPopArchonCrystalUpgrade(type) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.get(
|
$.get(
|
||||||
"/custom/popArchonCrystalUpgrade?" +
|
"/custom/popArchonCrystalUpgrade?" +
|
||||||
window.authz +
|
window.authz +
|
||||||
@ -2096,7 +2094,7 @@ function doPopArchonCrystalUpgrade(type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doImport() {
|
function doImport() {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/import?" + window.authz,
|
url: "/custom/import?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -2113,7 +2111,7 @@ function doImport() {
|
|||||||
function doChangeSupportedSyndicate() {
|
function doChangeSupportedSyndicate() {
|
||||||
const uniqueName = document.getElementById("changeSyndicate").value;
|
const uniqueName = document.getElementById("changeSyndicate").value;
|
||||||
|
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.get("/api/setSupportedSyndicate.php?" + window.authz + "&syndicate=" + uniqueName).done(function () {
|
$.get("/api/setSupportedSyndicate.php?" + window.authz + "&syndicate=" + uniqueName).done(function () {
|
||||||
updateInventory();
|
updateInventory();
|
||||||
});
|
});
|
||||||
@ -2121,7 +2119,7 @@ function doChangeSupportedSyndicate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doAddCurrency(currency) {
|
function doAddCurrency(currency) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/addCurrency?" + window.authz,
|
url: "/custom/addCurrency?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -2136,7 +2134,7 @@ function doAddCurrency(currency) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doQuestUpdate(operation, itemType) {
|
function doQuestUpdate(operation, itemType) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/manageQuests?" + window.authz + "&operation=" + operation + "&itemType=" + itemType,
|
url: "/custom/manageQuests?" + window.authz + "&operation=" + operation + "&itemType=" + itemType,
|
||||||
contentType: "application/json"
|
contentType: "application/json"
|
||||||
@ -2147,7 +2145,7 @@ function doQuestUpdate(operation, itemType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doBulkQuestUpdate(operation) {
|
function doBulkQuestUpdate(operation) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/manageQuests?" + window.authz + "&operation=" + operation,
|
url: "/custom/manageQuests?" + window.authz + "&operation=" + operation,
|
||||||
contentType: "application/json"
|
contentType: "application/json"
|
||||||
@ -2245,7 +2243,7 @@ function handleModularSelection(category) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setBooster(ItemType, ExpiryDate, callback) {
|
function setBooster(ItemType, ExpiryDate, callback) {
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz().then(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/custom/setBooster?" + window.authz,
|
url: "/custom/setBooster?" + window.authz,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -2335,3 +2333,9 @@ async function doMaxPlexus() {
|
|||||||
toast(loc("code_noEquipmentToRankUp"));
|
toast(loc("code_noEquipmentToRankUp"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function doUnlockAllMissions() {
|
||||||
|
await revalidateAuthz();
|
||||||
|
await fetch("/custom/completeAllMissions?" + window.authz);
|
||||||
|
updateInventory();
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user