diff --git a/resources/defaultPartyMemberMeta.json b/resources/defaultPartyMemberMeta.json index df555c95..f546e94f 100644 --- a/resources/defaultPartyMemberMeta.json +++ b/resources/defaultPartyMemberMeta.json @@ -3,7 +3,7 @@ "Default:ArbitraryCustomDataStore_j": "{\"ArbitraryCustomDataStore\":[]}", "Default:AthenaBannerInfo_j": "{\"AthenaBannerInfo\":{\"bannerIconId\":\"standardbanner15\",\"bannerColorId\":\"defaultcolor15\",\"seasonLevel\":1}}", "Default:AthenaCosmeticLoadoutVariants_j": "{\"AthenaCosmeticLoadoutVariants\":{\"vL\":{},\"fT\":false}}", - "Default:AthenaCosmeticLoadout_j": "{\"AthenaCosmeticLoadout\":{\"characterPrimaryAssetId\":\"\",\"characterEKey\":\"\",\"backpackDef\":\"None\",\"backpackEKey\":\"\",\"pickaxeDef\":\"/Game/Athena/Items/Cosmetics/Pickaxes/DefaultPickaxe.DefaultPickaxe\",\"pickaxeEKey\":\"\",\"contrailDef\":\"/Game/Athena/Items/Cosmetics/Contrails/DefaultContrail.DefaultContrail\",\"contrailEKey\":\"\",\"scratchpad\":[],\"cosmeticStats\":[{\"statName\":\"HabaneroProgression\",\"statValue\":0},{\"statName\":\"TotalVictoryCrowns\",\"statValue\":0},{\"statName\":\"TotalRoyalRoyales\",\"statValue\":0},{\"statName\":\"HasCrown\",\"statValue\":0}]}}", + "Default:AthenaCosmeticLoadout_j": "{\"AthenaCosmeticLoadout\":{\"characterPrimaryAssetId\":\"\",\"characterEKey\":\"\",\"backpackDef\":\"None\",\"backpackEKey\":\"\",\"pickaxeDef\":\"/Game/Athena/Items/Cosmetics/Pickaxes/DefaultPickaxe.DefaultPickaxe\",\"pickaxeEKey\":\"\",\"contrailDef\":\"/Game/Athena/Items/Cosmetics/Contrails/DefaultContrail.DefaultContrail\",\"contrailEKey\":\"\",\"shoesDef\":\"None\",\"shoesEKey\":\"\",\"scratchpad\":[],\"cosmeticStats\":[{\"statName\":\"HabaneroProgression\",\"statValue\":0},{\"statName\":\"TotalVictoryCrowns\",\"statValue\":0},{\"statName\":\"TotalRoyalRoyales\",\"statValue\":0},{\"statName\":\"HasCrown\",\"statValue\":0}]}}", "Default:BattlePassInfo_j": "{\"BattlePassInfo\":{\"bHasPurchasedPass\":false,\"passLevel\":1,\"selfBoostXp\":0,\"friendBoostXp\":0}}", "Default:bIsPartyUsingPartySignal_b": "false", "Default:CampaignHero_j": "{\"CampaignHero\":{\"heroItemInstanceId\":\"\",\"heroType\":\"\"}}", diff --git a/src/structures/party/ClientPartyMember.ts b/src/structures/party/ClientPartyMember.ts index 207e1d36..89ff39cf 100644 --- a/src/structures/party/ClientPartyMember.ts +++ b/src/structures/party/ClientPartyMember.ts @@ -356,6 +356,27 @@ class ClientPartyMember extends PartyMember { await this.sendPatch(patches); } + /** + * Updates the client party member's shoes + * @param id The shoes's ID + * @throws {EpicgamesAPIError} + */ + public async setShoes(id: string) { + let data = this.meta.get('Default:AthenaCosmeticLoadout_j'); + + data = this.meta.set('Default:AthenaCosmeticLoadout_j', { + ...data, + AthenaCosmeticLoadout: { + ...data.AthenaCosmeticLoadout, + shoesDef: `/CosmeticShoes/Assets/Items/Cosmetics/${id}.${id}`, + }, + }); + + await this.sendPatch({ + 'Default:AthenaCosmeticLoadout_j': data, + }); + } + /** * Updates the client party member's emote * @param id The emote's ID diff --git a/src/structures/party/PartyMember.ts b/src/structures/party/PartyMember.ts index 23f25b55..cdf8cc85 100644 --- a/src/structures/party/PartyMember.ts +++ b/src/structures/party/PartyMember.ts @@ -93,6 +93,13 @@ class PartyMember extends User { return this.meta.backpack; } + /** + * The member's currently equipped shoes + */ + public get shoes() { + return this.meta.shoes; + } + /** * Whether the member is ready */ diff --git a/src/structures/party/PartyMemberMeta.ts b/src/structures/party/PartyMemberMeta.ts index b5dcd06e..7f9f56a7 100644 --- a/src/structures/party/PartyMemberMeta.ts +++ b/src/structures/party/PartyMemberMeta.ts @@ -37,6 +37,13 @@ class PartyMemberMeta extends Meta { return (this.get('Default:AthenaCosmeticLoadout_j')?.AthenaCosmeticLoadout?.backpackDef as string)?.match(/(?<=\w*\.)\w*/)?.shift(); } + /** + * The currently equipped shoes + */ + public get shoes(): string | undefined { + return (this.get('Default:AthenaCosmeticLoadout_j')?.AthenaCosmeticLoadout?.shoesDef as string)?.match(/(?<=\w*\.)\w*/)?.shift(); + } + /** * Whether the member is ready */