UNPKG

@fnlb-project/fnbr

Version:

A library to interact with Epic Games' Fortnite HTTP and XMPP services

62 lines 2.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const defaultPartyMemberMeta_1 = tslib_1.__importDefault(require("../../../resources/defaultPartyMemberMeta")); const Util_1 = require("../../util/Util"); const PartyMemberMeta_1 = tslib_1.__importDefault(require("./PartyMemberMeta")); /** * Represents the client's party member meta */ class ClientPartyMemberMeta extends PartyMemberMeta_1.default { /** * @param member The party member * @param schema The schema */ constructor(member, schema) { var _a, _b; super({ ...defaultPartyMemberMeta_1.default }); this.member = member; const defaultCharacter = (0, Util_1.getRandomDefaultCharacter)(); const mpLoadoutData = (_a = this.get('Default:MpLoadout1_j')) === null || _a === void 0 ? void 0 : _a.MpLoadout1; this.update({ 'Default:MpLoadout1_j': JSON.stringify({ MpLoadout1: { ...mpLoadoutData, s: { ...mpLoadoutData === null || mpLoadoutData === void 0 ? void 0 : mpLoadoutData.s, ac: { ...(((_b = mpLoadoutData === null || mpLoadoutData === void 0 ? void 0 : mpLoadoutData.s) === null || _b === void 0 ? void 0 : _b.ac) || {}), i: defaultCharacter, }, }, }, }), 'Default:CampaignHero_j': JSON.stringify({ CampaignHero: { heroItemInstanceId: '', heroType: 'None', }, }), 'Default:PlatformData_j': JSON.stringify({ PlatformData: { platform: { platformDescription: { name: member.client.config.platform, platformType: 'MOBILE', onlineSubsystem: 'None', sessionType: '', externalAccountType: '', crossplayPool: 'MOBILE', }, }, uniqueId: 'INVALID', sessionId: '', }, }), }, true); if (schema) this.update(schema, true); } } exports.default = ClientPartyMemberMeta; //# sourceMappingURL=ClientPartyMemberMeta.js.map