Navigation
API > API/Plugins > API/Plugins/OnlineSubsystemUtils
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- AOnlineBeaconHostObject
- APartyBeaconHost
References
| Module | OnlineSubsystemUtils |
| Header | /Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Public/PartyBeaconHost.h |
| Include | #include "PartyBeaconHost.h" |
Syntax
UCLASS&40;Transient, NotPlaceable, Config&61;Engine&41;
class APartyBeaconHost : public AOnlineBeaconHostObject
Remarks
A beacon host used for taking reservations for an existing game session
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bIsValidationStrRequired | Do party members require validation strings. | |
| bool | bLogoutOnSessionTimeout | Do the timeouts below cause a player to be removed from the reservation list | |
| FOnCancelationReceived | CancelationReceived | Delegate fired when the beacon indicates a reservation cancellation | |
| FOnDuplicateReservation | DuplicateReservation | Delegate fired when the beacon detects a duplicate reservation | |
| FOnNewPlayerAdded | NewPlayerAddedDelegate | Delegate fired when reservation has been added | |
| FOnReservationUpdate | ReservationChanged | Delegate fired when the beacon indicates a reservation add/remove | |
| FOnReservationUpdate | ReservationsFull | Delegate fired when the beacon indicates all reservations are taken | |
| float | SessionTimeoutSecs | Seconds that can elapse before a reservation is removed due to player not being registered with the session | |
| TObjectPtr< UPartyBeaconState > | State | State of the beacon | |
| float | TravelSessionTimeoutSecs | Seconds that can elapse before a reservation is removed due to player not being registered with the session during a travel | |
| FOnValidatePlayers | ValidatePlayers | Delegate fired when asking the beacon owner if this reservation is legit |
Constructors
| Type | Name | Description | |
|---|---|---|---|
APartyBeaconHost
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| EPartyReservationResult::Type | AddPartyReservation
(
const FPartyReservation& ReservationRequest |
Attempts to add a party reservation to the beacon | |
| bool | ChangeTeam
(
const FUniqueNetIdRepl& PartyLeader, |
Place a party on a new team, party must fit and team must exist | |
| bool | DoesSessionMatch
(
const FString& SessionId |
Does the session match the one associated with this beacon | |
| void | Output current state of reservations to log | ||
| int32 | Determine the maximum team size that can be accommodated based on the current reservation slots occupied. | ||
| int32 | Get the max number of players per team | ||
| int32 | Get the maximum number of reservations allowed inside the beacon | ||
| int32 | Get the number of reservations actually used/consumed across all parties inside the beacon | ||
| int32 | GetNumPlayersOnTeam
(
int32 TeamIdx |
Get the number of players on a team across all existing reservations | |
| int32 | GetNumTeams () |
Get the number of teams. | |
| TSubclassOf< UPartyBeaconState > | |||
| bool | GetPartyLeader
(
const FUniqueNetIdRepl& InPartyMemberId, |
Get the party leader for a given unique id | |
| int32 | GetPlayersOnTeam
(
int32 TeamIndex, |
Get all the known players on a given team | |
| bool | GetPlayerValidation
(
const FUniqueNetId& PlayerId, |
Obtain player validation string from party reservation entry | |
| int32 | Get the current reservation count inside the beacon NOTE: This is NOT the same as the number of consumed reservations across all parties, just the total number of reservations! | ||
| int32 | GetReservationPlatformCount
(
const FString& InPlatform, |
Get a count of all players for a given platform | |
| UPartyBeaconState * | GetState () |
||
| int32 | GetTeamForCurrentPlayer
(
const FUniqueNetId& PlayerId |
Finds the current team assignment of the given player net id. | |
| void | HandlePlayerLogout
(
const FUniqueNetIdRepl& PlayerId |
Notify the beacon of a player logout | |
| bool | Crossplay | ||
| bool | InitFromBeaconState
(
UPartyBeaconState* PrevState |
Initialize the party host beacon from a previous state/configuration all existing reservations and configuration values are preserved | |
| bool | InitHostBeacon
(
int32 InTeamCount, |
Initialize the party host beacon | |
| bool | Do party members require validation strings. | ||
| void | NewPlayerAdded
(
const FPlayerReservation& NewPlayer |
Handle a newly added player | |
| void | NotifyReservationEventNextFrame
(
FOnReservationUpdate& ReservationEvent |
||
| FOnCancelationReceived & | Delegate fired when a the beacon host cancels a reservation | ||
| FOnDuplicateReservation & | Delegate fired when a the beacon detects a duplicate reservation | ||
| FOnNewPlayerAdded & | Delegate fired when the beacon host adds a new player | ||
| FOnReservationUpdate & | Delegate fired when a the beacon host detects a reservation addition/removal | ||
| FOnReservationUpdate & | Delegate fired when a the beacon host detects that all reservations are full | ||
| FOnValidatePlayers & | Delegate called when the beacon gets any request, allowing the owner to validate players at a higher level (bans,etc) | ||
| bool | PlayerHasReservation
(
const FUniqueNetId& PlayerId |
Does a given player id have an existing reservation | |
| void | PlayerRemoved
(
const FPlayerReservation& RemovedPlayer |
Handle a newly removed player | |
| void | ProcessCancelReservationRequest
(
APartyBeaconClient* Client, |
Handle a reservation cancellation request received from an incoming client | |
| void | ProcessReservationAddOrUpdateRequest
(
APartyBeaconClient* Client, |
Handle a reservation add or update request depending on reservation existance received from an incoming client | |
| void | ProcessReservationRequest
(
APartyBeaconClient* Client, |
Handle a reservation request received from an incoming client | |
| void | ProcessReservationUpdateRequest
(
APartyBeaconClient* Client, |
Handle a reservation update request received from an incoming client | |
| bool | ReconfigureTeamAndPlayerCount
(
int32 InNumTeams, |
Reconfigures the beacon for a different team/player count configuration Allows dedicated server to change beacon parameters after a playlist configuration has been made Does no real checking against current reservations because we assume the UI wouldn't let this party start a gametype if they were too big to fit on a team together | |
| void | RegisterAuthTicket
(
const FUniqueNetIdRepl& InPartyMemberId, |
Register user auth ticket with the reservation system Must have an existing reservation entry | |
| EPartyReservationResult::Type | RemovePartyReservation
(
const FUniqueNetIdRepl& PartyLeader |
Attempts to remove a party reservation from the beacon | |
| void | Update clients with current reservation information | ||
| void | SetCompetitiveIntegrity
(
bool bNewCompetitiveIntegrity |
Competitive integrity represents how "fair" we need to keep the game. | |
| void | SetTeamAssignmentMethod
(
FName NewAssignmentMethod |
Define the method for assignment new reservations to teams | |
| bool | Competitive integrity represents how "fair" we need to keep the game. | ||
| bool | SwapTeams
(
const FUniqueNetIdRepl& PartyLeader, |
Swap the parties between teams, parties must be of same size | |
| void | UpdatePartyLeader
(
const FUniqueNetIdRepl& InPartyMemberId, |
Update party leader for a given player with the reservation beacon (needed when party leader leaves, reservation beacon is in a temp/bad state until someone updates this) | |
| EPartyReservationResult::Type | UpdatePartyReservation
(
const FPartyReservation& ReservationUpdateRequest, |
Updates an existing party reservation on the beacon An existing reservation for this party leader must already exist |
Overridden from AActor
| Type | Name | Description | |
|---|---|---|---|
| void | Tick
(
float DeltaSeconds |
Function called every frame on this Actor. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |