forked from OpenWF/SpaceNinjaServer
Compare commits
No commits in common. "conquest-progress" and "main" have entirely different histories.
conquest-p
...
main
@ -6,7 +6,6 @@ import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/mi
|
||||
import { getInventory } from "@/src/services/inventoryService";
|
||||
import { getInventoryResponse } from "./inventoryController";
|
||||
import { logger } from "@/src/utils/logger";
|
||||
import { IMissionInventoryUpdateResponse } from "@/src/types/missionTypes";
|
||||
|
||||
/*
|
||||
**** INPUT ****
|
||||
@ -79,7 +78,7 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
|
||||
const inventoryResponse = await getInventoryResponse(inventory, true);
|
||||
|
||||
//TODO: figure out when to send inventory. it is needed for many cases.
|
||||
const response: IMissionInventoryUpdateResponse = {
|
||||
res.json({
|
||||
InventoryJson: JSON.stringify(inventoryResponse),
|
||||
InventoryChanges: inventoryChanges,
|
||||
MissionRewards,
|
||||
@ -88,12 +87,7 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
|
||||
//FusionPoints: inventoryChanges?.FusionPoints, // This in combination with InventoryJson or InventoryChanges seems to just double the number of endo shown, so unsure when this is needed.
|
||||
SyndicateXPItemReward,
|
||||
AffiliationMods
|
||||
};
|
||||
if (missionReport.ConquestMissionsCompleted !== undefined) {
|
||||
response.ConquestCompletedMissionsCount =
|
||||
missionReport.ConquestMissionsCompleted == 2 ? 0 : missionReport.ConquestMissionsCompleted + 1;
|
||||
}
|
||||
res.json(response);
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -43,7 +43,7 @@ import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/invento
|
||||
import { getEntriesUnsafe } from "@/src/utils/ts-utils";
|
||||
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||
import { handleStoreItemAcquisition } from "./purchaseService";
|
||||
import { IMissionCredits, IMissionReward } from "../types/missionTypes";
|
||||
import { IMissionReward } from "../types/missionTypes";
|
||||
import { crackRelic } from "@/src/helpers/relicHelper";
|
||||
import { createMessage } from "./inboxService";
|
||||
import kuriaMessage50 from "@/static/fixed_responses/kuriaMessages/fiftyPercent.json";
|
||||
@ -885,6 +885,13 @@ export const addMissionRewards = async (
|
||||
return { inventoryChanges, MissionRewards, credits, AffiliationMods, SyndicateXPItemReward };
|
||||
};
|
||||
|
||||
interface IMissionCredits {
|
||||
MissionCredits: number[];
|
||||
CreditBonus: number[];
|
||||
TotalCredits: number[];
|
||||
DailyMissionBonus?: boolean;
|
||||
}
|
||||
|
||||
//creditBonus is not entirely accurate.
|
||||
//TODO: consider ActiveBoosters
|
||||
export const addCredits = (
|
||||
|
@ -1,5 +1,3 @@
|
||||
import { IAffiliationMods, IInventoryChanges } from "./purchaseTypes";
|
||||
|
||||
export const inventoryFields = ["RawUpgrades", "MiscItems", "Consumables", "Recipes"] as const;
|
||||
export type IInventoryFieldType = (typeof inventoryFields)[number];
|
||||
|
||||
@ -13,20 +11,3 @@ export interface IMissionReward {
|
||||
FromEnemyCache?: boolean;
|
||||
IsStrippedItem?: boolean;
|
||||
}
|
||||
|
||||
export interface IMissionCredits {
|
||||
MissionCredits: number[];
|
||||
CreditBonus: number[];
|
||||
TotalCredits: number[];
|
||||
DailyMissionBonus?: boolean;
|
||||
}
|
||||
|
||||
export interface IMissionInventoryUpdateResponse extends Partial<IMissionCredits> {
|
||||
ConquestCompletedMissionsCount?: number;
|
||||
InventoryJson?: string;
|
||||
MissionRewards?: IMissionReward[];
|
||||
InventoryChanges?: IInventoryChanges;
|
||||
FusionPoints?: number;
|
||||
SyndicateXPItemReward?: number;
|
||||
AffiliationMods?: IAffiliationMods[];
|
||||
}
|
||||
|
@ -125,7 +125,6 @@ export type IMissionInventoryUpdateRequest = {
|
||||
wagerTier?: number; // the index
|
||||
creditsFee?: number; // the index
|
||||
InvasionProgress?: IInvasionProgressClient[];
|
||||
ConquestMissionsCompleted?: number;
|
||||
} & {
|
||||
[K in TEquipmentKey]?: IEquipmentClient[];
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user