feat: zanuka capture #1416
@ -83,7 +83,8 @@ import {
 | 
			
		||||
    INemesisClient,
 | 
			
		||||
    IInfNode,
 | 
			
		||||
    IDiscoveredMarker,
 | 
			
		||||
    IWeeklyMission
 | 
			
		||||
    IWeeklyMission,
 | 
			
		||||
    ILockedWeaponGroupDatabase
 | 
			
		||||
} from "../../types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IOid } from "../../types/commonTypes";
 | 
			
		||||
import {
 | 
			
		||||
@ -1147,6 +1148,17 @@ const alignmentSchema = new Schema<IAlignment>(
 | 
			
		||||
    { _id: false }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
const lockedWeaponGroupSchema = new Schema<ILockedWeaponGroupDatabase>(
 | 
			
		||||
    {
 | 
			
		||||
        s: Schema.Types.ObjectId,
 | 
			
		||||
        p: Schema.Types.ObjectId,
 | 
			
		||||
        l: Schema.Types.ObjectId,
 | 
			
		||||
        m: Schema.Types.ObjectId,
 | 
			
		||||
        sn: Schema.Types.ObjectId
 | 
			
		||||
    },
 | 
			
		||||
    { _id: false }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
			
		||||
    {
 | 
			
		||||
        accountOwnerId: Schema.Types.ObjectId,
 | 
			
		||||
@ -1488,7 +1500,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
 | 
			
		||||
        EchoesHexConquestActiveFrameVariants: { type: [String], default: undefined },
 | 
			
		||||
        EchoesHexConquestActiveStickers: { type: [String], default: undefined },
 | 
			
		||||
 | 
			
		||||
        BrandedSuits: { type: [Schema.Types.ObjectId], default: undefined }
 | 
			
		||||
        // G3 + Zanuka
 | 
			
		||||
        BrandedSuits: { type: [Schema.Types.ObjectId], default: undefined },
 | 
			
		||||
        LockedWeaponGroup: { type: lockedWeaponGroupSchema, default: undefined }
 | 
			
		||||
    },
 | 
			
		||||
    { timestamps: { createdAt: "Created", updatedAt: false } }
 | 
			
		||||
);
 | 
			
		||||
@ -1523,6 +1537,15 @@ inventorySchema.set("toJSON", {
 | 
			
		||||
        if (inventoryDatabase.BrandedSuits) {
 | 
			
		||||
            inventoryResponse.BrandedSuits = inventoryDatabase.BrandedSuits.map(toOid);
 | 
			
		||||
        }
 | 
			
		||||
        if (inventoryDatabase.LockedWeaponGroup) {
 | 
			
		||||
            inventoryResponse.LockedWeaponGroup = {
 | 
			
		||||
                s: toOid(inventoryDatabase.LockedWeaponGroup.s),
 | 
			
		||||
                l: inventoryDatabase.LockedWeaponGroup.l ? toOid(inventoryDatabase.LockedWeaponGroup.l) : undefined,
 | 
			
		||||
                p: inventoryDatabase.LockedWeaponGroup.p ? toOid(inventoryDatabase.LockedWeaponGroup.p) : undefined,
 | 
			
		||||
                m: inventoryDatabase.LockedWeaponGroup.m ? toOid(inventoryDatabase.LockedWeaponGroup.m) : undefined,
 | 
			
		||||
                sn: inventoryDatabase.LockedWeaponGroup.sn ? toOid(inventoryDatabase.LockedWeaponGroup.sn) : undefined
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -398,6 +398,20 @@ export const addMissionInventoryUpdates = async (
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
            case "LockedWeaponGroup": {
 | 
			
		||||
                inventory.LockedWeaponGroup = {
 | 
			
		||||
                    s: new Types.ObjectId(value.s.$oid),
 | 
			
		||||
                    l: value.l ? new Types.ObjectId(value.l.$oid) : undefined,
 | 
			
		||||
                    p: value.p ? new Types.ObjectId(value.p.$oid) : undefined,
 | 
			
		||||
                    m: value.m ? new Types.ObjectId(value.m.$oid) : undefined,
 | 
			
		||||
                    sn: value.sn ? new Types.ObjectId(value.sn.$oid) : undefined
 | 
			
		||||
                };
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
            case "UnlockWeapons": {
 | 
			
		||||
                inventory.LockedWeaponGroup = undefined;
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
            default:
 | 
			
		||||
                // Equipment XP updates
 | 
			
		||||
                if (equipmentKeys.includes(key as TEquipmentKey)) {
 | 
			
		||||
 | 
			
		||||
@ -45,6 +45,7 @@ export interface IInventoryDatabase
 | 
			
		||||
            | "Nemesis"
 | 
			
		||||
            | "EntratiVaultCountResetDate"
 | 
			
		||||
            | "BrandedSuits"
 | 
			
		||||
            | "LockedWeaponGroup"
 | 
			
		||||
            | TEquipmentKey
 | 
			
		||||
        >,
 | 
			
		||||
        InventoryDatabaseEquipment {
 | 
			
		||||
@ -75,6 +76,7 @@ export interface IInventoryDatabase
 | 
			
		||||
    Nemesis?: INemesisDatabase;
 | 
			
		||||
    EntratiVaultCountResetDate?: Date;
 | 
			
		||||
    BrandedSuits?: Types.ObjectId[];
 | 
			
		||||
    LockedWeaponGroup?: ILockedWeaponGroupDatabase;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IQuestKeyDatabase {
 | 
			
		||||
@ -349,6 +351,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
 | 
			
		||||
    EchoesHexConquestActiveFrameVariants?: string[];
 | 
			
		||||
    EchoesHexConquestActiveStickers?: string[];
 | 
			
		||||
    BrandedSuits?: IOid[];
 | 
			
		||||
    LockedWeaponGroup?: ILockedWeaponGroupClient;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface IAffiliation {
 | 
			
		||||
@ -1149,3 +1152,19 @@ export interface ISongChallenge {
 | 
			
		||||
    Song: string;
 | 
			
		||||
    Difficulties: number[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ILockedWeaponGroupClient {
 | 
			
		||||
    s: IOid;
 | 
			
		||||
    p?: IOid;
 | 
			
		||||
    l?: IOid;
 | 
			
		||||
    m?: IOid;
 | 
			
		||||
    sn?: IOid;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ILockedWeaponGroupDatabase {
 | 
			
		||||
    s: Types.ObjectId;
 | 
			
		||||
    p?: Types.ObjectId;
 | 
			
		||||
    l?: Types.ObjectId;
 | 
			
		||||
    m?: Types.ObjectId;
 | 
			
		||||
    sn?: Types.ObjectId;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -17,7 +17,8 @@ import {
 | 
			
		||||
    ILoreFragmentScan,
 | 
			
		||||
    IUpgradeClient,
 | 
			
		||||
    ICollectibleEntry,
 | 
			
		||||
    IDiscoveredMarker
 | 
			
		||||
    IDiscoveredMarker,
 | 
			
		||||
    ILockedWeaponGroupClient
 | 
			
		||||
} from "./inventoryTypes/inventoryTypes";
 | 
			
		||||
 | 
			
		||||
export interface IAffiliationChange {
 | 
			
		||||
@ -108,6 +109,9 @@ export type IMissionInventoryUpdateRequest = {
 | 
			
		||||
        Count: number;
 | 
			
		||||
    }[];
 | 
			
		||||
    DiscoveredMarkers?: IDiscoveredMarker[];
 | 
			
		||||
    LockedWeaponGroup?: ILockedWeaponGroupClient; // sent when captured by zanuka
 | 
			
		||||
    UnlockWeapons?: boolean; // sent when recovered weapons from zanuka capture
 | 
			
		||||
    IncHarvester?: boolean; // sent when recovered weapons from zanuka capture
 | 
			
		||||
} & {
 | 
			
		||||
    [K in TEquipmentKey]?: IEquipmentClient[];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user