Skip to content

Commit

Permalink
Updated Default:RawSquadAssignments_j to Default:SquadInformation_j (f…
Browse files Browse the repository at this point in the history
…nbrjs#789)

* Updated Default:RawSquadAssignments_j to Default:SquadInformation_j

* slight refactor

---------

Co-authored-by: ThisNils <59409978+ThisNils@users.noreply.github.com>
  • Loading branch information
KyeOnDiscord and ThisNils authored Nov 3, 2024
1 parent 54c9afa commit a4eec6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resources/defaultPartyMeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\":[]}",
Expand All @@ -35,4 +35,4 @@
"urn:epic:cfg:party-type-id_s": "default",
"urn:epic:cfg:presence-perm_s": "Anyone",
"VoiceChat:implementation_s": "VivoxVoiceChat"
}
}
2 changes: 1 addition & 1 deletion src/structures/party/ClientParty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
});
}

Expand Down
10 changes: 8 additions & 2 deletions src/structures/party/ClientPartyMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
});
}

Expand Down

0 comments on commit a4eec6e

Please sign in to comment.