This commit is contained in:
parent
568b2913ba
commit
7e23810cad
@ -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,38 +90,34 @@ 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)
|
||||
if (missionReport.ConquestMissionsCompleted == 2 && missionReport.RewardInfo?.ConquestHardModeActive === 1)
|
||||
score += 1;
|
||||
|
||||
const conquestType = missionReport.RewardInfo?.ConquestType;
|
||||
const conquestNode = conquestType == "HexConquest" ? "EchoesHexConquestHardModeUnlocked" : "EntratiLabConquestHardModeUnlocked";
|
||||
if(score >= 25 && inventory.NodeIntrosCompleted.find(x => x == conquestNode) === undefined)
|
||||
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 )
|
||||
if (score > inventory.EchoesHexConquestCacheScoreMission)
|
||||
inventory.EchoesHexConquestCacheScoreMission = score;
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
inventory.EntratiLabConquestCacheScoreMission ??= 0;
|
||||
|
||||
if(score > inventory.EntratiLabConquestCacheScoreMission )
|
||||
if (score > inventory.EntratiLabConquestCacheScoreMission)
|
||||
inventory.EntratiLabConquestCacheScoreMission = score;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user