Skip to main content

Client Party API Reference

Party is a service for creating an instant team for players. The player can use it to build a "temporary virtual team" and then fire a battle.

API List

APIDescription
CreatePartyCreate a new party
GetPartyInfoGet detailed information of a party
SetPartyStrategyChange the join/invite strategy of the current party
GetPlayerPartyInfoGet the player's current party information from server
InvitePlayerToPartyInvite other players to join current party
JoinPartyJoin a party
LeavePartyLeave the current party
DismissPartyDismiss the current party. Only the leader has right to do this
KickPartyMemberKick out a player in current party. Only the leader has right to do this
TransferPartyLeaderTransfer leader right of current party to another player. Only the leader has right to do this
SendPartyChatTextMsgSend party chat text message. Only enable_chatting in CreatePartyParams is True when the party was created
SendPartyChatCustomMsgSend party chat custom message. Only enable_chatting in CreatePartyParams is True when the party was created
CurrentPartyGet the cached information of the player's current party
SetGlobalCustomDataSet global custom data for party. Only Leader has permission to do it. The maximum length for custom data in a narrow-character string is 4096 bytes, If it is a wide-character string, it should be converted to a utf-8 narrow-character string before calculating its length.
SetPlayerCustomDataSet the player owned custom data. The maximum length for custom data in a narrow-character string is 4096 bytes, If it is a wide-character string, it should be converted to a utf-8 narrow-character string before calculating its length.

Event List

EventDescription
OnPartyStrategyChangedThe event will be triggered when party strategies changed.
OnPartyMemberJoinedThe event will be triggered when new players joined the party.
OnPartyMemberLeftThe event will be triggered when players left the party.
OnPartyDismissedThe event will be triggered when the party was dismissed.
OnPartyLeaderTransferredThe event will be triggered when the leader status was transferred.
OnReceivePartyInvitationThe event will be triggered when receive a party invitation.
OnReceivePartyChatMsgThe event will be triggered when party chat message arrived.
OnCustomDataChangedThe event will be triggered when party custom data changed.
OnPartyInfoUpdatedThe event will be triggered when party info updated.

API Details

CreateParty

Create a new party

/**
* Create a new party
*
* @param Params Request struct for create party
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void CreateParty(
const FPgosClientCreatePartyParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientPartyInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientCreatePartyParams&Request struct for create party
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPartyInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPartyInfo

Get detailed information of a party

/**
* Get detailed information of a party
*
* @param PartyId The id of party to query
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPartyInfo(
const FString& PartyId,
TFunction<void(const FPgosResult& Ret, const FPgosClientPartyInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&The id of party to query
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPartyInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetPartyStrategy

Change the join/invite strategy of the current party

/**
* Change the join/invite strategy of the current party
*
* @param Params Request struct for changing party strategy
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetPartyStrategy(
const FPgosClientSetPartyStrategyParams& Params,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSetPartyStrategyParams&Request struct for changing party strategy
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPlayerPartyInfo

Get the player's current party information from server

/**
* Get the player's current party information from server
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPlayerPartyInfo(
TFunction<void(const FPgosResult& Ret, const FPgosClientPartyInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPartyInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

InvitePlayerToParty

Invite other players to join current party

/**
* Invite other players to join current party
*
* @param PartyId The id of party to invite to
* @param InviteePlayerIds List of player id
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void InvitePlayerToParty(
const FString& PartyId,
const TArray<FString>& InviteePlayerIds,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&The id of party to invite to
InviteePlayerIdsconst TArray<FString>&List of player id
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

JoinParty

Join a party

/**
* Join a party
*
* @param PartyId The id of party to join
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void JoinParty(
const FString& PartyId,
TFunction<void(const FPgosResult& Ret, const FPgosClientPartyInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&The id of party to join
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPartyInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

LeaveParty

Leave the current party

/**
* Leave the current party
*
* @param PartyId The id of party to leave
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void LeaveParty(
const FString& PartyId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&The id of party to leave
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

DismissParty

Dismiss the current party. Only the leader has right to do this

/**
* Dismiss the current party. Only the leader has right to do this
*
* @param PartyId The id of party to dismiss
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void DismissParty(
const FString& PartyId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&The id of party to dismiss
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

KickPartyMember

Kick out a player in current party. Only the leader has right to do this

/**
* Kick out a player in current party. Only the leader has right to do this
*
* @param PartyId The id of party to kick out member
* @param KickPlayerId The player id of member to kick out
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void KickPartyMember(
const FString& PartyId,
const FString& KickPlayerId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&The id of party to kick out member
KickPlayerIdconst FString&The player id of member to kick out
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

TransferPartyLeader

Transfer leader right of current party to another player. Only the leader has right to do this

/**
* Transfer leader right of current party to another player. Only the leader has right to do this
*
* @param PartyId The id of party to transfer leadership
* @param NewLeaderPlayerId The player id of the new leader
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void TransferPartyLeader(
const FString& PartyId,
const FString& NewLeaderPlayerId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&The id of party to transfer leadership
NewLeaderPlayerIdconst FString&The player id of the new leader
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SendPartyChatTextMsg

Send party chat text message. Only enable_chatting in CreatePartyParams is True when the party was created

/**
* Send party chat text message.
* Only enable_chatting in CreatePartyParams is True when the party was created
*
* @param Params Request struct for sending party chat message
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SendPartyChatTextMsg(
const FPgosClientSendPartyChatMsgParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientChatMsgInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSendPartyChatMsgParams&Request struct for sending party chat message
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientChatMsgInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SendPartyChatCustomMsg

Send party chat custom message. Only enable_chatting in CreatePartyParams is True when the party was created

/**
* Send party chat custom message.
* Only enable_chatting in CreatePartyParams is True when the party was created
*
* @param Params Request struct for sending party chat message
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SendPartyChatCustomMsg(
const FPgosClientSendPartyChatMsgParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientChatMsgInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSendPartyChatMsgParams&Request struct for sending party chat message
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientChatMsgInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

CurrentParty

Get the cached information of the player's current party

/**
* Get the cached information of the player's current party
*
* @param Dst The latest party information detail
* @return false if not in a party, or don't get the detail information of the current party
*/
bool CurrentParty(
FPgosClientPartyInfo& Dst) const;

Parameters:

ParamTypeDescription
DstFPgosClientPartyInfo&The latest party information detail

Return: bool

false if not in a party, or don't get the detail information of the current party

SetGlobalCustomData

Set global custom data for party. Only Leader has permission to do it. The maximum length for custom data in a narrow-character string is 4096 bytes, If it is a wide-character string, it should be converted to a utf-8 narrow-character string before calculating its length.

/**
* Set global custom data for party. Only Leader has permission to do it.
* The maximum length for custom data in a narrow-character string is 4096 bytes,
* If it is a wide-character string, it should be converted to a utf-8 narrow-character string before calculating its length.
*
* @param PartyId Party ID.
* @param GlobalCustomData Global custom data string.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetGlobalCustomData(
const FString& PartyId,
const FString& GlobalCustomData,
TFunction<void(const FPgosResult& Ret, const FPgosClientPartyCustomData* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&Party ID.
GlobalCustomDataconst FString&Global custom data string.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPartyCustomData* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetPlayerCustomData

Set the player owned custom data. The maximum length for custom data in a narrow-character string is 4096 bytes, If it is a wide-character string, it should be converted to a utf-8 narrow-character string before calculating its length.

/**
* Set the player owned custom data.
* The maximum length for custom data in a narrow-character string is 4096 bytes,
* If it is a wide-character string, it should be converted to a utf-8 narrow-character string before calculating its length.
*
* @param PartyId Party ID.
* @param PlayerCustomData Player custom data string.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetPlayerCustomData(
const FString& PartyId,
const FString& PlayerCustomData,
TFunction<void(const FPgosResult& Ret, const FPgosClientPartyCustomData* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PartyIdconst FString&Party ID.
PlayerCustomDataconst FString&Player custom data string.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPartyCustomData* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

Event Details

OnPartyStrategyChanged

The event will be triggered when party strategies changed.

/**
* OnPartyStrategyChanged:
* The event will be triggered when party strategies changed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPartyStrategyChanged, const FPgosClientPartyStrategyChangedEvt& /*Event*/);
FOnPartyStrategyChanged& OnPartyStrategyChanged() { return PartyStrategyChangedDelegate; }

Type Reference:

OnPartyMemberJoined

The event will be triggered when new players joined the party.

/**
* OnPartyMemberJoined:
* The event will be triggered when new players joined the party.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPartyMemberJoined, const FPgosClientPartyMemberJoinedEvt& /*Event*/);
FOnPartyMemberJoined& OnPartyMemberJoined() { return PartyMemberJoinedDelegate; }

Type Reference:

OnPartyMemberLeft

The event will be triggered when players left the party.

/**
* OnPartyMemberLeft:
* The event will be triggered when players left the party.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPartyMemberLeft, const FPgosClientPartyMemberLeftEvt& /*Event*/);
FOnPartyMemberLeft& OnPartyMemberLeft() { return PartyMemberLeftDelegate; }

Type Reference:

OnPartyDismissed

The event will be triggered when the party was dismissed.

/**
* OnPartyDismissed:
* The event will be triggered when the party was dismissed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPartyDismissed, const FPgosClientPartyDismissedEvt& /*Event*/);
FOnPartyDismissed& OnPartyDismissed() { return PartyDismissedDelegate; }

Type Reference:

OnPartyLeaderTransferred

The event will be triggered when the leader status was transferred.

/**
* OnPartyLeaderTransferred:
* The event will be triggered when the leader status was transferred.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPartyLeaderTransferred, const FPgosClientPartyLeaderTransferredEvt& /*Event*/);
FOnPartyLeaderTransferred& OnPartyLeaderTransferred() { return PartyLeaderTransferredDelegate; }

Type Reference:

OnReceivePartyInvitation

The event will be triggered when receive a party invitation.

/**
* OnReceivePartyInvitation:
* The event will be triggered when receive a party invitation.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnReceivePartyInvitation, const FPgosClientReceivePartyInvitationEvt& /*Event*/);
FOnReceivePartyInvitation& OnReceivePartyInvitation() { return ReceivePartyInvitationDelegate; }

Type Reference:

OnReceivePartyChatMsg

The event will be triggered when party chat message arrived.

/**
* OnReceivePartyChatMsg:
* The event will be triggered when party chat message arrived.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnReceivePartyChatMsg, const FPgosClientReceivePartyChatMsgEvt& /*Event*/);
FOnReceivePartyChatMsg& OnReceivePartyChatMsg() { return ReceivePartyChatMsgDelegate; }

Type Reference:

OnCustomDataChanged

The event will be triggered when party custom data changed.

/**
* OnCustomDataChanged:
* The event will be triggered when party custom data changed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnCustomDataChanged, const FPgosClientPartyCustomDataChangedEvt& /*Event*/);
FOnCustomDataChanged& OnCustomDataChanged() { return CustomDataChangedDelegate; }

Type Reference:

OnPartyInfoUpdated

The event will be triggered when party info updated.

/**
* OnPartyInfoUpdated:
* The event will be triggered when party info updated.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPartyInfoUpdated, const FPgosClientPartyInfoUpdatedEvt& /*Event*/);
FOnPartyInfoUpdated& OnPartyInfoUpdated() { return PartyInfoUpdatedDelegate; }

Type Reference: