feat: zanuka capture #1416
@ -47,6 +47,7 @@ import kuriaMessage100 from "@/static/fixed_responses/kuriaMessages/oneHundredPe
 | 
				
			|||||||
import conservationAnimals from "@/static/fixed_responses/conservationAnimals.json";
 | 
					import conservationAnimals from "@/static/fixed_responses/conservationAnimals.json";
 | 
				
			||||||
import { getInfNodes } from "@/src/helpers/nemesisHelpers";
 | 
					import { getInfNodes } from "@/src/helpers/nemesisHelpers";
 | 
				
			||||||
import { Loadout } from "../models/inventoryModels/loadoutModel";
 | 
					import { Loadout } from "../models/inventoryModels/loadoutModel";
 | 
				
			||||||
 | 
					import { ILoadoutConfigDatabase } from "../types/saveLoadoutTypes";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const getRotations = (rotationCount: number): number[] => {
 | 
					const getRotations = (rotationCount: number): number[] => {
 | 
				
			||||||
    if (rotationCount === 0) return [0];
 | 
					    if (rotationCount === 0) return [0];
 | 
				
			||||||
@ -412,6 +413,21 @@ export const addMissionInventoryUpdates = async (
 | 
				
			|||||||
                inventory.LockedWeaponGroup = undefined;
 | 
					                inventory.LockedWeaponGroup = undefined;
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            case "CurrentLoadOutIds": {
 | 
				
			||||||
 | 
					                const loadout = await Loadout.findOne({ loadoutOwnerId: inventory.accountOwnerId });
 | 
				
			||||||
 | 
					                if (loadout) {
 | 
				
			||||||
 | 
					                    for (const [loadoutId, loadoutConfig] of Object.entries(value.LoadOuts.NORMAL)) {
 | 
				
			||||||
 | 
					                        const { ItemId, ...loadoutConfigItemIdRemoved } = loadoutConfig;
 | 
				
			||||||
 | 
					                        const loadoutConfigDatabase: ILoadoutConfigDatabase = {
 | 
				
			||||||
 | 
					                            _id: new Types.ObjectId(ItemId.$oid),
 | 
				
			||||||
 | 
					                            ...loadoutConfigItemIdRemoved
 | 
				
			||||||
 | 
					                        };
 | 
				
			||||||
 | 
					                        loadout.NORMAL.id(loadoutId)!.overwrite(loadoutConfigDatabase);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    await loadout.save();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            default:
 | 
					            default:
 | 
				
			||||||
                // Equipment XP updates
 | 
					                // Equipment XP updates
 | 
				
			||||||
                if (equipmentKeys.includes(key as TEquipmentKey)) {
 | 
					                if (equipmentKeys.includes(key as TEquipmentKey)) {
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,8 @@ import {
 | 
				
			|||||||
    IUpgradeClient,
 | 
					    IUpgradeClient,
 | 
				
			||||||
    ICollectibleEntry,
 | 
					    ICollectibleEntry,
 | 
				
			||||||
    IDiscoveredMarker,
 | 
					    IDiscoveredMarker,
 | 
				
			||||||
    ILockedWeaponGroupClient
 | 
					    ILockedWeaponGroupClient,
 | 
				
			||||||
 | 
					    ILoadOutPresets
 | 
				
			||||||
} from "./inventoryTypes/inventoryTypes";
 | 
					} from "./inventoryTypes/inventoryTypes";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IAffiliationChange {
 | 
					export interface IAffiliationChange {
 | 
				
			||||||
@ -112,6 +113,9 @@ export type IMissionInventoryUpdateRequest = {
 | 
				
			|||||||
    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
 | 
				
			||||||
    IncHarvester?: 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
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
} & {
 | 
					} & {
 | 
				
			||||||
    [K in TEquipmentKey]?: IEquipmentClient[];
 | 
					    [K in TEquipmentKey]?: IEquipmentClient[];
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user