Merge remote-tracking branch 'upstream/main' into ImplEditSuitInvigorationUpgradeController
All checks were successful
Build / build (pull_request) Successful in 1m5s
All checks were successful
Build / build (pull_request) Successful in 1m5s
This commit is contained in:
commit
4f6f8a2c81
@ -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,15 +16,28 @@ 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") {
|
||||||
const consumablesChanges = [
|
if (inventory.PlayerSkills.LPS_COMMAND == 9) {
|
||||||
{
|
const consumablesChanges = [
|
||||||
ItemType: "/Lotus/Types/Restoratives/Consumable/CrewmateBall",
|
{
|
||||||
ItemCount: 1
|
ItemType: "/Lotus/Types/Restoratives/Consumable/CrewmateBall",
|
||||||
}
|
ItemCount: 1
|
||||||
];
|
}
|
||||||
addConsumables(inventory, consumablesChanges);
|
];
|
||||||
inventoryChanges.Consumables = consumablesChanges;
|
addConsumables(inventory, 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();
|
||||||
|
@ -1662,28 +1662,34 @@ export const applyClientEquipmentUpdates = (
|
|||||||
item.XP ??= 0;
|
item.XP ??= 0;
|
||||||
item.XP += XP;
|
item.XP += XP;
|
||||||
|
|
||||||
let xpItemType = item.ItemType;
|
if (
|
||||||
if (item.ModularParts) {
|
categoryName != "SpecialItems" ||
|
||||||
for (const part of item.ModularParts) {
|
item.ItemType == "/Lotus/Powersuits/Khora/Kavat/KhoraKavatPowerSuit" ||
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
item.ItemType == "/Lotus/Powersuits/Khora/Kavat/KhoraPrimeKavatPowerSuit"
|
||||||
const partType = ExportWeapons[part]?.partType;
|
) {
|
||||||
if (partType !== undefined && xpEarningParts.indexOf(partType) != -1) {
|
let xpItemType = item.ItemType;
|
||||||
xpItemType = part;
|
if (item.ModularParts) {
|
||||||
break;
|
for (const part of item.ModularParts) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
|
const partType = ExportWeapons[part]?.partType;
|
||||||
|
if (partType !== undefined && xpEarningParts.indexOf(partType) != -1) {
|
||||||
|
xpItemType = part;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
logger.debug(`adding xp to ${xpItemType} for modular item ${fromOid(ItemId)} (${item.ItemType})`);
|
||||||
}
|
}
|
||||||
logger.debug(`adding xp to ${xpItemType} for modular item ${fromOid(ItemId)} (${item.ItemType})`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const xpinfoIndex = inventory.XPInfo.findIndex(x => x.ItemType == xpItemType);
|
const xpinfoIndex = inventory.XPInfo.findIndex(x => x.ItemType == xpItemType);
|
||||||
if (xpinfoIndex !== -1) {
|
if (xpinfoIndex !== -1) {
|
||||||
const xpinfo = inventory.XPInfo[xpinfoIndex];
|
const xpinfo = inventory.XPInfo[xpinfoIndex];
|
||||||
xpinfo.XP += XP;
|
xpinfo.XP += XP;
|
||||||
} else {
|
} else {
|
||||||
inventory.XPInfo.push({
|
inventory.XPInfo.push({
|
||||||
ItemType: xpItemType,
|
ItemType: xpItemType,
|
||||||
XP: XP
|
XP: XP
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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