From a4eec6e04316b5a0ff39e7c3e56043e8febc5608 Mon Sep 17 00:00:00 2001 From: Kye Date: Sun, 3 Nov 2024 22:02:06 +1100 Subject: [PATCH] Updated Default:RawSquadAssignments_j to Default:SquadInformation_j (#789) * Updated Default:RawSquadAssignments_j to Default:SquadInformation_j * slight refactor --------- Co-authored-by: ThisNils <59409978+ThisNils@users.noreply.github.com> --- resources/defaultPartyMeta.json | 4 ++-- src/structures/party/ClientParty.ts | 2 +- src/structures/party/ClientPartyMeta.ts | 10 ++++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/resources/defaultPartyMeta.json b/resources/defaultPartyMeta.json index ff2ab879..0c6a8fe2 100644 --- a/resources/defaultPartyMeta.json +++ b/resources/defaultPartyMeta.json @@ -21,7 +21,7 @@ "Default:PlaylistData_j": "{\"PlaylistData\":{\"playlistName\":\"Playlist_DefaultSquad\",\"tournamentId\":\"\",\"eventWindowId\":\"\",\"linkId\":{\"mnemonic\":\"playlist_defaultsquad\",\"version\":-1},\"bGracefullyUpgraded\":false,\"matchmakingRulePreset\":\"RespectParties\"}}", "Default:PrimaryGameSessionId_s": "", "Default:PrivacySettings_j": "{\"PrivacySettings\":{\"partyType\":\"Public\",\"partyInviteRestriction\":\"AnyMember\",\"bOnlyLeaderFriendsCanJoin\":false}}", - "Default:RawSquadAssignments_j": "{\"RawSquadAssignments\":[]}", + "Default:SquadInformation_j": "{\"SquadInformation\":{\"rawSquadAssignments\":[],\"squadData\":[{\"jamTempo\":0,\"jamKey\":0,\"jamMode\":0}]}}", "Default:RegionId_s": "EU", "Default:SelectedIsland_j": "{\"SelectedIsland\":{\"linkId\":{\"mnemonic\":\"playlist_defaultsquad\",\"version\":-1},\"worldId\":{\"iD\":\"\",\"ownerId\":\"INVALID\",\"name\":\"\"},\"sessionId\":\"\",\"joinInfo\":{\"islandJoinability\":\"CanNotBeJoinedOrWatched\",\"bIsWorldJoinable\":false,\"sessionKey\":\"\"}}}", "Default:TileStates_j": "{\"TileStates\":[]}", @@ -35,4 +35,4 @@ "urn:epic:cfg:party-type-id_s": "default", "urn:epic:cfg:presence-perm_s": "Anyone", "VoiceChat:implementation_s": "VivoxVoiceChat" -} \ No newline at end of file +} diff --git a/src/structures/party/ClientParty.ts b/src/structures/party/ClientParty.ts index e52d2e8c..d4ae11ef 100644 --- a/src/structures/party/ClientParty.ts +++ b/src/structures/party/ClientParty.ts @@ -248,7 +248,7 @@ class ClientParty extends Party { if (!this.me.isLeader) throw new PartyPermissionError(); await this.sendPatch({ - 'Default:RawSquadAssignments_j': this.meta.refreshSquadAssignments(), + 'Default:SquadInformation_j': this.meta.refreshSquadAssignments(), }); } diff --git a/src/structures/party/ClientPartyMeta.ts b/src/structures/party/ClientPartyMeta.ts index 7b1e6e6d..348846d6 100644 --- a/src/structures/party/ClientPartyMeta.ts +++ b/src/structures/party/ClientPartyMeta.ts @@ -52,8 +52,14 @@ class ClientPartyMeta extends PartyMeta { } }); - return this.set('Default:RawSquadAssignments_j', { - RawSquadAssignments: assignments, + const squadInformation = this.get('Default:SquadInformation_j'); + + return this.set('Default:SquadInformation_j', { + ...squadInformation, + SquadInformation: { + ...squadInformation.SquadInformation, + rawSquadAssignments: assignments, + }, }); }