prettify
All checks were successful
Build / build (pull_request) Successful in 1m27s

This commit is contained in:
Jānis 2025-04-23 00:35:54 +03:00
parent 568b2913ba
commit 7e23810cad

View File

@ -75,8 +75,6 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
const { MissionRewards, inventoryChanges, credits, AffiliationMods, SyndicateXPItemReward } =
await addMissionRewards(inventory, missionReport, firstCompletion);
//TODO: figure out when to send inventory. it is needed for many cases.
const response: IMissionInventoryUpdateResponse = {
InventoryChanges: inventoryChanges,
@ -92,35 +90,31 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
response.ConquestCompletedMissionsCount =
missionReport.ConquestMissionsCompleted == 2 ? 0 : missionReport.ConquestMissionsCompleted + 1;
let score = 1;
if(missionReport.RewardInfo?.ConquestHardModeActive === 1)
score += 3
if (missionReport.RewardInfo?.ConquestHardModeActive === 1) score += 3;
if (missionReport.RewardInfo?.ConquestPersonalModifiersActive !== undefined)
score += missionReport.RewardInfo?.ConquestPersonalModifiersActive;
if (missionReport.RewardInfo?.ConquestEquipmentSuggestionsFulfilled !== undefined)
score += missionReport.RewardInfo?.ConquestEquipmentSuggestionsFulfilled;
score *= missionReport.ConquestMissionsCompleted + 1
score *= missionReport.ConquestMissionsCompleted + 1;
if (missionReport.ConquestMissionsCompleted == 2 && missionReport.RewardInfo?.ConquestHardModeActive === 1)
score += 1;
const conquestType = missionReport.RewardInfo?.ConquestType;
const conquestNode = conquestType == "HexConquest" ? "EchoesHexConquestHardModeUnlocked" : "EntratiLabConquestHardModeUnlocked";
const conquestNode =
conquestType == "HexConquest" ? "EchoesHexConquestHardModeUnlocked" : "EntratiLabConquestHardModeUnlocked";
if (score >= 25 && inventory.NodeIntrosCompleted.find(x => x == conquestNode) === undefined)
inventory.NodeIntrosCompleted.push(conquestNode);
if(conquestType == "HexConquest")
{
if (conquestType == "HexConquest") {
inventory.EchoesHexConquestCacheScoreMission ??= 0;
if (score > inventory.EchoesHexConquestCacheScoreMission)
inventory.EchoesHexConquestCacheScoreMission = score;
}else
{
} else {
inventory.EntratiLabConquestCacheScoreMission ??= 0;
if (score > inventory.EntratiLabConquestCacheScoreMission)