game / pragma.party / PartyService / assignPartyLeaderV1 /
assignPartyLeaderV1 #
suspend fun assignPartyLeaderV1(session: PlayerSession, request: PartyRpc.AssignPartyLeaderV1Request): PartyRpc.AssignPartyLeaderV1Response
Assigns a target player as a leader of the party.
Request validation:
If the calling player is not in a party, throws PragmaError.PartyService_NotInParty. If the calling player is not a leader of the party, throws PragmaError.PartyService_PlayerNotLeader. If the calling player or target player are not in the party, throws PragmaError.PartyService_NotInParty. If the target player is a leader of the party, throws PragmaError.PartyService_PlayerIsLeader.
Assign party leader:
The target player is given leader privileges for the party. If PartyConfig.enableTransferPartyLeader is true, the calling player has their leader privileges removed, otherwise the party will contain multiple leaders. The party members receive a notification with updated party state.