feat: handle creditsFee in missionInventoryUpdate (#1431)
Some checks failed
Build Docker image / docker (push) Waiting to run
Build / build (20) (push) Has been cancelled
Build / build (18) (push) Has been cancelled
Build / build (22) (push) Has been cancelled

Reviewed-on: #1431
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-04-03 06:17:11 -07:00 committed by Sainan
parent d4d887a5a4
commit cfa9ec775e
2 changed files with 9 additions and 0 deletions

View File

@ -28,6 +28,7 @@ import {
addRecipes, addRecipes,
addShipDecorations, addShipDecorations,
combineInventoryChanges, combineInventoryChanges,
updateCurrency,
updateSyndicate updateSyndicate
} from "@/src/services/inventoryService"; } from "@/src/services/inventoryService";
import { updateQuestKey } from "@/src/services/questService"; import { updateQuestKey } from "@/src/services/questService";
@ -430,6 +431,12 @@ export const addMissionInventoryUpdates = async (
} }
break; break;
} }
case "creditsFee": {
updateCurrency(inventory, value, false);
inventoryChanges.RegularCredits ??= 0;
inventoryChanges.RegularCredits -= value;
break;
}
default: default:
// Equipment XP updates // Equipment XP updates
if (equipmentKeys.includes(key as TEquipmentKey)) { if (equipmentKeys.includes(key as TEquipmentKey)) {

View File

@ -116,6 +116,8 @@ export type IMissionInventoryUpdateRequest = {
CurrentLoadOutIds?: { CurrentLoadOutIds?: {
LoadOuts?: ILoadOutPresets; // sent when recovered weapons from zanuka capture LoadOuts?: ILoadOutPresets; // sent when recovered weapons from zanuka capture
}; };
wagerTier?: number; // the index
creditsFee?: number; // the index
} & { } & {
[K in TEquipmentKey]?: IEquipmentClient[]; [K in TEquipmentKey]?: IEquipmentClient[];
}; };