game / / PartyService / joinWithPartyIdV1 /

joinWithPartyIdV1 #

suspend fun joinWithPartyIdV1(session: PlayerSession, request: PartyRpc.JoinWithPartyIdV1Request, sessionAction: SessionAction.Builder): PartyRpc.JoinWithPartyIdV1Response

Joins a party with a party ID.

Party validation:

The party corresponding to the request’s party id is retrieved. If the party cannot be found, fails with PragmaError.PartyService_PartyNotFound. If the player is already in the party, fails with PragmaError.PartyService_AlreadyInParty. If the party is full, fails with PragmaError.PartyService_PartyFull.

GameServerVersion calculation:

GameServerCompatibilityPlugin.calculateGameServerVersion is invoked to determine the overall GameServerVersion for the party if the new player joins. If no GameServerVersion is available from the plugin, will fail with PragmaError.PartyService_PartyClientVersionMismatch. If Party.overrideGameServerVersion was set during party initialization, the game server calculation will be skipped.

Adding the new player:

The player is then added to the party object and PartyPlugin.onAddPlayer is invoked to allow for initial customization of the player object. All party members are notified with updated party state.