chore: no-op nemesis mode=w
All checks were successful
Build / build (push) Successful in 52s
Build / build (pull_request) Successful in 1m15s

This commit is contained in:
Sainan 2025-06-18 14:45:09 +02:00
parent 3dcd2663d3
commit 778a779438

View File

@ -294,31 +294,15 @@ export const nemesisController: RequestHandler = async (req, res) => {
target: inventory.toJSON().Nemesis target: inventory.toJSON().Nemesis
}); });
} else if ((req.query.mode as string) == "w") { } else if ((req.query.mode as string) == "w") {
const inventory = await getInventory( const inventory = await getInventory(account._id.toString(), "Nemesis");
account._id.toString(),
"Nemesis LoadOutPresets CurrentLoadOutIds DataKnives Upgrades RawUpgrades"
);
//const body = getJSONfromString<INemesisWeakenRequest>(String(req.body)); //const body = getJSONfromString<INemesisWeakenRequest>(String(req.body));
if (inventory.Nemesis!.Weakened) { // As of 38.6.0, this request is no longer sent, instead mode=r already weakens the nemesis if appropriate.
logger.warn(`client is weakening an already-weakened nemesis?!`); // We always weaken the nemesis in mode=r so simply giving the client back the nemesis.
}
inventory.Nemesis!.InfNodes = [
{
Node: getNemesisManifest(inventory.Nemesis!.manifest).showdownNode,
Influence: 1
}
];
inventory.Nemesis!.Weakened = true;
const response: INemesisWeakenResponse = { const response: INemesisWeakenResponse = {
target: inventory.toJSON<IInventoryClient>().Nemesis! target: inventory.toJSON<IInventoryClient>().Nemesis!
}; };
await consumePasscodeModCharges(inventory, response);
await inventory.save();
res.json(response); res.json(response);
} else { } else {
logger.debug(`data provided to ${req.path}: ${String(req.body)}`); logger.debug(`data provided to ${req.path}: ${String(req.body)}`);