feat(webui): edit suit invigorations #2478
@ -1,5 +1,6 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
|
||||||
import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
@ -73,4 +74,5 @@ export const gildWeaponController: RequestHandler = async (req, res) => {
|
|||||||
InventoryChanges: inventoryChanges,
|
InventoryChanges: inventoryChanges,
|
||||||
AffiliationMods: affiliationMods
|
AffiliationMods: affiliationMods
|
||||||
});
|
});
|
||||||
|
sendWsBroadcastTo(accountId, { update_inventory: true });
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import {
|
import {
|
||||||
getInventory,
|
getInventory,
|
||||||
@ -194,4 +195,5 @@ export const modularWeaponCraftingController: RequestHandler = async (req, res)
|
|||||||
MiscItems: miscItemChanges
|
MiscItems: miscItemChanges
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
sendWsBroadcastTo(accountId, { update_inventory: true });
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { getDefaultUpgrades } from "@/src/services/itemDataService";
|
import { getDefaultUpgrades } from "@/src/services/itemDataService";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { sendWsBroadcastTo } from "@/src/services/wsService";
|
||||||
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
|
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
|
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
|
||||||
@ -68,6 +69,7 @@ export const modularWeaponSaleController: RequestHandler = async (req, res) => {
|
|||||||
res.json({
|
res.json({
|
||||||
InventoryChanges: inventoryChanges
|
InventoryChanges: inventoryChanges
|
||||||
});
|
});
|
||||||
|
sendWsBroadcastTo(accountId, { update_inventory: true });
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`unknown modularWeaponSale op: ${String(req.query.op)}`);
|
throw new Error(`unknown modularWeaponSale op: ${String(req.query.op)}`);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,8 @@ export const playerSkillsController: RequestHandler = async (req, res) => {
|
|||||||
inventory.PlayerSkills[request.Skill as keyof IPlayerSkills]++;
|
inventory.PlayerSkills[request.Skill as keyof IPlayerSkills]++;
|
||||||
|
|
||||||
const inventoryChanges: IInventoryChanges = {};
|
const inventoryChanges: IInventoryChanges = {};
|
||||||
if (request.Skill == "LPS_COMMAND" && inventory.PlayerSkills.LPS_COMMAND == 9) {
|
if (request.Skill == "LPS_COMMAND") {
|
||||||
|
if (inventory.PlayerSkills.LPS_COMMAND == 9) {
|
||||||
const consumablesChanges = [
|
const consumablesChanges = [
|
||||||
{
|
{
|
||||||
ItemType: "/Lotus/Types/Restoratives/Consumable/CrewmateBall",
|
ItemType: "/Lotus/Types/Restoratives/Consumable/CrewmateBall",
|
||||||
@ -26,6 +27,18 @@ export const playerSkillsController: RequestHandler = async (req, res) => {
|
|||||||
addConsumables(inventory, consumablesChanges);
|
addConsumables(inventory, consumablesChanges);
|
||||||
inventoryChanges.Consumables = consumablesChanges;
|
inventoryChanges.Consumables = consumablesChanges;
|
||||||
}
|
}
|
||||||
|
} else if (request.Skill == "LPS_DRIFT_RIDING") {
|
||||||
|
if (inventory.PlayerSkills.LPS_DRIFT_RIDING == 9) {
|
||||||
|
const consumablesChanges = [
|
||||||
|
{
|
||||||
|
ItemType: "/Lotus/Types/Restoratives/ErsatzSummon",
|
||||||
|
ItemCount: 1
|
||||||
|
}
|
||||||
|
];
|
||||||
|
addConsumables(inventory, consumablesChanges);
|
||||||
|
inventoryChanges.Consumables = consumablesChanges;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
res.json({
|
res.json({
|
||||||
|
@ -1662,6 +1662,11 @@ export const applyClientEquipmentUpdates = (
|
|||||||
item.XP ??= 0;
|
item.XP ??= 0;
|
||||||
item.XP += XP;
|
item.XP += XP;
|
||||||
|
|
||||||
|
if (
|
||||||
|
categoryName != "SpecialItems" ||
|
||||||
|
item.ItemType == "/Lotus/Powersuits/Khora/Kavat/KhoraKavatPowerSuit" ||
|
||||||
|
item.ItemType == "/Lotus/Powersuits/Khora/Kavat/KhoraPrimeKavatPowerSuit"
|
||||||
|
) {
|
||||||
let xpItemType = item.ItemType;
|
let xpItemType = item.ItemType;
|
||||||
if (item.ModularParts) {
|
if (item.ModularParts) {
|
||||||
for (const part of item.ModularParts) {
|
for (const part of item.ModularParts) {
|
||||||
@ -1686,6 +1691,7 @@ export const applyClientEquipmentUpdates = (
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (InfestationDate) {
|
if (InfestationDate) {
|
||||||
// 2147483647000 means cured, otherwise became infected
|
// 2147483647000 means cured, otherwise became infected
|
||||||
|
@ -282,6 +282,7 @@ function fetchItemList() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const syndicateNone = document.createElement("option");
|
const syndicateNone = document.createElement("option");
|
||||||
|
syndicateNone.value = "";
|
||||||
syndicateNone.textContent = loc("cheats_none");
|
syndicateNone.textContent = loc("cheats_none");
|
||||||
document.getElementById("changeSyndicate").innerHTML = "";
|
document.getElementById("changeSyndicate").innerHTML = "";
|
||||||
document.getElementById("changeSyndicate").appendChild(syndicateNone);
|
document.getElementById("changeSyndicate").appendChild(syndicateNone);
|
||||||
|
@ -61,7 +61,7 @@ dict = {
|
|||||||
code_pigment: `Pigmento`,
|
code_pigment: `Pigmento`,
|
||||||
code_mature: `Listo para el combate`,
|
code_mature: `Listo para el combate`,
|
||||||
code_unmature: `Regresar el envejecimiento genético`,
|
code_unmature: `Regresar el envejecimiento genético`,
|
||||||
code_succChange: `[UNTRANSLATED] Successfully changed.`,
|
code_succChange: `Cambiado correctamente`,
|
||||||
login_description: `Inicia sesión con las credenciales de tu cuenta OpenWF (las mismas que usas en el juego al conectarte a este servidor).`,
|
login_description: `Inicia sesión con las credenciales de tu cuenta OpenWF (las mismas que usas en el juego al conectarte a este servidor).`,
|
||||||
login_emailLabel: `Dirección de correo electrónico`,
|
login_emailLabel: `Dirección de correo electrónico`,
|
||||||
login_passwordLabel: `Contraseña`,
|
login_passwordLabel: `Contraseña`,
|
||||||
@ -124,7 +124,7 @@ dict = {
|
|||||||
detailedView_archonShardsDescription2: `Ten en cuenta que cada fragmento de archón tarda un poco en aplicarse al cargar`,
|
detailedView_archonShardsDescription2: `Ten en cuenta que cada fragmento de archón tarda un poco en aplicarse al cargar`,
|
||||||
detailedView_valenceBonusLabel: `Bônus de Valência`,
|
detailedView_valenceBonusLabel: `Bônus de Valência`,
|
||||||
detailedView_valenceBonusDescription: `Puedes establecer o quitar el bono de valencia de tu arma.`,
|
detailedView_valenceBonusDescription: `Puedes establecer o quitar el bono de valencia de tu arma.`,
|
||||||
detailedView_modularPartsLabel: `[UNTRANSLATED] Change Modular Parts`,
|
detailedView_modularPartsLabel: `Cambiar partes modulares`,
|
||||||
detailedView_editSuitInvigoration: `[UNTRANSLATED] Edit Suit Invigoration`,
|
detailedView_editSuitInvigoration: `[UNTRANSLATED] Edit Suit Invigoration`,
|
||||||
|
|
||||||
mods_addRiven: `Agregar Agrietado`,
|
mods_addRiven: `Agregar Agrietado`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user