Split FocusSchool and ArtifactPolarity
This commit is contained in:
parent
e34cb305ad
commit
ed2c6ad4fd
@ -1,6 +1,10 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { IUpgradesRequest } from "@/src/types/requestTypes";
|
import { IUpgradesRequest } from "@/src/types/requestTypes";
|
||||||
import { FocusSchool, IEquipmentDatabase, EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import {
|
||||||
|
ArtifactPolarity,
|
||||||
|
IEquipmentDatabase,
|
||||||
|
EquipmentFeatures
|
||||||
|
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
@ -133,7 +137,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
res.json({ InventoryChanges });
|
res.json({ InventoryChanges });
|
||||||
};
|
};
|
||||||
|
|
||||||
const setSlotPolarity = (item: IEquipmentDatabase, slot: number, polarity: FocusSchool): void => {
|
const setSlotPolarity = (item: IEquipmentDatabase, slot: number, polarity: ArtifactPolarity): void => {
|
||||||
item.Polarity ??= [];
|
item.Polarity ??= [];
|
||||||
const entry = item.Polarity.find(entry => entry.Slot == slot);
|
const entry = item.Polarity.find(entry => entry.Slot == slot);
|
||||||
if (entry) {
|
if (entry) {
|
||||||
|
@ -3,19 +3,19 @@ import { Types } from "mongoose";
|
|||||||
|
|
||||||
export interface IPolarity {
|
export interface IPolarity {
|
||||||
Slot: number;
|
Slot: number;
|
||||||
Value: FocusSchool;
|
Value: ArtifactPolarity;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum FocusSchool {
|
export enum ArtifactPolarity {
|
||||||
ApAny = "AP_ANY",
|
Any = "AP_ANY",
|
||||||
ApAttack = "AP_ATTACK",
|
Attack = "AP_ATTACK",
|
||||||
ApDefense = "AP_DEFENSE",
|
Defense = "AP_DEFENSE",
|
||||||
ApPower = "AP_POWER",
|
Power = "AP_POWER",
|
||||||
ApPrecept = "AP_PRECEPT",
|
Precept = "AP_PRECEPT",
|
||||||
ApTactic = "AP_TACTIC",
|
Tactic = "AP_TACTIC",
|
||||||
ApUmbra = "AP_UMBRA",
|
Umbra = "AP_UMBRA",
|
||||||
ApUniversal = "AP_UNIVERSAL",
|
Universal = "AP_UNIVERSAL",
|
||||||
ApWard = "AP_WARD"
|
Ward = "AP_WARD"
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IColor {
|
export interface IColor {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
import { Document, Types } from "mongoose";
|
import { Document, Types } from "mongoose";
|
||||||
import { IOid, IMongoDate } from "../commonTypes";
|
import { IOid, IMongoDate } from "../commonTypes";
|
||||||
import {
|
import {
|
||||||
|
ArtifactPolarity,
|
||||||
IColor,
|
IColor,
|
||||||
FocusSchool,
|
|
||||||
IItemConfig,
|
IItemConfig,
|
||||||
IOperatorConfigClient,
|
IOperatorConfigClient,
|
||||||
IEquipmentSelection,
|
IEquipmentSelection,
|
||||||
@ -597,6 +597,14 @@ export interface ILoadOutPresets {
|
|||||||
OPERATOR_ADULT: ILoadoutConfigClient[];
|
OPERATOR_ADULT: ILoadoutConfigClient[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum FocusSchool {
|
||||||
|
Attack = "AP_ATTACK",
|
||||||
|
Defense = "AP_DEFENSE",
|
||||||
|
Power = "AP_POWER",
|
||||||
|
Tactic = "AP_TACTIC",
|
||||||
|
Ward = "AP_WARD"
|
||||||
|
}
|
||||||
|
|
||||||
export interface ILoadoutConfigClient {
|
export interface ILoadoutConfigClient {
|
||||||
FocusSchool?: FocusSchool;
|
FocusSchool?: FocusSchool;
|
||||||
PresetIcon?: string;
|
PresetIcon?: string;
|
||||||
@ -705,7 +713,7 @@ export interface IUpgradeFingerprint {
|
|||||||
compat: string;
|
compat: string;
|
||||||
lim: number;
|
lim: number;
|
||||||
lvlReq: number;
|
lvlReq: number;
|
||||||
pol: FocusSchool;
|
pol: ArtifactPolarity;
|
||||||
buffs: IBuff[];
|
buffs: IBuff[];
|
||||||
curses: IBuff[];
|
curses: IBuff[];
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IOid } from "./commonTypes";
|
import { IOid } from "./commonTypes";
|
||||||
import { IPolarity, FocusSchool, IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { ArtifactPolarity, IPolarity, IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import {
|
import {
|
||||||
IBooster,
|
IBooster,
|
||||||
IChallengeProgress,
|
IChallengeProgress,
|
||||||
@ -97,6 +97,6 @@ export interface IUpgradeOperation {
|
|||||||
OperationType: string;
|
OperationType: string;
|
||||||
UpgradeRequirement: string; // uniqueName of item being consumed
|
UpgradeRequirement: string; // uniqueName of item being consumed
|
||||||
PolarizeSlot: number;
|
PolarizeSlot: number;
|
||||||
PolarizeValue: FocusSchool;
|
PolarizeValue: ArtifactPolarity;
|
||||||
PolarityRemap: IPolarity[];
|
PolarityRemap: IPolarity[];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user