feat: handle KubrowPetEggs in missionInventoryUpdate
All checks were successful
Build / build (push) Successful in 49s
Build / build (pull_request) Successful in 1m31s

This commit is contained in:
Sainan 2025-04-26 21:43:14 +02:00
parent de36e2ee8d
commit 62ae4fabb6
2 changed files with 13 additions and 1 deletions

View File

@ -506,6 +506,16 @@ export const addMissionInventoryUpdates = async (
} }
break; break;
} }
case "KubrowPetEggs": {
for (const egg of value) {
inventory.KubrowPetEggs ??= [];
inventory.KubrowPetEggs.push({
ItemType: egg.ItemType,
_id: new Types.ObjectId()
});
}
break;
}
case "DiscoveredMarkers": { case "DiscoveredMarkers": {
for (const clientMarker of value) { for (const clientMarker of value) {
const dbMarker = inventory.DiscoveredMarkers.find(x => x.tag == clientMarker.tag); const dbMarker = inventory.DiscoveredMarkers.find(x => x.tag == clientMarker.tag);

View File

@ -21,7 +21,8 @@ import {
ILockedWeaponGroupClient, ILockedWeaponGroupClient,
ILoadOutPresets, ILoadOutPresets,
IInvasionProgressClient, IInvasionProgressClient,
IWeaponSkinClient IWeaponSkinClient,
IKubrowPetEggClient
} from "./inventoryTypes/inventoryTypes"; } from "./inventoryTypes/inventoryTypes";
import { IGroup } from "./loginTypes"; import { IGroup } from "./loginTypes";
@ -118,6 +119,7 @@ export type IMissionInventoryUpdateRequest = {
NumExtraRewards: number; NumExtraRewards: number;
Count: number; Count: number;
}[]; }[];
KubrowPetEggs?: IKubrowPetEggClient[];
DiscoveredMarkers?: IDiscoveredMarker[]; DiscoveredMarkers?: IDiscoveredMarker[];
LockedWeaponGroup?: ILockedWeaponGroupClient; // sent when captured by zanuka LockedWeaponGroup?: ILockedWeaponGroupClient; // sent when captured by zanuka
UnlockWeapons?: boolean; // sent when recovered weapons from zanuka capture UnlockWeapons?: boolean; // sent when recovered weapons from zanuka capture