forked from OpenWF/SpaceNinjaServer
Compare commits
No commits in common. "efc7467a9962ff7eb63196c464b28f7156797de8" and "146dbd1b89f89224adc72b1e39da8d6060ba741e" have entirely different histories.
efc7467a99
...
146dbd1b89
8
package-lock.json
generated
8
package-lock.json
generated
@ -18,7 +18,7 @@
|
|||||||
"morgan": "^1.10.0",
|
"morgan": "^1.10.0",
|
||||||
"ncp": "^2.0.0",
|
"ncp": "^2.0.0",
|
||||||
"typescript": "^5.5",
|
"typescript": "^5.5",
|
||||||
"warframe-public-export-plus": "^0.5.58",
|
"warframe-public-export-plus": "^0.5.56",
|
||||||
"warframe-riven-info": "^0.1.2",
|
"warframe-riven-info": "^0.1.2",
|
||||||
"winston": "^3.17.0",
|
"winston": "^3.17.0",
|
||||||
"winston-daily-rotate-file": "^5.0.0"
|
"winston-daily-rotate-file": "^5.0.0"
|
||||||
@ -3789,9 +3789,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/warframe-public-export-plus": {
|
"node_modules/warframe-public-export-plus": {
|
||||||
"version": "0.5.58",
|
"version": "0.5.56",
|
||||||
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.58.tgz",
|
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.56.tgz",
|
||||||
"integrity": "sha512-2G3tKcoblUl7S3Rkk5k/qH+VGZBUmU2QjtIrEO/Bt6UlgO83s648elkNdDKOLBKXnxIsa194nVwz+ci1K86sXg=="
|
"integrity": "sha512-px+J7tUm6fkSzwKkvL73ySQReDq9oM1UrHSLM3vbYGBvELM892iBgPYG45okIhScCSdwmmXTiWZTf4x/I4qiNQ=="
|
||||||
},
|
},
|
||||||
"node_modules/warframe-riven-info": {
|
"node_modules/warframe-riven-info": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
"morgan": "^1.10.0",
|
"morgan": "^1.10.0",
|
||||||
"ncp": "^2.0.0",
|
"ncp": "^2.0.0",
|
||||||
"typescript": "^5.5",
|
"typescript": "^5.5",
|
||||||
"warframe-public-export-plus": "^0.5.58",
|
"warframe-public-export-plus": "^0.5.56",
|
||||||
"warframe-riven-info": "^0.1.2",
|
"warframe-riven-info": "^0.1.2",
|
||||||
"winston": "^3.17.0",
|
"winston": "^3.17.0",
|
||||||
"winston-daily-rotate-file": "^5.0.0"
|
"winston-daily-rotate-file": "^5.0.0"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ export const claimLibraryDailyTaskRewardController: RequestHandler = async (req,
|
|||||||
}
|
}
|
||||||
syndicate.Standing += rewardStanding;
|
syndicate.Standing += rewardStanding;
|
||||||
|
|
||||||
addFusionPoints(inventory, 80 * rewardQuantity);
|
inventory.FusionPoints += 80 * rewardQuantity;
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
|
@ -2,7 +2,7 @@ import { toMongoDate } from "@/src/helpers/inventoryHelpers";
|
|||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { Guild } from "@/src/models/guildModel";
|
import { Guild } from "@/src/models/guildModel";
|
||||||
import { checkClanAscensionHasRequiredContributors } from "@/src/services/guildService";
|
import { checkClanAscensionHasRequiredContributors } from "@/src/services/guildService";
|
||||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
@ -36,7 +36,7 @@ export const contributeGuildClassController: RequestHandler = async (req, res) =
|
|||||||
|
|
||||||
// Either way, endo is given to the contributor.
|
// Either way, endo is given to the contributor.
|
||||||
const inventory = await getInventory(accountId, "FusionPoints");
|
const inventory = await getInventory(accountId, "FusionPoints");
|
||||||
addFusionPoints(inventory, guild.CeremonyEndo!);
|
inventory.FusionPoints += guild.CeremonyEndo!;
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
|
@ -21,12 +21,10 @@ export const entratiLabConquestModeController: RequestHandler = async (req, res)
|
|||||||
inventory.EntratiVaultCountResetDate = new Date(weekEnd);
|
inventory.EntratiVaultCountResetDate = new Date(weekEnd);
|
||||||
if (inventory.EntratiLabConquestUnlocked) {
|
if (inventory.EntratiLabConquestUnlocked) {
|
||||||
inventory.EntratiLabConquestUnlocked = 0;
|
inventory.EntratiLabConquestUnlocked = 0;
|
||||||
inventory.EntratiLabConquestCacheScoreMission = 0;
|
|
||||||
inventory.EntratiLabConquestActiveFrameVariants = [];
|
inventory.EntratiLabConquestActiveFrameVariants = [];
|
||||||
}
|
}
|
||||||
if (inventory.EchoesHexConquestUnlocked) {
|
if (inventory.EchoesHexConquestUnlocked) {
|
||||||
inventory.EchoesHexConquestUnlocked = 0;
|
inventory.EchoesHexConquestUnlocked = 0;
|
||||||
inventory.EchoesHexConquestCacheScoreMission = 0;
|
|
||||||
inventory.EchoesHexConquestActiveFrameVariants = [];
|
inventory.EchoesHexConquestActiveFrameVariants = [];
|
||||||
inventory.EchoesHexConquestActiveStickers = [];
|
inventory.EchoesHexConquestActiveStickers = [];
|
||||||
}
|
}
|
||||||
|
@ -21,11 +21,7 @@ export const loginController: RequestHandler = async (request, response) => {
|
|||||||
|
|
||||||
const myAddress = request.host.indexOf("warframe.com") == -1 ? request.host : config.myAddress;
|
const myAddress = request.host.indexOf("warframe.com") == -1 ? request.host : config.myAddress;
|
||||||
|
|
||||||
if (
|
if (!account && config.autoCreateAccount && loginRequest.ClientType != "webui") {
|
||||||
!account &&
|
|
||||||
((config.autoCreateAccount && loginRequest.ClientType != "webui") ||
|
|
||||||
loginRequest.ClientType == "webui-register")
|
|
||||||
) {
|
|
||||||
try {
|
try {
|
||||||
const nameFromEmail = loginRequest.email.substring(0, loginRequest.email.indexOf("@"));
|
const nameFromEmail = loginRequest.email.substring(0, loginRequest.email.indexOf("@"));
|
||||||
let name = nameFromEmail || loginRequest.email.substring(1) || "SpaceNinja";
|
let name = nameFromEmail || loginRequest.email.substring(1) || "SpaceNinja";
|
||||||
@ -41,7 +37,7 @@ export const loginController: RequestHandler = async (request, response) => {
|
|||||||
password: loginRequest.password,
|
password: loginRequest.password,
|
||||||
DisplayName: name,
|
DisplayName: name,
|
||||||
CountryCode: loginRequest.lang.toUpperCase(),
|
CountryCode: loginRequest.lang.toUpperCase(),
|
||||||
ClientType: loginRequest.ClientType == "webui-register" ? "webui" : loginRequest.ClientType,
|
ClientType: loginRequest.ClientType,
|
||||||
CrossPlatformAllowed: true,
|
CrossPlatformAllowed: true,
|
||||||
ForceLogoutVersion: 0,
|
ForceLogoutVersion: 0,
|
||||||
ConsentNeeded: false,
|
ConsentNeeded: false,
|
||||||
@ -63,11 +59,6 @@ export const loginController: RequestHandler = async (request, response) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loginRequest.ClientType == "webui-register") {
|
|
||||||
response.status(400).json({ error: "account already exists" });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isCorrectPassword(loginRequest.password, account.password)) {
|
if (!isCorrectPassword(loginRequest.password, account.password)) {
|
||||||
response.status(400).json({ error: "incorrect login data" });
|
response.status(400).json({ error: "incorrect login data" });
|
||||||
return;
|
return;
|
||||||
|
@ -6,7 +6,6 @@ import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/mi
|
|||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
import { getInventoryResponse } from "./inventoryController";
|
import { getInventoryResponse } from "./inventoryController";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { IMissionInventoryUpdateResponse } from "@/src/types/missionTypes";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**** INPUT ****
|
**** INPUT ****
|
||||||
@ -72,14 +71,8 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const { MissionRewards, inventoryChanges, credits, AffiliationMods, SyndicateXPItemReward } =
|
||||||
MissionRewards,
|
await addMissionRewards(inventory, missionReport, firstCompletion);
|
||||||
inventoryChanges,
|
|
||||||
credits,
|
|
||||||
AffiliationMods,
|
|
||||||
SyndicateXPItemReward,
|
|
||||||
ConquestCompletedMissionsCount
|
|
||||||
} = await addMissionRewards(inventory, missionReport, firstCompletion);
|
|
||||||
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
const inventoryResponse = await getInventoryResponse(inventory, true);
|
const inventoryResponse = await getInventoryResponse(inventory, true);
|
||||||
@ -93,9 +86,8 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
|
|||||||
...inventoryUpdates,
|
...inventoryUpdates,
|
||||||
//FusionPoints: inventoryChanges?.FusionPoints, // This in combination with InventoryJson or InventoryChanges seems to just double the number of endo shown, so unsure when this is needed.
|
//FusionPoints: inventoryChanges?.FusionPoints, // This in combination with InventoryJson or InventoryChanges seems to just double the number of endo shown, so unsure when this is needed.
|
||||||
SyndicateXPItemReward,
|
SyndicateXPItemReward,
|
||||||
AffiliationMods,
|
AffiliationMods
|
||||||
ConquestCompletedMissionsCount
|
});
|
||||||
} satisfies IMissionInventoryUpdateResponse);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -37,7 +37,6 @@ export const placeDecoInComponentController: RequestHandler = async (req, res) =
|
|||||||
const deco = component.Decos.find(x => x._id.equals(request.MoveId))!;
|
const deco = component.Decos.find(x => x._id.equals(request.MoveId))!;
|
||||||
deco.Pos = request.Pos;
|
deco.Pos = request.Pos;
|
||||||
deco.Rot = request.Rot;
|
deco.Rot = request.Rot;
|
||||||
deco.Scale = request.Scale;
|
|
||||||
} else {
|
} else {
|
||||||
const deco =
|
const deco =
|
||||||
component.Decos[
|
component.Decos[
|
||||||
@ -46,7 +45,6 @@ export const placeDecoInComponentController: RequestHandler = async (req, res) =
|
|||||||
Type: request.Type,
|
Type: request.Type,
|
||||||
Pos: request.Pos,
|
Pos: request.Pos,
|
||||||
Rot: request.Rot,
|
Rot: request.Rot,
|
||||||
Scale: request.Scale,
|
|
||||||
Name: request.Name,
|
Name: request.Name,
|
||||||
Sockets: request.Sockets
|
Sockets: request.Sockets
|
||||||
}) - 1
|
}) - 1
|
||||||
@ -115,9 +113,9 @@ interface IPlaceDecoInComponentRequest {
|
|||||||
Type: string;
|
Type: string;
|
||||||
Pos: number[];
|
Pos: number[];
|
||||||
Rot: number[];
|
Rot: number[];
|
||||||
Scale?: number;
|
|
||||||
Name?: string;
|
Name?: string;
|
||||||
Sockets?: number;
|
Sockets?: number;
|
||||||
|
Scale?: number; // only provided alongside MoveId and seems to always be 1
|
||||||
MoveId?: string;
|
MoveId?: string;
|
||||||
ShipDeco?: boolean;
|
ShipDeco?: boolean;
|
||||||
VaultDeco?: boolean;
|
VaultDeco?: boolean;
|
||||||
|
@ -8,8 +8,7 @@ import {
|
|||||||
addConsumables,
|
addConsumables,
|
||||||
freeUpSlot,
|
freeUpSlot,
|
||||||
combineInventoryChanges,
|
combineInventoryChanges,
|
||||||
addCrewShipRawSalvage,
|
addCrewShipRawSalvage
|
||||||
addFusionPoints
|
|
||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { ExportDojoRecipes } from "warframe-public-export-plus";
|
import { ExportDojoRecipes } from "warframe-public-export-plus";
|
||||||
@ -70,7 +69,7 @@ export const sellController: RequestHandler = async (req, res) => {
|
|||||||
if (payload.SellCurrency == "SC_RegularCredits") {
|
if (payload.SellCurrency == "SC_RegularCredits") {
|
||||||
inventory.RegularCredits += payload.SellPrice;
|
inventory.RegularCredits += payload.SellPrice;
|
||||||
} else if (payload.SellCurrency == "SC_FusionPoints") {
|
} else if (payload.SellCurrency == "SC_FusionPoints") {
|
||||||
addFusionPoints(inventory, payload.SellPrice);
|
inventory.FusionPoints += payload.SellPrice;
|
||||||
} else if (payload.SellCurrency == "SC_PrimeBucks") {
|
} else if (payload.SellCurrency == "SC_PrimeBucks") {
|
||||||
addMiscItems(inventory, [
|
addMiscItems(inventory, [
|
||||||
{
|
{
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
export const addCurrencyController: RequestHandler = async (req, res) => {
|
export const addCurrencyController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
const request = req.body as IAddCurrencyRequest;
|
const request = req.body as IAddCurrencyRequest;
|
||||||
const inventory = await getInventory(accountId, request.currency);
|
|
||||||
if (request.currency == "FusionPoints") {
|
|
||||||
addFusionPoints(inventory, request.delta);
|
|
||||||
} else {
|
|
||||||
inventory[request.currency] += request.delta;
|
inventory[request.currency] += request.delta;
|
||||||
}
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
res.end();
|
res.end();
|
||||||
};
|
};
|
||||||
|
@ -32,28 +32,6 @@ interface ListedItem {
|
|||||||
parazon?: boolean;
|
parazon?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ItemLists {
|
|
||||||
archonCrystalUpgrades: Record<string, string>;
|
|
||||||
uniqueLevelCaps: Record<string, number>;
|
|
||||||
Suits: ListedItem[];
|
|
||||||
LongGuns: ListedItem[];
|
|
||||||
Melee: ListedItem[];
|
|
||||||
ModularParts: ListedItem[];
|
|
||||||
Pistols: ListedItem[];
|
|
||||||
Sentinels: ListedItem[];
|
|
||||||
SentinelWeapons: ListedItem[];
|
|
||||||
SpaceGuns: ListedItem[];
|
|
||||||
SpaceMelee: ListedItem[];
|
|
||||||
SpaceSuits: ListedItem[];
|
|
||||||
MechSuits: ListedItem[];
|
|
||||||
miscitems: ListedItem[];
|
|
||||||
Syndicates: ListedItem[];
|
|
||||||
OperatorAmps: ListedItem[];
|
|
||||||
QuestKeys: ListedItem[];
|
|
||||||
KubrowPets: ListedItem[];
|
|
||||||
mods: ListedItem[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const relicQualitySuffixes: Record<TRelicQuality, string> = {
|
const relicQualitySuffixes: Record<TRelicQuality, string> = {
|
||||||
VPQ_BRONZE: "",
|
VPQ_BRONZE: "",
|
||||||
VPQ_SILVER: " [Flawless]",
|
VPQ_SILVER: " [Flawless]",
|
||||||
@ -63,27 +41,23 @@ const relicQualitySuffixes: Record<TRelicQuality, string> = {
|
|||||||
|
|
||||||
const getItemListsController: RequestHandler = (req, response) => {
|
const getItemListsController: RequestHandler = (req, response) => {
|
||||||
const lang = getDict(typeof req.query.lang == "string" ? req.query.lang : "en");
|
const lang = getDict(typeof req.query.lang == "string" ? req.query.lang : "en");
|
||||||
const res: ItemLists = {
|
const res: Record<string, ListedItem[]> = {};
|
||||||
archonCrystalUpgrades,
|
res.Suits = [];
|
||||||
uniqueLevelCaps: ExportMisc.uniqueLevelCaps,
|
res.LongGuns = [];
|
||||||
Suits: [],
|
res.Melee = [];
|
||||||
LongGuns: [],
|
res.ModularParts = [];
|
||||||
Melee: [],
|
res.Pistols = [];
|
||||||
ModularParts: [],
|
res.Sentinels = [];
|
||||||
Pistols: [],
|
res.SentinelWeapons = [];
|
||||||
Sentinels: [],
|
res.SpaceGuns = [];
|
||||||
SentinelWeapons: [],
|
res.SpaceMelee = [];
|
||||||
SpaceGuns: [],
|
res.SpaceSuits = [];
|
||||||
SpaceMelee: [],
|
res.MechSuits = [];
|
||||||
SpaceSuits: [],
|
res.miscitems = [];
|
||||||
MechSuits: [],
|
res.Syndicates = [];
|
||||||
miscitems: [],
|
res.OperatorAmps = [];
|
||||||
Syndicates: [],
|
res.QuestKeys = [];
|
||||||
OperatorAmps: [],
|
res.KubrowPets = [];
|
||||||
QuestKeys: [],
|
|
||||||
KubrowPets: [],
|
|
||||||
mods: []
|
|
||||||
};
|
|
||||||
for (const [uniqueName, item] of Object.entries(ExportWarframes)) {
|
for (const [uniqueName, item] of Object.entries(ExportWarframes)) {
|
||||||
res[item.productCategory].push({
|
res[item.productCategory].push({
|
||||||
uniqueName,
|
uniqueName,
|
||||||
@ -92,7 +66,7 @@ const getItemListsController: RequestHandler = (req, response) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
for (const [uniqueName, item] of Object.entries(ExportSentinels)) {
|
for (const [uniqueName, item] of Object.entries(ExportSentinels)) {
|
||||||
if (item.productCategory == "Sentinels" || item.productCategory == "KubrowPets") {
|
if (item.productCategory != "SpecialItems") {
|
||||||
res[item.productCategory].push({
|
res[item.productCategory].push({
|
||||||
uniqueName,
|
uniqueName,
|
||||||
name: getString(item.name, lang),
|
name: getString(item.name, lang),
|
||||||
@ -141,7 +115,6 @@ const getItemListsController: RequestHandler = (req, response) => {
|
|||||||
let name = getString(item.name, lang);
|
let name = getString(item.name, lang);
|
||||||
if ("dissectionParts" in item) {
|
if ("dissectionParts" in item) {
|
||||||
name = getString("/Lotus/Language/Fish/FishDisplayName", lang).split("|FISH_NAME|").join(name);
|
name = getString("/Lotus/Language/Fish/FishDisplayName", lang).split("|FISH_NAME|").join(name);
|
||||||
if (item.syndicateTag == "CetusSyndicate") {
|
|
||||||
if (uniqueName.indexOf("Large") != -1) {
|
if (uniqueName.indexOf("Large") != -1) {
|
||||||
name = name.split("|FISH_SIZE|").join(getString("/Lotus/Language/Fish/FishSizeLargeAbbrev", lang));
|
name = name.split("|FISH_SIZE|").join(getString("/Lotus/Language/Fish/FishSizeLargeAbbrev", lang));
|
||||||
} else if (uniqueName.indexOf("Medium") != -1) {
|
} else if (uniqueName.indexOf("Medium") != -1) {
|
||||||
@ -149,21 +122,6 @@ const getItemListsController: RequestHandler = (req, response) => {
|
|||||||
} else {
|
} else {
|
||||||
name = name.split("|FISH_SIZE|").join(getString("/Lotus/Language/Fish/FishSizeSmallAbbrev", lang));
|
name = name.split("|FISH_SIZE|").join(getString("/Lotus/Language/Fish/FishSizeSmallAbbrev", lang));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (uniqueName.indexOf("Large") != -1) {
|
|
||||||
name = name
|
|
||||||
.split("|FISH_SIZE|")
|
|
||||||
.join(getString("/Lotus/Language/SolarisVenus/RobofishAgeCategoryElderAbbrev", lang));
|
|
||||||
} else if (uniqueName.indexOf("Medium") != -1) {
|
|
||||||
name = name
|
|
||||||
.split("|FISH_SIZE|")
|
|
||||||
.join(getString("/Lotus/Language/SolarisVenus/RobofishAgeCategoryMatureAbbrev", lang));
|
|
||||||
} else {
|
|
||||||
name = name
|
|
||||||
.split("|FISH_SIZE|")
|
|
||||||
.join(getString("/Lotus/Language/SolarisVenus/RobofishAgeCategoryYoungAbbrev", lang));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
name &&
|
name &&
|
||||||
@ -226,6 +184,7 @@ const getItemListsController: RequestHandler = (req, response) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res.mods = [];
|
||||||
for (const [uniqueName, upgrade] of Object.entries(ExportUpgrades)) {
|
for (const [uniqueName, upgrade] of Object.entries(ExportUpgrades)) {
|
||||||
const mod: ListedItem = {
|
const mod: ListedItem = {
|
||||||
uniqueName,
|
uniqueName,
|
||||||
@ -284,7 +243,11 @@ const getItemListsController: RequestHandler = (req, response) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
response.json(res);
|
response.json({
|
||||||
|
archonCrystalUpgrades,
|
||||||
|
uniqueLevelCaps: ExportMisc.uniqueLevelCaps,
|
||||||
|
...res
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export { getItemListsController };
|
export { getItemListsController };
|
||||||
|
@ -6,7 +6,6 @@ import { logger } from "../utils/logger";
|
|||||||
import { IOid } from "../types/commonTypes";
|
import { IOid } from "../types/commonTypes";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { addMods } from "../services/inventoryService";
|
import { addMods } from "../services/inventoryService";
|
||||||
import { isArchwingMission } from "../services/worldStateService";
|
|
||||||
|
|
||||||
export const getInfNodes = (faction: string, rank: number): IInfNode[] => {
|
export const getInfNodes = (faction: string, rank: number): IInfNode[] => {
|
||||||
const infNodes = [];
|
const infNodes = [];
|
||||||
@ -23,7 +22,7 @@ export const getInfNodes = (faction: string, rank: number): IInfNode[] => {
|
|||||||
value.missionIndex != 42 && // not face off
|
value.missionIndex != 42 && // not face off
|
||||||
value.name.indexOf("1999NodeI") == -1 && // not stage defence
|
value.name.indexOf("1999NodeI") == -1 && // not stage defence
|
||||||
value.name.indexOf("1999NodeJ") == -1 && // not lich bounty
|
value.name.indexOf("1999NodeJ") == -1 && // not lich bounty
|
||||||
!isArchwingMission(value)
|
value.name.indexOf("Archwing") == -1
|
||||||
) {
|
) {
|
||||||
//console.log(dict_en[value.name]);
|
//console.log(dict_en[value.name]);
|
||||||
infNodes.push({ Node: key, Influence: 1 });
|
infNodes.push({ Node: key, Influence: 1 });
|
||||||
|
@ -23,7 +23,6 @@ const dojoDecoSchema = new Schema<IDojoDecoDatabase>({
|
|||||||
Type: String,
|
Type: String,
|
||||||
Pos: [Number],
|
Pos: [Number],
|
||||||
Rot: [Number],
|
Rot: [Number],
|
||||||
Scale: Number,
|
|
||||||
Name: String,
|
Name: String,
|
||||||
Sockets: Number,
|
Sockets: Number,
|
||||||
RegularCredits: Number,
|
RegularCredits: Number,
|
||||||
|
@ -222,7 +222,6 @@ export const getDojoClient = async (
|
|||||||
Type: deco.Type,
|
Type: deco.Type,
|
||||||
Pos: deco.Pos,
|
Pos: deco.Pos,
|
||||||
Rot: deco.Rot,
|
Rot: deco.Rot,
|
||||||
Scale: deco.Scale,
|
|
||||||
Name: deco.Name,
|
Name: deco.Name,
|
||||||
Sockets: deco.Sockets,
|
Sockets: deco.Sockets,
|
||||||
PictureFrameInfo: deco.PictureFrameInfo
|
PictureFrameInfo: deco.PictureFrameInfo
|
||||||
|
@ -532,11 +532,7 @@ export const addItem = async (
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...inventoryChanges,
|
...inventoryChanges,
|
||||||
...occupySlot(
|
...occupySlot(inventory, InventorySlot.WEAPONS, premiumPurchase)
|
||||||
inventory,
|
|
||||||
productCategoryToInventoryBin(weapon.productCategory) ?? InventorySlot.WEAPONS,
|
|
||||||
premiumPurchase
|
|
||||||
)
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// Modular weapon parts
|
// Modular weapon parts
|
||||||
@ -584,7 +580,7 @@ export const addItem = async (
|
|||||||
}
|
}
|
||||||
if (typeName in ExportFusionBundles) {
|
if (typeName in ExportFusionBundles) {
|
||||||
const fusionPointsTotal = ExportFusionBundles[typeName].fusionPoints * quantity;
|
const fusionPointsTotal = ExportFusionBundles[typeName].fusionPoints * quantity;
|
||||||
addFusionPoints(inventory, fusionPointsTotal);
|
inventory.FusionPoints += fusionPointsTotal;
|
||||||
return {
|
return {
|
||||||
FusionPoints: fusionPointsTotal
|
FusionPoints: fusionPointsTotal
|
||||||
};
|
};
|
||||||
@ -825,8 +821,7 @@ const addSentinel = (
|
|||||||
|
|
||||||
const features = premiumPurchase ? EquipmentFeatures.DOUBLE_CAPACITY : undefined;
|
const features = premiumPurchase ? EquipmentFeatures.DOUBLE_CAPACITY : undefined;
|
||||||
const sentinelIndex =
|
const sentinelIndex =
|
||||||
inventory.Sentinels.push({ ItemType: sentinelName, Configs: configs, XP: 0, Features: features, IsNew: true }) -
|
inventory.Sentinels.push({ ItemType: sentinelName, Configs: configs, XP: 0, Features: features }) - 1;
|
||||||
1;
|
|
||||||
inventoryChanges.Sentinels ??= [];
|
inventoryChanges.Sentinels ??= [];
|
||||||
inventoryChanges.Sentinels.push(inventory.Sentinels[sentinelIndex].toJSON<IEquipmentClient>());
|
inventoryChanges.Sentinels.push(inventory.Sentinels[sentinelIndex].toJSON<IEquipmentClient>());
|
||||||
|
|
||||||
@ -1074,15 +1069,6 @@ export const updateCurrency = (
|
|||||||
return currencyChanges;
|
return currencyChanges;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const addFusionPoints = (inventory: TInventoryDatabaseDocument, add: number): number => {
|
|
||||||
if (inventory.FusionPoints + add > 2147483647) {
|
|
||||||
logger.warn(`capping FusionPoints balance at 2147483647`);
|
|
||||||
add = 2147483647 - inventory.FusionPoints;
|
|
||||||
}
|
|
||||||
inventory.FusionPoints += add;
|
|
||||||
return add;
|
|
||||||
};
|
|
||||||
|
|
||||||
const standingLimitBinToInventoryKey: Record<
|
const standingLimitBinToInventoryKey: Record<
|
||||||
Exclude<TStandingLimitBin, "STANDING_LIMIT_BIN_NONE">,
|
Exclude<TStandingLimitBin, "STANDING_LIMIT_BIN_NONE">,
|
||||||
keyof IDailyAffiliations
|
keyof IDailyAffiliations
|
||||||
|
@ -19,7 +19,6 @@ import {
|
|||||||
addCrewShipRawSalvage,
|
addCrewShipRawSalvage,
|
||||||
addEmailItem,
|
addEmailItem,
|
||||||
addFocusXpIncreases,
|
addFocusXpIncreases,
|
||||||
addFusionPoints,
|
|
||||||
addFusionTreasures,
|
addFusionTreasures,
|
||||||
addGearExpByCategory,
|
addGearExpByCategory,
|
||||||
addItem,
|
addItem,
|
||||||
@ -44,7 +43,7 @@ import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/invento
|
|||||||
import { getEntriesUnsafe } from "@/src/utils/ts-utils";
|
import { getEntriesUnsafe } from "@/src/utils/ts-utils";
|
||||||
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { handleStoreItemAcquisition } from "./purchaseService";
|
import { handleStoreItemAcquisition } from "./purchaseService";
|
||||||
import { IMissionCredits, IMissionReward } from "../types/missionTypes";
|
import { IMissionReward } from "../types/missionTypes";
|
||||||
import { crackRelic } from "@/src/helpers/relicHelper";
|
import { crackRelic } from "@/src/helpers/relicHelper";
|
||||||
import { createMessage } from "./inboxService";
|
import { createMessage } from "./inboxService";
|
||||||
import kuriaMessage50 from "@/static/fixed_responses/kuriaMessages/fiftyPercent.json";
|
import kuriaMessage50 from "@/static/fixed_responses/kuriaMessages/fiftyPercent.json";
|
||||||
@ -288,14 +287,14 @@ export const addMissionInventoryUpdates = async (
|
|||||||
addShipDecorations(inventory, value);
|
addShipDecorations(inventory, value);
|
||||||
break;
|
break;
|
||||||
case "FusionBundles": {
|
case "FusionBundles": {
|
||||||
let fusionPointsDelta = 0;
|
let fusionPoints = 0;
|
||||||
for (const fusionBundle of value) {
|
for (const fusionBundle of value) {
|
||||||
fusionPointsDelta += addFusionPoints(
|
const fusionPointsTotal =
|
||||||
inventory,
|
ExportFusionBundles[fusionBundle.ItemType].fusionPoints * fusionBundle.ItemCount;
|
||||||
ExportFusionBundles[fusionBundle.ItemType].fusionPoints * fusionBundle.ItemCount
|
inventory.FusionPoints += fusionPointsTotal;
|
||||||
);
|
fusionPoints += fusionPointsTotal;
|
||||||
}
|
}
|
||||||
inventoryChanges.FusionPoints = fusionPointsDelta;
|
inventoryChanges.FusionPoints = fusionPoints;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "EmailItems": {
|
case "EmailItems": {
|
||||||
@ -587,140 +586,8 @@ interface AddMissionRewardsReturnType {
|
|||||||
credits?: IMissionCredits;
|
credits?: IMissionCredits;
|
||||||
AffiliationMods?: IAffiliationMods[];
|
AffiliationMods?: IAffiliationMods[];
|
||||||
SyndicateXPItemReward?: number;
|
SyndicateXPItemReward?: number;
|
||||||
ConquestCompletedMissionsCount?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IConquestReward {
|
|
||||||
at: number;
|
|
||||||
pool: IRngResult[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const labConquestRewards: IConquestReward[] = [
|
|
||||||
{
|
|
||||||
at: 5,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/EntratiLabConquestRewards/EntratiLabConquestSilverRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 10,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/EntratiLabConquestRewards/EntratiLabConquestSilverRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 15,
|
|
||||||
pool: [
|
|
||||||
{
|
|
||||||
type: "/Lotus/StoreItems/Types/Gameplay/EntratiLab/Resources/EntratiLanthornBundle",
|
|
||||||
itemCount: 3,
|
|
||||||
probability: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 20,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/EntratiLabConquestRewards/EntratiLabConquestGoldRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 28,
|
|
||||||
pool: [
|
|
||||||
{
|
|
||||||
type: "/Lotus/StoreItems/Types/Items/MiscItems/DistillPoints",
|
|
||||||
itemCount: 20,
|
|
||||||
probability: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 31,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/EntratiLabConquestRewards/EntratiLabConquestGoldRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 34,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/EntratiLabConquestRewards/EntratiLabConquestArcaneRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 37,
|
|
||||||
pool: [
|
|
||||||
{
|
|
||||||
type: "/Lotus/StoreItems/Types/Items/MiscItems/DistillPoints",
|
|
||||||
itemCount: 50,
|
|
||||||
probability: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const hexConquestRewards: IConquestReward[] = [
|
|
||||||
{
|
|
||||||
at: 5,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/1999ConquestRewards/1999ConquestSilverRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 10,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/1999ConquestRewards/1999ConquestSilverRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 15,
|
|
||||||
pool: [
|
|
||||||
{
|
|
||||||
type: "/Lotus/StoreItems/Types/BoosterPacks/1999StickersPackEchoesArchimedea",
|
|
||||||
itemCount: 1,
|
|
||||||
probability: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 20,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/1999ConquestRewards/1999ConquestGoldRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 28,
|
|
||||||
pool: [
|
|
||||||
{
|
|
||||||
type: "/Lotus/StoreItems/Types/Items/MiscItems/1999ConquestBucks",
|
|
||||||
itemCount: 6,
|
|
||||||
probability: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 31,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/1999ConquestRewards/1999ConquestGoldRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 34,
|
|
||||||
pool: ExportRewards[
|
|
||||||
"/Lotus/Types/Game/MissionDecks/1999ConquestRewards/1999ConquestArcaneRewards"
|
|
||||||
][0] as IRngResult[]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
at: 37,
|
|
||||||
pool: [
|
|
||||||
{
|
|
||||||
type: "/Lotus/StoreItems/Types/Items/MiscItems/1999ConquestBucks",
|
|
||||||
itemCount: 9,
|
|
||||||
probability: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
//TODO: return type of partial missioninventoryupdate response
|
//TODO: return type of partial missioninventoryupdate response
|
||||||
export const addMissionRewards = async (
|
export const addMissionRewards = async (
|
||||||
inventory: TInventoryDatabaseDocument,
|
inventory: TInventoryDatabaseDocument,
|
||||||
@ -753,7 +620,6 @@ export const addMissionRewards = async (
|
|||||||
const inventoryChanges: IInventoryChanges = {};
|
const inventoryChanges: IInventoryChanges = {};
|
||||||
const AffiliationMods: IAffiliationMods[] = [];
|
const AffiliationMods: IAffiliationMods[] = [];
|
||||||
let SyndicateXPItemReward;
|
let SyndicateXPItemReward;
|
||||||
let ConquestCompletedMissionsCount;
|
|
||||||
|
|
||||||
let missionCompletionCredits = 0;
|
let missionCompletionCredits = 0;
|
||||||
//inventory change is what the client has not rewarded itself, also the client needs to know the credit changes for display
|
//inventory change is what the client has not rewarded itself, also the client needs to know the credit changes for display
|
||||||
@ -825,62 +691,6 @@ export const addMissionRewards = async (
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rewardInfo.ConquestCompleted !== undefined) {
|
|
||||||
let score = 1;
|
|
||||||
if (rewardInfo.ConquestHardModeActive === 1) score += 3;
|
|
||||||
|
|
||||||
if (rewardInfo.ConquestPersonalModifiersActive !== undefined)
|
|
||||||
score += rewardInfo.ConquestPersonalModifiersActive;
|
|
||||||
if (rewardInfo.ConquestEquipmentSuggestionsFulfilled !== undefined)
|
|
||||||
score += rewardInfo.ConquestEquipmentSuggestionsFulfilled;
|
|
||||||
|
|
||||||
score *= rewardInfo.ConquestCompleted + 1;
|
|
||||||
|
|
||||||
if (rewardInfo.ConquestCompleted == 2 && rewardInfo.ConquestHardModeActive === 1) score += 1;
|
|
||||||
|
|
||||||
logger.debug(`completed conquest mission ${rewardInfo.ConquestCompleted + 1} for a score of ${score}`);
|
|
||||||
|
|
||||||
const conquestType = rewardInfo.ConquestType;
|
|
||||||
const conquestNode =
|
|
||||||
conquestType == "HexConquest" ? "EchoesHexConquestHardModeUnlocked" : "EntratiLabConquestHardModeUnlocked";
|
|
||||||
if (score >= 25 && inventory.NodeIntrosCompleted.indexOf(conquestNode) == -1)
|
|
||||||
inventory.NodeIntrosCompleted.push(conquestNode);
|
|
||||||
|
|
||||||
if (conquestType == "HexConquest") {
|
|
||||||
inventory.EchoesHexConquestCacheScoreMission ??= 0;
|
|
||||||
if (score > inventory.EchoesHexConquestCacheScoreMission) {
|
|
||||||
for (const reward of hexConquestRewards) {
|
|
||||||
if (score >= reward.at && inventory.EchoesHexConquestCacheScoreMission < reward.at) {
|
|
||||||
const rolled = getRandomReward(reward.pool)!;
|
|
||||||
logger.debug(`rolled hex conquest reward for reaching ${reward.at} points`, rolled);
|
|
||||||
MissionRewards.push({
|
|
||||||
StoreItem: rolled.type,
|
|
||||||
ItemCount: rolled.itemCount
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
inventory.EchoesHexConquestCacheScoreMission = score;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
inventory.EntratiLabConquestCacheScoreMission ??= 0;
|
|
||||||
if (score > inventory.EntratiLabConquestCacheScoreMission) {
|
|
||||||
for (const reward of labConquestRewards) {
|
|
||||||
if (score >= reward.at && inventory.EntratiLabConquestCacheScoreMission < reward.at) {
|
|
||||||
const rolled = getRandomReward(reward.pool)!;
|
|
||||||
logger.debug(`rolled lab conquest reward for reaching ${reward.at} points`, rolled);
|
|
||||||
MissionRewards.push({
|
|
||||||
StoreItem: rolled.type,
|
|
||||||
ItemCount: rolled.itemCount
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
inventory.EntratiLabConquestCacheScoreMission = score;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ConquestCompletedMissionsCount = rewardInfo.ConquestCompleted == 2 ? 0 : rewardInfo.ConquestCompleted + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const reward of MissionRewards) {
|
for (const reward of MissionRewards) {
|
||||||
const inventoryChange = await handleStoreItemAcquisition(
|
const inventoryChange = await handleStoreItemAcquisition(
|
||||||
reward.StoreItem,
|
reward.StoreItem,
|
||||||
@ -1072,16 +882,16 @@ export const addMissionRewards = async (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return { inventoryChanges, MissionRewards, credits, AffiliationMods, SyndicateXPItemReward };
|
||||||
inventoryChanges,
|
|
||||||
MissionRewards,
|
|
||||||
credits,
|
|
||||||
AffiliationMods,
|
|
||||||
SyndicateXPItemReward,
|
|
||||||
ConquestCompletedMissionsCount
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
interface IMissionCredits {
|
||||||
|
MissionCredits: number[];
|
||||||
|
CreditBonus: number[];
|
||||||
|
TotalCredits: number[];
|
||||||
|
DailyMissionBonus?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
//creditBonus is not entirely accurate.
|
//creditBonus is not entirely accurate.
|
||||||
//TODO: consider ActiveBoosters
|
//TODO: consider ActiveBoosters
|
||||||
export const addCredits = (
|
export const addCredits = (
|
||||||
|
@ -223,7 +223,7 @@ export const handlePurchase = async (
|
|||||||
const vendor = ExportVendors[purchaseRequest.PurchaseParams.SourceId!];
|
const vendor = ExportVendors[purchaseRequest.PurchaseParams.SourceId!];
|
||||||
const offer = vendor.items.find(x => x.storeItem == purchaseRequest.PurchaseParams.StoreItem);
|
const offer = vendor.items.find(x => x.storeItem == purchaseRequest.PurchaseParams.StoreItem);
|
||||||
if (offer) {
|
if (offer) {
|
||||||
if (typeof offer.credits == "number") {
|
if (offer.credits) {
|
||||||
combineInventoryChanges(
|
combineInventoryChanges(
|
||||||
purchaseResponse.InventoryChanges,
|
purchaseResponse.InventoryChanges,
|
||||||
updateCurrency(inventory, offer.credits, false)
|
updateCurrency(inventory, offer.credits, false)
|
||||||
|
@ -1,18 +1,10 @@
|
|||||||
import staticWorldState from "@/static/fixed_responses/worldState/worldState.json";
|
import staticWorldState from "@/static/fixed_responses/worldState/worldState.json";
|
||||||
import sortieTilesets from "@/static/fixed_responses/worldState/sortieTilesets.json";
|
|
||||||
import { buildConfig } from "@/src/services/buildConfigService";
|
import { buildConfig } from "@/src/services/buildConfigService";
|
||||||
import { unixTimesInMs } from "@/src/constants/timeConstants";
|
import { unixTimesInMs } from "@/src/constants/timeConstants";
|
||||||
import { config } from "@/src/services/configService";
|
import { config } from "@/src/services/configService";
|
||||||
import { CRng } from "@/src/services/rngService";
|
import { CRng } from "@/src/services/rngService";
|
||||||
import { eMissionType, ExportNightwave, ExportRegions, IRegion } from "warframe-public-export-plus";
|
import { eMissionType, ExportNightwave, ExportRegions } from "warframe-public-export-plus";
|
||||||
import {
|
import { ICalendarDay, ICalendarSeason, ILiteSortie, ISeasonChallenge, IWorldState } from "../types/worldStateTypes";
|
||||||
ICalendarDay,
|
|
||||||
ICalendarSeason,
|
|
||||||
ILiteSortie,
|
|
||||||
ISeasonChallenge,
|
|
||||||
ISortieMission,
|
|
||||||
IWorldState
|
|
||||||
} from "../types/worldStateTypes";
|
|
||||||
|
|
||||||
const sortieBosses = [
|
const sortieBosses = [
|
||||||
"SORTIE_BOSS_HYENA",
|
"SORTIE_BOSS_HYENA",
|
||||||
@ -185,7 +177,7 @@ const pushSyndicateMissions = (
|
|||||||
const nodeOptions: string[] = [];
|
const nodeOptions: string[] = [];
|
||||||
for (const [key, value] of Object.entries(ExportRegions)) {
|
for (const [key, value] of Object.entries(ExportRegions)) {
|
||||||
if (
|
if (
|
||||||
!isArchwingMission(value) &&
|
value.name.indexOf("Archwing") == -1 && // no archwing
|
||||||
value.systemIndex != 23 && // no 1999 stuff
|
value.systemIndex != 23 && // no 1999 stuff
|
||||||
value.missionIndex != 10 && // Exclude MT_PVP (for relays)
|
value.missionIndex != 10 && // Exclude MT_PVP (for relays)
|
||||||
value.missionIndex != 23 && // no junctions
|
value.missionIndex != 23 && // no junctions
|
||||||
@ -269,14 +261,14 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
|
|||||||
if (
|
if (
|
||||||
sortieFactionToSystemIndexes[sortieBossToFaction[boss]].includes(value.systemIndex) &&
|
sortieFactionToSystemIndexes[sortieBossToFaction[boss]].includes(value.systemIndex) &&
|
||||||
sortieFactionToFactionIndexes[sortieBossToFaction[boss]].includes(value.factionIndex!) &&
|
sortieFactionToFactionIndexes[sortieBossToFaction[boss]].includes(value.factionIndex!) &&
|
||||||
!isArchwingMission(value) &&
|
value.name.indexOf("Archwing") == -1 &&
|
||||||
value.missionIndex != 0 && // Exclude MT_ASSASSINATION
|
value.missionIndex != 0 && // Exclude MT_ASSASSINATION
|
||||||
|
value.missionIndex != 5 && // Exclude MT_CAPTURE
|
||||||
value.missionIndex != 10 && // Exclude MT_PVP (for relays)
|
value.missionIndex != 10 && // Exclude MT_PVP (for relays)
|
||||||
value.missionIndex != 21 && // Exclude MT_PURIFY
|
value.missionIndex != 21 && // Exclude MT_PURIFY
|
||||||
value.missionIndex != 22 && // Exclude MT_ARENA
|
value.missionIndex != 22 && // Exclude MT_ARENA
|
||||||
value.missionIndex != 23 && // Exclude MT_JUNCTION
|
value.missionIndex != 23 && // Exclude MT_JUNCTION
|
||||||
(value.missionIndex != 28 || value.systemIndex == 2) && // MT_LANDSCAPE only on Earth
|
value.missionIndex <= 28
|
||||||
value.missionIndex < 29
|
|
||||||
) {
|
) {
|
||||||
if (!availableMissionIndexes.includes(value.missionIndex)) {
|
if (!availableMissionIndexes.includes(value.missionIndex)) {
|
||||||
availableMissionIndexes.push(value.missionIndex);
|
availableMissionIndexes.push(value.missionIndex);
|
||||||
@ -285,7 +277,7 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectedNodes: ISortieMission[] = [];
|
const selectedNodes: { missionType: string; modifierType: string; node: string }[] = [];
|
||||||
const missionTypes = new Set();
|
const missionTypes = new Set();
|
||||||
|
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
@ -306,21 +298,11 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
|
|||||||
const modifierType = rng.randomElement(filteredModifiers);
|
const modifierType = rng.randomElement(filteredModifiers);
|
||||||
|
|
||||||
if (boss == "SORTIE_BOSS_PHORID") {
|
if (boss == "SORTIE_BOSS_PHORID") {
|
||||||
selectedNodes.push({
|
selectedNodes.push({ missionType: "MT_ASSASSINATION", modifierType, node });
|
||||||
missionType: "MT_ASSASSINATION",
|
|
||||||
modifierType,
|
|
||||||
node,
|
|
||||||
tileset: sortieTilesets[node as keyof typeof sortieTilesets]
|
|
||||||
});
|
|
||||||
nodes.splice(randomIndex, 1);
|
nodes.splice(randomIndex, 1);
|
||||||
continue;
|
continue;
|
||||||
} else if (sortieBossNode[boss]) {
|
} else if (sortieBossNode[boss]) {
|
||||||
selectedNodes.push({
|
selectedNodes.push({ missionType: "MT_ASSASSINATION", modifierType, node: sortieBossNode[boss] });
|
||||||
missionType: "MT_ASSASSINATION",
|
|
||||||
modifierType,
|
|
||||||
node: sortieBossNode[boss],
|
|
||||||
tileset: sortieTilesets[sortieBossNode[boss] as keyof typeof sortieTilesets]
|
|
||||||
});
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -339,12 +321,7 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
|
|||||||
|
|
||||||
const modifierType = rng.randomElement(filteredModifiers);
|
const modifierType = rng.randomElement(filteredModifiers);
|
||||||
|
|
||||||
selectedNodes.push({
|
selectedNodes.push({ missionType, modifierType, node });
|
||||||
missionType,
|
|
||||||
modifierType,
|
|
||||||
node,
|
|
||||||
tileset: sortieTilesets[node as keyof typeof sortieTilesets]
|
|
||||||
});
|
|
||||||
nodes.splice(randomIndex, 1);
|
nodes.splice(randomIndex, 1);
|
||||||
missionTypes.add(missionType);
|
missionTypes.add(missionType);
|
||||||
}
|
}
|
||||||
@ -1112,7 +1089,7 @@ export const getLiteSortie = (week: number): ILiteSortie => {
|
|||||||
value.systemIndex === systemIndex &&
|
value.systemIndex === systemIndex &&
|
||||||
value.factionIndex !== undefined &&
|
value.factionIndex !== undefined &&
|
||||||
value.factionIndex < 2 &&
|
value.factionIndex < 2 &&
|
||||||
!isArchwingMission(value) &&
|
value.name.indexOf("Archwing") == -1 &&
|
||||||
value.missionIndex != 0 // Exclude MT_ASSASSINATION
|
value.missionIndex != 0 // Exclude MT_ASSASSINATION
|
||||||
) {
|
) {
|
||||||
nodes.push(key);
|
nodes.push(key);
|
||||||
@ -1163,14 +1140,3 @@ export const getLiteSortie = (week: number): ILiteSortie => {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const isArchwingMission = (node: IRegion): boolean => {
|
|
||||||
if (node.name.indexOf("Archwing") != -1) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// SettlementNode10
|
|
||||||
if (node.missionIndex == 25) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
@ -206,7 +206,6 @@ export interface IDojoDecoClient {
|
|||||||
Type: string;
|
Type: string;
|
||||||
Pos: number[];
|
Pos: number[];
|
||||||
Rot: number[];
|
Rot: number[];
|
||||||
Scale?: number;
|
|
||||||
Name?: string; // for teleporters
|
Name?: string; // for teleporters
|
||||||
Sockets?: number;
|
Sockets?: number;
|
||||||
RegularCredits?: number;
|
RegularCredits?: number;
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import { IAffiliationMods, IInventoryChanges } from "./purchaseTypes";
|
|
||||||
|
|
||||||
export const inventoryFields = ["RawUpgrades", "MiscItems", "Consumables", "Recipes"] as const;
|
export const inventoryFields = ["RawUpgrades", "MiscItems", "Consumables", "Recipes"] as const;
|
||||||
export type IInventoryFieldType = (typeof inventoryFields)[number];
|
export type IInventoryFieldType = (typeof inventoryFields)[number];
|
||||||
|
|
||||||
@ -13,20 +11,3 @@ export interface IMissionReward {
|
|||||||
FromEnemyCache?: boolean;
|
FromEnemyCache?: boolean;
|
||||||
IsStrippedItem?: boolean;
|
IsStrippedItem?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IMissionCredits {
|
|
||||||
MissionCredits: number[];
|
|
||||||
CreditBonus: number[];
|
|
||||||
TotalCredits: number[];
|
|
||||||
DailyMissionBonus?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IMissionInventoryUpdateResponse extends Partial<IMissionCredits> {
|
|
||||||
ConquestCompletedMissionsCount?: number;
|
|
||||||
InventoryJson?: string;
|
|
||||||
MissionRewards?: IMissionReward[];
|
|
||||||
InventoryChanges?: IInventoryChanges;
|
|
||||||
FusionPoints?: number;
|
|
||||||
SyndicateXPItemReward?: number;
|
|
||||||
AffiliationMods?: IAffiliationMods[];
|
|
||||||
}
|
|
||||||
|
@ -125,7 +125,6 @@ export type IMissionInventoryUpdateRequest = {
|
|||||||
wagerTier?: number; // the index
|
wagerTier?: number; // the index
|
||||||
creditsFee?: number; // the index
|
creditsFee?: number; // the index
|
||||||
InvasionProgress?: IInvasionProgressClient[];
|
InvasionProgress?: IInvasionProgressClient[];
|
||||||
ConquestMissionsCompleted?: number;
|
|
||||||
} & {
|
} & {
|
||||||
[K in TEquipmentKey]?: IEquipmentClient[];
|
[K in TEquipmentKey]?: IEquipmentClient[];
|
||||||
};
|
};
|
||||||
@ -151,12 +150,7 @@ export interface IRewardInfo {
|
|||||||
PurgatoryRewardQualifications?: string;
|
PurgatoryRewardQualifications?: string;
|
||||||
rewardSeed?: number | bigint;
|
rewardSeed?: number | bigint;
|
||||||
periodicMissionTag?: string;
|
periodicMissionTag?: string;
|
||||||
ConquestType?: string;
|
|
||||||
ConquestCompleted?: number;
|
|
||||||
ConquestEquipmentSuggestionsFulfilled?: number;
|
|
||||||
ConquestPersonalModifiersActive?: number;
|
|
||||||
ConquestStickersActive?: number;
|
|
||||||
ConquestHardModeActive?: number;
|
|
||||||
// for bounties, only EOM_AFK and node are given from above, plus:
|
// for bounties, only EOM_AFK and node are given from above, plus:
|
||||||
JobTier?: number;
|
JobTier?: number;
|
||||||
jobId?: string;
|
jobId?: string;
|
||||||
|
@ -97,13 +97,6 @@ export interface ISortie {
|
|||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISortieMission {
|
|
||||||
missionType: string;
|
|
||||||
modifierType: string;
|
|
||||||
node: string;
|
|
||||||
tileset: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ILiteSortie {
|
export interface ILiteSortie {
|
||||||
_id: IOid;
|
_id: IOid;
|
||||||
Activation: IMongoDate;
|
Activation: IMongoDate;
|
||||||
|
@ -1,175 +0,0 @@
|
|||||||
{
|
|
||||||
"SettlementNode1": "CorpusShipTileset",
|
|
||||||
"SettlementNode11": "CorpusShipTileset",
|
|
||||||
"SettlementNode12": "CorpusShipTileset",
|
|
||||||
"SettlementNode14": "CorpusShipTileset",
|
|
||||||
"SettlementNode15": "CorpusShipTileset",
|
|
||||||
"SettlementNode2": "CorpusShipTileset",
|
|
||||||
"SettlementNode20": "CorpusShipTileset",
|
|
||||||
"SettlementNode3": "CorpusShipTileset",
|
|
||||||
"SolNode1": "CorpusOutpostTileset",
|
|
||||||
"SolNode10": "CorpusGasCityTileset",
|
|
||||||
"SolNode100": "CorpusGasCityTileset",
|
|
||||||
"SolNode101": "CorpusOutpostTileset",
|
|
||||||
"SolNode102": "CorpusShipTileset",
|
|
||||||
"SolNode103": "GrineerAsteroidTileset",
|
|
||||||
"SolNode104": "CorpusShipTileset",
|
|
||||||
"SolNode105": "GrineerOceanTilesetAnywhere",
|
|
||||||
"SolNode106": "GrineerSettlementTileset",
|
|
||||||
"SolNode107": "CorpusOutpostTileset",
|
|
||||||
"SolNode108": "GrineerAsteroidTileset",
|
|
||||||
"SolNode109": "CorpusOutpostTileset",
|
|
||||||
"SolNode11": "GrineerSettlementTileset",
|
|
||||||
"SolNode113": "GrineerSettlementTileset",
|
|
||||||
"SolNode118": "CorpusShipTileset",
|
|
||||||
"SolNode119": "GrineerAsteroidTileset",
|
|
||||||
"SolNode12": "GrineerAsteroidTileset",
|
|
||||||
"SolNode121": "CorpusGasCityTileset",
|
|
||||||
"SolNode122": "GrineerOceanTileset",
|
|
||||||
"SolNode123": "CorpusShipTileset",
|
|
||||||
"SolNode125": "CorpusGasCityTileset",
|
|
||||||
"SolNode126": "CorpusGasCityTileset",
|
|
||||||
"SolNode127": "CorpusShipTileset",
|
|
||||||
"SolNode128": "CorpusOutpostTileset",
|
|
||||||
"SolNode130": "GrineerAsteroidTileset",
|
|
||||||
"SolNode131": "GrineerShipyardsTileset",
|
|
||||||
"SolNode132": "GrineerShipyardsTileset",
|
|
||||||
"SolNode135": "GrineerGalleonTileset",
|
|
||||||
"SolNode137": "GrineerShipyardsTileset",
|
|
||||||
"SolNode138": "GrineerShipyardsTileset",
|
|
||||||
"SolNode139": "GrineerShipyardsTileset",
|
|
||||||
"SolNode14": "CorpusIcePlanetTilesetCaves",
|
|
||||||
"SolNode140": "GrineerShipyardsTileset",
|
|
||||||
"SolNode141": "GrineerShipyardsTileset",
|
|
||||||
"SolNode144": "GrineerShipyardsTileset",
|
|
||||||
"SolNode146": "GrineerAsteroidTileset",
|
|
||||||
"SolNode147": "GrineerShipyardsTileset",
|
|
||||||
"SolNode149": "GrineerShipyardsTileset",
|
|
||||||
"SolNode15": "GrineerGalleonTileset",
|
|
||||||
"SolNode16": "GrineerSettlementTileset",
|
|
||||||
"SolNode162": "InfestedCorpusShipTileset",
|
|
||||||
"SolNode164": "InfestedCorpusShipTileset",
|
|
||||||
"SolNode166": "InfestedCorpusShipTileset",
|
|
||||||
"SolNode17": "CorpusShipTileset",
|
|
||||||
"SolNode171": "InfestedCorpusShipTileset",
|
|
||||||
"SolNode172": "CorpusShipTileset",
|
|
||||||
"SolNode173": "InfestedCorpusShipTileset",
|
|
||||||
"SolNode175": "InfestedCorpusShipTileset",
|
|
||||||
"SolNode177": "GrineerGalleonTileset",
|
|
||||||
"SolNode18": "GrineerAsteroidTileset",
|
|
||||||
"SolNode181": "GrineerAsteroidTileset",
|
|
||||||
"SolNode184": "GrineerGalleonTileset",
|
|
||||||
"SolNode185": "GrineerGalleonTileset",
|
|
||||||
"SolNode187": "GrineerAsteroidTileset",
|
|
||||||
"SolNode188": "GrineerGalleonTileset",
|
|
||||||
"SolNode189": "GrineerGalleonTileset",
|
|
||||||
"SolNode19": "GrineerAsteroidTileset",
|
|
||||||
"SolNode191": "GrineerShipyardsTileset",
|
|
||||||
"SolNode193": "GrineerAsteroidTileset",
|
|
||||||
"SolNode195": "GrineerGalleonTileset",
|
|
||||||
"SolNode196": "GrineerGalleonTileset",
|
|
||||||
"SolNode2": "CorpusOutpostTileset",
|
|
||||||
"SolNode20": "GrineerGalleonTileset",
|
|
||||||
"SolNode203": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode205": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode209": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode21": "CorpusOutpostTileset",
|
|
||||||
"SolNode210": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode211": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode212": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode214": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode215": "CorpusShipTileset",
|
|
||||||
"SolNode216": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode217": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode22": "CorpusOutpostTileset",
|
|
||||||
"SolNode220": "CorpusIcePlanetTileset",
|
|
||||||
"SolNode223": "GrineerAsteroidTileset",
|
|
||||||
"SolNode224": "GrineerGalleonTileset",
|
|
||||||
"SolNode225": "GrineerGalleonTileset",
|
|
||||||
"SolNode226": "GrineerGalleonTileset",
|
|
||||||
"SolNode228": "EidolonTileset",
|
|
||||||
"SolNode23": "CorpusShipTileset",
|
|
||||||
"SolNode24": "GrineerForestTileset",
|
|
||||||
"SolNode25": "CorpusGasCityTileset",
|
|
||||||
"SolNode26": "GrineerForestTileset",
|
|
||||||
"SolNode30": "GrineerSettlementTileset",
|
|
||||||
"SolNode300": "OrokinMoonTilesetGrineer",
|
|
||||||
"SolNode301": "OrokinMoonTilesetGrineer",
|
|
||||||
"SolNode302": "OrokinMoonTilesetCorpus",
|
|
||||||
"SolNode304": "OrokinMoonTilesetCorpus",
|
|
||||||
"SolNode305": "OrokinMoonTilesetGrineer",
|
|
||||||
"SolNode306": "OrokinMoonTilesetCorpus",
|
|
||||||
"SolNode307": "OrokinMoonTilesetCorpus",
|
|
||||||
"SolNode308": "OrokinMoonTilesetCorpus",
|
|
||||||
"SolNode31": "GrineerGalleonTileset",
|
|
||||||
"SolNode32": "GrineerGalleonTileset",
|
|
||||||
"SolNode36": "GrineerSettlementTileset",
|
|
||||||
"SolNode38": "CorpusOutpostTileset",
|
|
||||||
"SolNode39": "GrineerForestTileset",
|
|
||||||
"SolNode4": "CorpusShipTileset",
|
|
||||||
"SolNode400": "OrokinVoidTileset",
|
|
||||||
"SolNode401": "OrokinVoidTileset",
|
|
||||||
"SolNode402": "OrokinVoidTileset",
|
|
||||||
"SolNode403": "OrokinVoidTileset",
|
|
||||||
"SolNode404": "OrokinVoidTileset",
|
|
||||||
"SolNode405": "OrokinVoidTileset",
|
|
||||||
"SolNode406": "OrokinVoidTileset",
|
|
||||||
"SolNode407": "OrokinVoidTileset",
|
|
||||||
"SolNode408": "OrokinVoidTileset",
|
|
||||||
"SolNode409": "OrokinVoidTileset",
|
|
||||||
"SolNode41": "GrineerSettlementTileset",
|
|
||||||
"SolNode410": "OrokinVoidTileset",
|
|
||||||
"SolNode412": "OrokinVoidTileset",
|
|
||||||
"SolNode42": "GrineerGalleonTileset",
|
|
||||||
"SolNode43": "CorpusOutpostTileset",
|
|
||||||
"SolNode45": "GrineerSettlementTileset",
|
|
||||||
"SolNode46": "GrineerSettlementTileset",
|
|
||||||
"SolNode48": "CorpusOutpostTileset",
|
|
||||||
"SolNode49": "CorpusShipTileset",
|
|
||||||
"SolNode50": "GrineerAsteroidTileset",
|
|
||||||
"SolNode51": "CorpusOutpostTileset",
|
|
||||||
"SolNode53": "CorpusGasCityTileset",
|
|
||||||
"SolNode56": "CorpusShipTileset",
|
|
||||||
"SolNode57": "CorpusOutpostTileset",
|
|
||||||
"SolNode58": "GrineerSettlementTileset",
|
|
||||||
"SolNode59": "GrineerForestTileset",
|
|
||||||
"SolNode6": "CorpusOutpostTileset",
|
|
||||||
"SolNode61": "CorpusShipTileset",
|
|
||||||
"SolNode62": "CorpusIcePlanetTilesetCaves",
|
|
||||||
"SolNode64": "GrineerOceanTileset",
|
|
||||||
"SolNode66": "CorpusOutpostTileset",
|
|
||||||
"SolNode67": "GrineerAsteroidTileset",
|
|
||||||
"SolNode68": "GrineerGalleonTileset",
|
|
||||||
"SolNode70": "GrineerGalleonTileset",
|
|
||||||
"SolNode706": "OrokinDerelictTileset",
|
|
||||||
"SolNode707": "OrokinDerelictTileset",
|
|
||||||
"SolNode708": "OrokinDerelictTileset",
|
|
||||||
"SolNode709": "OrokinDerelictTileset",
|
|
||||||
"SolNode710": "OrokinDerelictTileset",
|
|
||||||
"SolNode711": "OrokinDerelictTileset",
|
|
||||||
"SolNode712": "OrokinDerelictTileset",
|
|
||||||
"SolNode713": "OrokinDerelictTileset",
|
|
||||||
"SolNode72": "CorpusOutpostTileset",
|
|
||||||
"SolNode73": "CorpusGasCityTileset",
|
|
||||||
"SolNode74": "CorpusGasCityTileset",
|
|
||||||
"SolNode741": "GrineerFortressTileset",
|
|
||||||
"SolNode742": "GrineerFortressTileset",
|
|
||||||
"SolNode743": "GrineerFortressTileset",
|
|
||||||
"SolNode744": "GrineerFortressTileset",
|
|
||||||
"SolNode745": "GrineerFortressTileset",
|
|
||||||
"SolNode746": "GrineerFortressTileset",
|
|
||||||
"SolNode747": "GrineerFortressTileset",
|
|
||||||
"SolNode748": "GrineerFortressTileset",
|
|
||||||
"SolNode75": "GrineerForestTileset",
|
|
||||||
"SolNode76": "CorpusShipTileset",
|
|
||||||
"SolNode78": "CorpusShipTileset",
|
|
||||||
"SolNode79": "GrineerForestTileset",
|
|
||||||
"SolNode81": "CorpusShipTileset",
|
|
||||||
"SolNode82": "GrineerGalleonTileset",
|
|
||||||
"SolNode84": "CorpusIcePlanetTilesetCaves",
|
|
||||||
"SolNode88": "CorpusShipTileset",
|
|
||||||
"SolNode93": "GrineerAsteroidTileset",
|
|
||||||
"SolNode96": "GrineerGalleonTileset",
|
|
||||||
"SolNode97": "CorpusGasCityTileset",
|
|
||||||
"SolNode99": "GrineerSettlementTileset"
|
|
||||||
}
|
|
@ -13,7 +13,6 @@ function doLogin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loginFromLocalStorage() {
|
function loginFromLocalStorage() {
|
||||||
const isRegister = registerSubmit;
|
|
||||||
doLoginRequest(
|
doLoginRequest(
|
||||||
data => {
|
data => {
|
||||||
if (single.getCurrentPath() == "/webui/") {
|
if (single.getCurrentPath() == "/webui/") {
|
||||||
@ -29,7 +28,7 @@ function loginFromLocalStorage() {
|
|||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
logout();
|
logout();
|
||||||
alert(isRegister ? "Registration failed. Account already exists?" : "Login failed");
|
alert("Login failed");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -45,7 +44,7 @@ function doLoginRequest(succ_cb, fail_cb) {
|
|||||||
s: "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==", // signature of some kind
|
s: "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==", // signature of some kind
|
||||||
lang: "en",
|
lang: "en",
|
||||||
date: 1501230947855458660, // ???
|
date: 1501230947855458660, // ???
|
||||||
ClientType: registerSubmit ? "webui-register" : "webui",
|
ClientType: registerSubmit ? "" : "webui",
|
||||||
PS: "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==" // anti-cheat data
|
PS: "W0RFXVN0ZXZlIGxpa2VzIGJpZyBidXR0cw==" // anti-cheat data
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -60,7 +60,7 @@ dict = {
|
|||||||
login_emailLabel: `E-Mail-Adresse`,
|
login_emailLabel: `E-Mail-Adresse`,
|
||||||
login_passwordLabel: `Passwort`,
|
login_passwordLabel: `Passwort`,
|
||||||
login_loginButton: `Anmelden`,
|
login_loginButton: `Anmelden`,
|
||||||
login_registerButton: `Registrieren`,
|
login_registerButton: `[UNTRANSLATED] Register`,
|
||||||
navbar_logout: `Abmelden`,
|
navbar_logout: `Abmelden`,
|
||||||
navbar_renameAccount: `Account umbenennen`,
|
navbar_renameAccount: `Account umbenennen`,
|
||||||
navbar_deleteAccount: `Account löschen`,
|
navbar_deleteAccount: `Account löschen`,
|
||||||
@ -116,7 +116,7 @@ dict = {
|
|||||||
mods_rivens: `Rivens`,
|
mods_rivens: `Rivens`,
|
||||||
mods_mods: `Mods`,
|
mods_mods: `Mods`,
|
||||||
mods_bulkAddMods: `Fehlende Mods hinzufügen`,
|
mods_bulkAddMods: `Fehlende Mods hinzufügen`,
|
||||||
mods_removeUnranked: `Mods ohne Rang entfernen`,
|
mods_removeUnranked: `[UNTRANSLATED] Remove Unranked Mods`,
|
||||||
cheats_administratorRequirement: `Du musst Administrator sein, um diese Funktion nutzen zu können. Um Administrator zu werden, füge <code>|DISPLAYNAME|</code> zu <code>administratorNames</code> in der config.json hinzu.`,
|
cheats_administratorRequirement: `Du musst Administrator sein, um diese Funktion nutzen zu können. Um Administrator zu werden, füge <code>|DISPLAYNAME|</code> zu <code>administratorNames</code> in der config.json hinzu.`,
|
||||||
cheats_server: `Server`,
|
cheats_server: `Server`,
|
||||||
cheats_skipTutorial: `Tutorial überspringen`,
|
cheats_skipTutorial: `Tutorial überspringen`,
|
||||||
|
@ -116,7 +116,7 @@ dict = {
|
|||||||
mods_rivens: `Agrietados`,
|
mods_rivens: `Agrietados`,
|
||||||
mods_mods: `Mods`,
|
mods_mods: `Mods`,
|
||||||
mods_bulkAddMods: `Agregar mods faltantes`,
|
mods_bulkAddMods: `Agregar mods faltantes`,
|
||||||
mods_removeUnranked: `Quitar mods sin rango`,
|
mods_removeUnranked: `[UNTRANSLATED] Remove Unranked Mods`,
|
||||||
cheats_administratorRequirement: `Debes ser administrador para usar esta función. Para convertirte en administrador, agrega <code>|DISPLAYNAME|</code> a <code>administratorNames</code> en el archivo config.json.`,
|
cheats_administratorRequirement: `Debes ser administrador para usar esta función. Para convertirte en administrador, agrega <code>|DISPLAYNAME|</code> a <code>administratorNames</code> en el archivo config.json.`,
|
||||||
cheats_server: `Servidor`,
|
cheats_server: `Servidor`,
|
||||||
cheats_skipTutorial: `Omitir tutorial`,
|
cheats_skipTutorial: `Omitir tutorial`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user