fix: handle CurrentLoadOutIds missing LoadOuts in missionInventoryUpdate
All checks were successful
Build / build (18) (push) Successful in 41s
Build / build (22) (push) Successful in 1m12s
Build / build (20) (push) Successful in 1m15s
Build / build (20) (pull_request) Successful in 1m16s
Build / build (18) (pull_request) Successful in 1m13s
Build / build (22) (pull_request) Successful in 37s
All checks were successful
Build / build (18) (push) Successful in 41s
Build / build (22) (push) Successful in 1m12s
Build / build (20) (push) Successful in 1m15s
Build / build (20) (pull_request) Successful in 1m16s
Build / build (18) (pull_request) Successful in 1m13s
Build / build (22) (pull_request) Successful in 37s
This commit is contained in:
parent
9e1a5d50af
commit
a5d3f95cb9
@ -414,6 +414,7 @@ export const addMissionInventoryUpdates = async (
|
||||
break;
|
||||
}
|
||||
case "CurrentLoadOutIds": {
|
||||
if (value.LoadOuts) {
|
||||
const loadout = await Loadout.findOne({ loadoutOwnerId: inventory.accountOwnerId });
|
||||
if (loadout) {
|
||||
for (const [loadoutId, loadoutConfig] of Object.entries(value.LoadOuts.NORMAL)) {
|
||||
@ -426,6 +427,7 @@ export const addMissionInventoryUpdates = async (
|
||||
}
|
||||
await loadout.save();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -114,7 +114,7 @@ export type IMissionInventoryUpdateRequest = {
|
||||
UnlockWeapons?: boolean; // sent when recovered weapons from zanuka capture
|
||||
IncHarvester?: boolean; // sent when recovered weapons from zanuka capture
|
||||
CurrentLoadOutIds?: {
|
||||
LoadOuts: ILoadOutPresets; // sent when recovered weapons from zanuka capture
|
||||
LoadOuts?: ILoadOutPresets; // sent when recovered weapons from zanuka capture
|
||||
};
|
||||
} & {
|
||||
[K in TEquipmentKey]?: IEquipmentClient[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user