mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-23 08:24:18 +00:00
Removed old style enums in favor of strongly typed enums
Former-commit-id: 0a33d916dbc0e318c63472c0768a0f934af31857
This commit is contained in:
@@ -12,7 +12,7 @@ public class AdvancedSessions : ModuleRules
|
|||||||
|
|
||||||
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Linux) || (Target.Platform == UnrealTargetPlatform.Mac))
|
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Linux) || (Target.Platform == UnrealTargetPlatform.Mac))
|
||||||
{
|
{
|
||||||
PublicDependencyModuleNames.AddRange(new string[] { "Steamworks"/*"Voice", "OnlineSubsystemSteam"*/ });
|
PublicDependencyModuleNames.AddRange(new string[] { "Steamworks"/*,"Voice", "OnlineSubsystemSteam"*/ });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -31,19 +31,19 @@ public:
|
|||||||
|
|
||||||
// Show the UI that handles the Friends list
|
// Show the UI that handles the Friends list
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
||||||
static void ShowFriendsUI(APlayerController *PlayerController, TEnumAsByte<EBlueprintResultSwitch::Type> &Result);
|
static void ShowFriendsUI(APlayerController *PlayerController, EBlueprintResultSwitch &Result);
|
||||||
|
|
||||||
// Show the UI that handles inviting people to your game
|
// Show the UI that handles inviting people to your game
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
||||||
static void ShowInviteUI(APlayerController *PlayerController, TEnumAsByte<EBlueprintResultSwitch::Type> &Result);
|
static void ShowInviteUI(APlayerController *PlayerController, EBlueprintResultSwitch &Result);
|
||||||
|
|
||||||
// Show the UI that shows the leaderboard (doesn't work with steam)
|
// Show the UI that shows the leaderboard (doesn't work with steam)
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
||||||
static void ShowLeaderBoardUI(FString LeaderboardName, TEnumAsByte<EBlueprintResultSwitch::Type> &Result);
|
static void ShowLeaderBoardUI(FString LeaderboardName, EBlueprintResultSwitch &Result);
|
||||||
|
|
||||||
// Show the UI that shows a web URL
|
// Show the UI that shows a web URL
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result", AutoCreateRefTerm = "AllowedDomains"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result", AutoCreateRefTerm = "AllowedDomains"))
|
||||||
static void ShowWebURLUI(FString URLToShow, TEnumAsByte<EBlueprintResultSwitch::Type> &Result, TArray<FString>& AllowedDomains, bool bEmbedded = false , bool bShowBackground = false, bool bShowCloseButton = false, int32 OffsetX = 0, int32 OffsetY = 0, int32 SizeX = 0, int32 SizeY = 0);
|
static void ShowWebURLUI(FString URLToShow, EBlueprintResultSwitch &Result, TArray<FString>& AllowedDomains, bool bEmbedded = false , bool bShowBackground = false, bool bShowCloseButton = false, int32 OffsetX = 0, int32 OffsetY = 0, int32 SizeX = 0, int32 SizeY = 0);
|
||||||
|
|
||||||
// Show the UI that shows a web URL
|
// Show the UI that shows a web URL
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI")
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI")
|
||||||
@@ -52,10 +52,10 @@ public:
|
|||||||
|
|
||||||
// Show the UI that shows the profile of a uniquenetid
|
// Show the UI that shows the profile of a uniquenetid
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
||||||
static void ShowProfileUI(const FBPUniqueNetId PlayerViewingProfile, const FBPUniqueNetId PlayerToViewProfileOf, TEnumAsByte<EBlueprintResultSwitch::Type> &Result);
|
static void ShowProfileUI(const FBPUniqueNetId PlayerViewingProfile, const FBPUniqueNetId PlayerToViewProfileOf, EBlueprintResultSwitch &Result);
|
||||||
|
|
||||||
// Show the UI that shows the account upgrade UI (doesn't work with steam)
|
// Show the UI that shows the account upgrade UI (doesn't work with steam)
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedExternalUI", meta = (ExpandEnumAsExecs = "Result"))
|
||||||
static void ShowAccountUpgradeUI(const FBPUniqueNetId PlayerRequestingAccountUpgradeUI, TEnumAsByte<EBlueprintResultSwitch::Type> &Result);
|
static void ShowAccountUpgradeUI(const FBPUniqueNetId PlayerRequestingAccountUpgradeUI, EBlueprintResultSwitch &Result);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
DECLARE_LOG_CATEGORY_EXTERN(AdvancedFriendsLog, Log, All);
|
DECLARE_LOG_CATEGORY_EXTERN(AdvancedFriendsLog, Log, All);
|
||||||
|
|
||||||
UENUM(Blueprintable)
|
UENUM(Blueprintable)
|
||||||
enum SteamAvatarSize
|
enum class SteamAvatarSize : uint8
|
||||||
{
|
{
|
||||||
SteamAvatar_Small = 1,
|
SteamAvatar_Small = 1,
|
||||||
SteamAvatar_Medium = 2,
|
SteamAvatar_Medium = 2,
|
||||||
@@ -39,11 +39,11 @@ public:
|
|||||||
|
|
||||||
// Sends an Invite to the current online session to a list of friends
|
// Sends an Invite to the current online session to a list of friends
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList", meta = (ExpandEnumAsExecs = "Result"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList", meta = (ExpandEnumAsExecs = "Result"))
|
||||||
static void SendSessionInviteToFriends(APlayerController *PlayerController, const TArray<FBPUniqueNetId> &Friends, TEnumAsByte<EBlueprintResultSwitch::Type> &Result);
|
static void SendSessionInviteToFriends(APlayerController *PlayerController, const TArray<FBPUniqueNetId> &Friends, EBlueprintResultSwitch &Result);
|
||||||
|
|
||||||
// Sends an Invite to the current online session to a friend
|
// Sends an Invite to the current online session to a friend
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList", meta = (ExpandEnumAsExecs = "Result"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList", meta = (ExpandEnumAsExecs = "Result"))
|
||||||
static void SendSessionInviteToFriend(APlayerController *PlayerController, const FBPUniqueNetId &FriendUniqueNetId, TEnumAsByte<EBlueprintResultSwitch::Type> &Result);
|
static void SendSessionInviteToFriend(APlayerController *PlayerController, const FBPUniqueNetId &FriendUniqueNetId, EBlueprintResultSwitch &Result);
|
||||||
|
|
||||||
// Get a friend from the previously read/saved friends list (Must Call GetFriends first for this to return anything)
|
// Get a friend from the previously read/saved friends list (Must Call GetFriends first for this to return anything)
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList")
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|FriendsList")
|
||||||
|
@@ -38,11 +38,11 @@ public:
|
|||||||
|
|
||||||
// Get the current session state
|
// Get the current session state
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo")
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo")
|
||||||
static void GetSessionState(TEnumAsByte<EBPOnlineSessionState::Type> &SessionState);
|
static void GetSessionState(EBPOnlineSessionState &SessionState);
|
||||||
|
|
||||||
// Get the current session settings
|
// Get the current session settings
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "Result"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "Result"))
|
||||||
static void GetSessionSettings(int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, TEnumAsByte<EBlueprintResultSwitch::Type> &Result);
|
static void GetSessionSettings(int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, EBlueprintResultSwitch &Result);
|
||||||
|
|
||||||
// Check if someone is in the current session
|
// Check if someone is in the current session
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo")
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo")
|
||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
|
|
||||||
// Make a literal session search parameter
|
// Make a literal session search parameter
|
||||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|SessionInfo|Literals")
|
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|SessionInfo|Literals")
|
||||||
static FSessionsSearchSetting MakeLiteralSessionSearchProperty(FSessionPropertyKeyPair SessionSearchProperty, EOnlineComparisonOpRedux::Type ComparisonOp);
|
static FSessionsSearchSetting MakeLiteralSessionSearchProperty(FSessionPropertyKeyPair SessionSearchProperty, EOnlineComparisonOpRedux ComparisonOp);
|
||||||
|
|
||||||
|
|
||||||
//********* Session Information Functions ***********//
|
//********* Session Information Functions ***********//
|
||||||
@@ -69,23 +69,23 @@ public:
|
|||||||
|
|
||||||
// Get session custom information key/value as Byte (For Enums)
|
// Get session custom information key/value as Byte (For Enums)
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
||||||
static void GetSessionPropertyByte(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, uint8 &SettingValue);
|
static void GetSessionPropertyByte(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, uint8 &SettingValue);
|
||||||
|
|
||||||
// Get session custom information key/value as Bool
|
// Get session custom information key/value as Bool
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
||||||
static void GetSessionPropertyBool(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, bool &SettingValue);
|
static void GetSessionPropertyBool(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, bool &SettingValue);
|
||||||
|
|
||||||
// Get session custom information key/value as String
|
// Get session custom information key/value as String
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
||||||
static void GetSessionPropertyString(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, FString &SettingValue);
|
static void GetSessionPropertyString(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, FString &SettingValue);
|
||||||
|
|
||||||
// Get session custom information key/value as Int
|
// Get session custom information key/value as Int
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
||||||
static void GetSessionPropertyInt(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, int32 &SettingValue);
|
static void GetSessionPropertyInt(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, int32 &SettingValue);
|
||||||
|
|
||||||
// Get session custom information key/value as Float
|
// Get session custom information key/value as Float
|
||||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedSessions|SessionInfo", meta = (ExpandEnumAsExecs = "SearchResult"))
|
||||||
static void GetSessionPropertyFloat(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, float &SettingValue);
|
static void GetSessionPropertyFloat(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, float &SettingValue);
|
||||||
|
|
||||||
|
|
||||||
// Make a literal session custom information key/value pair from Byte (For Enums)
|
// Make a literal session custom information key/value pair from Byte (For Enums)
|
||||||
|
@@ -15,85 +15,70 @@
|
|||||||
|
|
||||||
|
|
||||||
UENUM()
|
UENUM()
|
||||||
namespace ESessionSettingSearchResult
|
enum class ESessionSettingSearchResult : uint8
|
||||||
{
|
{
|
||||||
enum Type
|
// Found the setting
|
||||||
{
|
Found,
|
||||||
// Found the setting
|
|
||||||
Found,
|
|
||||||
|
|
||||||
// Did not find the setting
|
// Did not find the setting
|
||||||
NotFound,
|
NotFound,
|
||||||
|
|
||||||
// Was not the correct ype
|
// Was not the correct ype
|
||||||
WrongType
|
WrongType
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
// This makes a lot of the blueprint functions cleaner
|
// This makes a lot of the blueprint functions cleaner
|
||||||
UENUM()
|
UENUM()
|
||||||
namespace EBlueprintResultSwitch
|
enum class EBlueprintResultSwitch : uint8
|
||||||
{
|
{
|
||||||
enum Type
|
// On Success
|
||||||
{
|
OnSuccess,
|
||||||
// On Success
|
|
||||||
OnSuccess,
|
|
||||||
|
|
||||||
// On Failure
|
// On Failure
|
||||||
OnFailure
|
OnFailure
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
// This is to define server type searches
|
// This is to define server type searches
|
||||||
UENUM(BlueprintType)
|
UENUM(BlueprintType)
|
||||||
namespace EBPServerPresenceSearchType
|
enum class EBPServerPresenceSearchType : uint8
|
||||||
{
|
{
|
||||||
enum Type
|
ClientServersOnly,
|
||||||
{
|
DedicatedServersOnly,
|
||||||
ClientServersOnly,
|
AllServers
|
||||||
DedicatedServersOnly,
|
};
|
||||||
AllServers
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wanted this to be switchable in the editor
|
// Wanted this to be switchable in the editor
|
||||||
UENUM(BlueprintType)
|
UENUM(BlueprintType)
|
||||||
namespace EBPOnlinePresenceState
|
enum class EBPOnlinePresenceState : uint8
|
||||||
{
|
{
|
||||||
enum Type
|
Online,
|
||||||
{
|
Offline,
|
||||||
Online,
|
Away,
|
||||||
Offline,
|
ExtendedAway,
|
||||||
Away,
|
DoNotDisturb,
|
||||||
ExtendedAway,
|
Chat
|
||||||
DoNotDisturb,
|
};
|
||||||
Chat
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
UENUM(BlueprintType)
|
UENUM(BlueprintType)
|
||||||
namespace EBPOnlineSessionState
|
enum class EBPOnlineSessionState : uint8
|
||||||
{
|
{
|
||||||
enum Type
|
/** An online session has not been created yet */
|
||||||
{
|
NoSession,
|
||||||
/** An online session has not been created yet */
|
/** An online session is in the process of being created */
|
||||||
NoSession,
|
Creating,
|
||||||
/** An online session is in the process of being created */
|
/** Session has been created but the session hasn't started (pre match lobby) */
|
||||||
Creating,
|
Pending,
|
||||||
/** Session has been created but the session hasn't started (pre match lobby) */
|
/** Session has been asked to start (may take time due to communication with backend) */
|
||||||
Pending,
|
Starting,
|
||||||
/** Session has been asked to start (may take time due to communication with backend) */
|
/** The current session has started. Sessions with join in progress disabled are no longer joinable */
|
||||||
Starting,
|
InProgress,
|
||||||
/** The current session has started. Sessions with join in progress disabled are no longer joinable */
|
/** The session is still valid, but the session is no longer being played (post match lobby) */
|
||||||
InProgress,
|
Ending,
|
||||||
/** The session is still valid, but the session is no longer being played (post match lobby) */
|
/** The session is closed and any stats committed */
|
||||||
Ending,
|
Ended,
|
||||||
/** The session is closed and any stats committed */
|
/** The session is being destroyed */
|
||||||
Ended,
|
Destroying
|
||||||
/** The session is being destroyed */
|
};
|
||||||
Destroying
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Boy oh boy is this a dirty hack, but I can't figure out a good way to do it otherwise at the moment
|
// Boy oh boy is this a dirty hack, but I can't figure out a good way to do it otherwise at the moment
|
||||||
// The UniqueNetId is an abstract class so I can't exactly re-initialize it to make a shared pointer on some functions
|
// The UniqueNetId is an abstract class so I can't exactly re-initialize it to make a shared pointer on some functions
|
||||||
@@ -205,7 +190,7 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
bool bHasVoiceSupport;
|
bool bHasVoiceSupport;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
TEnumAsByte<EBPOnlinePresenceState::Type> PresenceState;
|
EBPOnlinePresenceState PresenceState;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
FString StatusString;
|
FString StatusString;
|
||||||
};
|
};
|
||||||
@@ -224,7 +209,7 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
FString RealName;
|
FString RealName;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
TEnumAsByte<EBPOnlinePresenceState::Type> OnlineState;
|
EBPOnlinePresenceState OnlineState;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
FBPUniqueNetId UniqueNetId;
|
FBPUniqueNetId UniqueNetId;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Online|Friend")
|
||||||
@@ -236,18 +221,15 @@ public:
|
|||||||
/** The types of comparison operations for a given search query */
|
/** The types of comparison operations for a given search query */
|
||||||
// Used to compare session properties
|
// Used to compare session properties
|
||||||
UENUM(BlueprintType)
|
UENUM(BlueprintType)
|
||||||
namespace EOnlineComparisonOpRedux
|
enum class EOnlineComparisonOpRedux : uint8
|
||||||
{
|
{
|
||||||
enum Type
|
Equals,
|
||||||
{
|
NotEquals,
|
||||||
Equals,
|
GreaterThan,
|
||||||
NotEquals,
|
GreaterThanEquals,
|
||||||
GreaterThan,
|
LessThan,
|
||||||
GreaterThanEquals,
|
LessThanEquals,
|
||||||
LessThan,
|
};
|
||||||
LessThanEquals,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Used to store session properties before converting to FVariantData
|
// Used to store session properties before converting to FVariantData
|
||||||
@@ -271,7 +253,7 @@ struct FSessionsSearchSetting
|
|||||||
|
|
||||||
// Had to make a copy of this to account for the original not being exposed to blueprints
|
// Had to make a copy of this to account for the original not being exposed to blueprints
|
||||||
/** How is this session setting compared on the backend searches */
|
/** How is this session setting compared on the backend searches */
|
||||||
TEnumAsByte<EOnlineComparisonOpRedux::Type> ComparisonOp;
|
EOnlineComparisonOpRedux ComparisonOp;
|
||||||
|
|
||||||
// The key pair to search for
|
// The key pair to search for
|
||||||
FSessionPropertyKeyPair PropertyKeyPair;
|
FSessionPropertyKeyPair PropertyKeyPair;
|
||||||
@@ -333,11 +315,11 @@ class FOnlineSearchSettingsEx : public FOnlineSearchSettings
|
|||||||
*/
|
*/
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void HardSet(FName Key, const FVariantData& Value, EOnlineComparisonOpRedux::Type CompOp)
|
void HardSet(FName Key, const FVariantData& Value, EOnlineComparisonOpRedux CompOp)
|
||||||
{
|
{
|
||||||
FOnlineSessionSearchParam* SearchParam = SearchParams.Find(Key);
|
FOnlineSessionSearchParam* SearchParam = SearchParams.Find(Key);
|
||||||
|
|
||||||
EOnlineComparisonOp::Type op;
|
TEnumAsByte<EOnlineComparisonOp::Type> op;
|
||||||
|
|
||||||
switch (CompOp)
|
switch (CompOp)
|
||||||
{
|
{
|
||||||
|
@@ -21,9 +21,9 @@ class UFindSessionsCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
|||||||
|
|
||||||
// Searches for advertised sessions with the default online subsystem and includes an array of filters
|
// Searches for advertised sessions with the default online subsystem and includes an array of filters
|
||||||
UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject", AutoCreateRefTerm="Filters"), Category = "Online|AdvancedSessions")
|
UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject", AutoCreateRefTerm="Filters"), Category = "Online|AdvancedSessions")
|
||||||
static UFindSessionsCallbackProxyAdvanced* FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int32 MaxResults, bool bUseLAN, TEnumAsByte<EBPServerPresenceSearchType::Type> ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly = false, bool bNonEmptyServersOnly = false, bool bSecureServersOnly = false, int MinSlotsAvailable = 0);
|
static UFindSessionsCallbackProxyAdvanced* FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int32 MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly = false, bool bNonEmptyServersOnly = false, bool bSecureServersOnly = false, int MinSlotsAvailable = 0);
|
||||||
|
|
||||||
static bool CompareVariants(const FVariantData &A, const FVariantData &B, EOnlineComparisonOpRedux::Type Comparator);
|
static bool CompareVariants(const FVariantData &A, const FVariantData &B, EOnlineComparisonOpRedux Comparator);
|
||||||
|
|
||||||
// Filters an array of session results by the given search parameters, returns a new array with the filtered results
|
// Filters an array of session results by the given search parameters, returns a new array with the filtered results
|
||||||
UFUNCTION(BluePrintCallable, meta = (Category = "Online|AdvancedSessions"))
|
UFUNCTION(BluePrintCallable, meta = (Category = "Online|AdvancedSessions"))
|
||||||
@@ -68,7 +68,7 @@ private:
|
|||||||
bool bUseLAN;
|
bool bUseLAN;
|
||||||
|
|
||||||
// Whether or not to search for dedicated servers
|
// Whether or not to search for dedicated servers
|
||||||
EBPServerPresenceSearchType::Type ServerSearchType;
|
EBPServerPresenceSearchType ServerSearchType;
|
||||||
|
|
||||||
// Maximum number of results to return
|
// Maximum number of results to return
|
||||||
int MaxResults;
|
int MaxResults;
|
||||||
|
@@ -40,7 +40,7 @@ private:
|
|||||||
|
|
||||||
// The Type of friends list to get
|
// The Type of friends list to get
|
||||||
// Removed because all but the facebook interfaces don't even currently support anything but the default friends list.
|
// Removed because all but the facebook interfaces don't even currently support anything but the default friends list.
|
||||||
//EBPFriendsLists::Type FriendListToGet;
|
//EBPFriendsLists FriendListToGet;
|
||||||
|
|
||||||
// The world context object in which this call is taking place
|
// The world context object in which this call is taking place
|
||||||
UObject* WorldContextObject;
|
UObject* WorldContextObject;
|
||||||
|
@@ -5,22 +5,22 @@
|
|||||||
//General Log
|
//General Log
|
||||||
DEFINE_LOG_CATEGORY(AdvancedExternalUILog);
|
DEFINE_LOG_CATEGORY(AdvancedExternalUILog);
|
||||||
|
|
||||||
void UAdvancedExternalUILibrary::ShowAccountUpgradeUI(const FBPUniqueNetId PlayerRequestingAccountUpgradeUI, TEnumAsByte<EBlueprintResultSwitch::Type> &Result)
|
void UAdvancedExternalUILibrary::ShowAccountUpgradeUI(const FBPUniqueNetId PlayerRequestingAccountUpgradeUI, EBlueprintResultSwitch &Result)
|
||||||
{
|
{
|
||||||
IOnlineExternalUIPtr ExternalUIInterface = Online::GetExternalUIInterface();
|
IOnlineExternalUIPtr ExternalUIInterface = Online::GetExternalUIInterface();
|
||||||
|
|
||||||
if (!ExternalUIInterface.IsValid())
|
if (!ExternalUIInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowAccountUpgradeUI Failed to get External UI interface!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowAccountUpgradeUI Failed to get External UI interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalUIInterface->ShowAccountUpgradeUI(*PlayerRequestingAccountUpgradeUI.GetUniqueNetId());
|
ExternalUIInterface->ShowAccountUpgradeUI(*PlayerRequestingAccountUpgradeUI.GetUniqueNetId());
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedExternalUILibrary::ShowProfileUI(const FBPUniqueNetId PlayerViewingProfile, const FBPUniqueNetId PlayerToViewProfileOf, TEnumAsByte<EBlueprintResultSwitch::Type> &Result)
|
void UAdvancedExternalUILibrary::ShowProfileUI(const FBPUniqueNetId PlayerViewingProfile, const FBPUniqueNetId PlayerToViewProfileOf, EBlueprintResultSwitch &Result)
|
||||||
{
|
{
|
||||||
|
|
||||||
IOnlineExternalUIPtr ExternalUIInterface = Online::GetExternalUIInterface();
|
IOnlineExternalUIPtr ExternalUIInterface = Online::GetExternalUIInterface();
|
||||||
@@ -28,24 +28,24 @@ void UAdvancedExternalUILibrary::ShowProfileUI(const FBPUniqueNetId PlayerViewin
|
|||||||
if (!ExternalUIInterface.IsValid())
|
if (!ExternalUIInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowProfileUI Failed to get External UI interface!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowProfileUI Failed to get External UI interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalUIInterface->ShowProfileUI(*PlayerViewingProfile.GetUniqueNetId(), *PlayerToViewProfileOf.GetUniqueNetId(), NULL);
|
ExternalUIInterface->ShowProfileUI(*PlayerViewingProfile.GetUniqueNetId(), *PlayerToViewProfileOf.GetUniqueNetId(), NULL);
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void UAdvancedExternalUILibrary::ShowWebURLUI(FString URLToShow, TEnumAsByte<EBlueprintResultSwitch::Type> &Result, TArray<FString>& AllowedDomains, bool bEmbedded, bool bShowBackground, bool bShowCloseButton, int32 OffsetX, int32 OffsetY, int32 SizeX, int32 SizeY)
|
void UAdvancedExternalUILibrary::ShowWebURLUI(FString URLToShow, EBlueprintResultSwitch &Result, TArray<FString>& AllowedDomains, bool bEmbedded, bool bShowBackground, bool bShowCloseButton, int32 OffsetX, int32 OffsetY, int32 SizeX, int32 SizeY)
|
||||||
{
|
{
|
||||||
IOnlineExternalUIPtr ExternalUIInterface = Online::GetExternalUIInterface();
|
IOnlineExternalUIPtr ExternalUIInterface = Online::GetExternalUIInterface();
|
||||||
|
|
||||||
if (!ExternalUIInterface.IsValid())
|
if (!ExternalUIInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowWebURLUI Failed to get External UI interface!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowWebURLUI Failed to get External UI interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ void UAdvancedExternalUILibrary::ShowWebURLUI(FString URLToShow, TEnumAsByte<EBl
|
|||||||
Params.SizeY = SizeY;
|
Params.SizeY = SizeY;
|
||||||
|
|
||||||
ExternalUIInterface->ShowWebURL(URLToShow, Params);
|
ExternalUIInterface->ShowWebURL(URLToShow, Params);
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedExternalUILibrary::CloseWebURLUI()
|
void UAdvancedExternalUILibrary::CloseWebURLUI()
|
||||||
@@ -79,29 +79,29 @@ void UAdvancedExternalUILibrary::CloseWebURLUI()
|
|||||||
ExternalUIInterface->CloseWebURL();
|
ExternalUIInterface->CloseWebURL();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedExternalUILibrary::ShowLeaderBoardUI(FString LeaderboardName, TEnumAsByte<EBlueprintResultSwitch::Type> &Result)
|
void UAdvancedExternalUILibrary::ShowLeaderBoardUI(FString LeaderboardName, EBlueprintResultSwitch &Result)
|
||||||
{
|
{
|
||||||
IOnlineExternalUIPtr ExternalUIInterface = Online::GetExternalUIInterface();
|
IOnlineExternalUIPtr ExternalUIInterface = Online::GetExternalUIInterface();
|
||||||
|
|
||||||
if (!ExternalUIInterface.IsValid())
|
if (!ExternalUIInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowLeaderboardsUI Failed to get External UI interface!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowLeaderboardsUI Failed to get External UI interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalUIInterface->ShowLeaderboardUI(LeaderboardName);
|
ExternalUIInterface->ShowLeaderboardUI(LeaderboardName);
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void UAdvancedExternalUILibrary::ShowInviteUI(APlayerController *PlayerController, TEnumAsByte<EBlueprintResultSwitch::Type> &Result)
|
void UAdvancedExternalUILibrary::ShowInviteUI(APlayerController *PlayerController, EBlueprintResultSwitch &Result)
|
||||||
{
|
{
|
||||||
if (!PlayerController)
|
if (!PlayerController)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowInviteUI Had a bad Player Controller!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowInviteUI Had a bad Player Controller!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ void UAdvancedExternalUILibrary::ShowInviteUI(APlayerController *PlayerControlle
|
|||||||
if (!ExternalUIInterface.IsValid())
|
if (!ExternalUIInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowInviteUI Failed to get External UI interface!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowInviteUI Failed to get External UI interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,20 +119,20 @@ void UAdvancedExternalUILibrary::ShowInviteUI(APlayerController *PlayerControlle
|
|||||||
if (!Player)
|
if (!Player)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowInviteUI Failed to get ULocalPlayer for the given PlayerController!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowInviteUI Failed to get ULocalPlayer for the given PlayerController!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalUIInterface->ShowInviteUI(Player->GetControllerId(), GameSessionName);
|
ExternalUIInterface->ShowInviteUI(Player->GetControllerId(), GameSessionName);
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedExternalUILibrary::ShowFriendsUI(APlayerController *PlayerController, TEnumAsByte<EBlueprintResultSwitch::Type> &Result)
|
void UAdvancedExternalUILibrary::ShowFriendsUI(APlayerController *PlayerController, EBlueprintResultSwitch &Result)
|
||||||
{
|
{
|
||||||
if (!PlayerController)
|
if (!PlayerController)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowFriendsUI Had a bad Player Controller!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowFriendsUI Had a bad Player Controller!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ void UAdvancedExternalUILibrary::ShowFriendsUI(APlayerController *PlayerControll
|
|||||||
if (!ExternalUIInterface.IsValid())
|
if (!ExternalUIInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowFriendsUI Failed to get External UI interface!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowFriendsUI Failed to get External UI interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,10 +150,10 @@ void UAdvancedExternalUILibrary::ShowFriendsUI(APlayerController *PlayerControll
|
|||||||
if (!Player)
|
if (!Player)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowFriendsUI Failed to get ULocalPlayer for the given PlayerController!"));
|
UE_LOG(AdvancedExternalUILog, Warning, TEXT("ShowFriendsUI Failed to get ULocalPlayer for the given PlayerController!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternalUIInterface->ShowFriendsUI(Player->GetControllerId());
|
ExternalUIInterface->ShowFriendsUI(Player->GetControllerId());
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
}
|
}
|
@@ -165,19 +165,19 @@ UTexture2D * UAdvancedFriendsLibrary::GetSteamFriendAvatar(const FBPUniqueNetId
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedFriendsLibrary::SendSessionInviteToFriends(APlayerController *PlayerController, const TArray<FBPUniqueNetId> &Friends, TEnumAsByte<EBlueprintResultSwitch::Type> &Result)
|
void UAdvancedFriendsLibrary::SendSessionInviteToFriends(APlayerController *PlayerController, const TArray<FBPUniqueNetId> &Friends, EBlueprintResultSwitch &Result)
|
||||||
{
|
{
|
||||||
if (!PlayerController)
|
if (!PlayerController)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had a bad Player Controller!"));
|
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had a bad Player Controller!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Friends.Num() < 1)
|
if (Friends.Num() < 1)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had no friends in invitation array!"));
|
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had no friends in invitation array!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriends(APlayerController *Play
|
|||||||
if (!SessionInterface.IsValid())
|
if (!SessionInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Failed to get session interface!"));
|
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Failed to get session interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriends(APlayerController *Play
|
|||||||
if (!Player)
|
if (!Player)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend failed to get LocalPlayer!"));
|
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend failed to get LocalPlayer!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,27 +209,27 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriends(APlayerController *Play
|
|||||||
|
|
||||||
if (SessionInterface->SendSessionInviteToFriends(Player->GetControllerId(), GameSessionName, List))
|
if (SessionInterface->SendSessionInviteToFriends(Player->GetControllerId(), GameSessionName, List))
|
||||||
{
|
{
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedFriendsLibrary::SendSessionInviteToFriend(APlayerController *PlayerController, const FBPUniqueNetId &FriendUniqueNetId, TEnumAsByte<EBlueprintResultSwitch::Type> &Result)
|
void UAdvancedFriendsLibrary::SendSessionInviteToFriend(APlayerController *PlayerController, const FBPUniqueNetId &FriendUniqueNetId, EBlueprintResultSwitch &Result)
|
||||||
{
|
{
|
||||||
if (!PlayerController)
|
if (!PlayerController)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had a bad Player Controller!"));
|
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had a bad Player Controller!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FriendUniqueNetId.IsValid())
|
if (!FriendUniqueNetId.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had a bad UniqueNetId!"));
|
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Had a bad UniqueNetId!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriend(APlayerController *Playe
|
|||||||
if (!SessionInterface.IsValid())
|
if (!SessionInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Failed to get session interface!"));
|
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend Failed to get session interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,17 +247,17 @@ void UAdvancedFriendsLibrary::SendSessionInviteToFriend(APlayerController *Playe
|
|||||||
if (!Player)
|
if (!Player)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend failed to get LocalPlayer!"));
|
UE_LOG(AdvancedFriendsLog, Warning, TEXT("SendSessionInviteToFriend failed to get LocalPlayer!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SessionInterface->SendSessionInviteToFriend(Player->GetControllerId(), GameSessionName, *FriendUniqueNetId.GetUniqueNetId()))
|
if (SessionInterface->SendSessionInviteToFriend(Player->GetControllerId(), GameSessionName, *FriendUniqueNetId.GetUniqueNetId()))
|
||||||
{
|
{
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,12 +292,12 @@ void UAdvancedFriendsLibrary::GetFriend(APlayerController *PlayerController, con
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TSharedPtr<FOnlineFriend> fr = FriendsInterface->GetFriend(Player->GetControllerId(), *FriendUniqueNetId.GetUniqueNetId(), EFriendsLists::ToString(EFriendsLists::Type::Default));
|
TSharedPtr<FOnlineFriend> fr = FriendsInterface->GetFriend(Player->GetControllerId(), *FriendUniqueNetId.GetUniqueNetId(), EFriendsLists::ToString(EFriendsLists::Default));
|
||||||
if (fr.IsValid())
|
if (fr.IsValid())
|
||||||
{
|
{
|
||||||
FOnlineUserPresence pres = fr->GetPresence();
|
FOnlineUserPresence pres = fr->GetPresence();
|
||||||
Friend.DisplayName = fr->GetDisplayName();
|
Friend.DisplayName = fr->GetDisplayName();
|
||||||
Friend.OnlineState = ((EBPOnlinePresenceState::Type)((int32)pres.Status.State));
|
Friend.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||||
Friend.RealName = fr->GetRealName();
|
Friend.RealName = fr->GetRealName();
|
||||||
Friend.UniqueNetId.SetUniqueNetId(fr->GetUserId());
|
Friend.UniqueNetId.SetUniqueNetId(fr->GetUserId());
|
||||||
Friend.bIsPlayingSameGame = pres.bIsPlayingThisGame;
|
Friend.bIsPlayingSameGame = pres.bIsPlayingThisGame;
|
||||||
@@ -307,7 +307,7 @@ void UAdvancedFriendsLibrary::GetFriend(APlayerController *PlayerController, con
|
|||||||
Friend.PresenceInfo.bIsOnline = pres.bIsOnline;
|
Friend.PresenceInfo.bIsOnline = pres.bIsOnline;
|
||||||
Friend.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
Friend.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
||||||
Friend.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
Friend.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
||||||
Friend.PresenceInfo.PresenceState = ((EBPOnlinePresenceState::Type)((int32)pres.Status.State));
|
Friend.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||||
Friend.PresenceInfo.StatusString = pres.Status.StatusStr;
|
Friend.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -342,7 +342,7 @@ void UAdvancedFriendsLibrary::IsAFriend(APlayerController *PlayerController, con
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IsFriend = FriendsInterface->IsFriend(Player->GetControllerId(), *UniqueNetId.GetUniqueNetId(), EFriendsLists::ToString(EFriendsLists::Type::Default));
|
IsFriend = FriendsInterface->IsFriend(Player->GetControllerId(), *UniqueNetId.GetUniqueNetId(), EFriendsLists::ToString(EFriendsLists::Default));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedFriendsLibrary::GetStoredRecentPlayersList(FBPUniqueNetId UniqueNetId, TArray<FBPOnlineRecentPlayer> &PlayersList)
|
void UAdvancedFriendsLibrary::GetStoredRecentPlayersList(FBPUniqueNetId UniqueNetId, TArray<FBPOnlineRecentPlayer> &PlayersList)
|
||||||
@@ -404,7 +404,7 @@ void UAdvancedFriendsLibrary::GetStoredFriendsList(APlayerController *PlayerCont
|
|||||||
|
|
||||||
|
|
||||||
TArray< TSharedRef<FOnlineFriend> > FriendList;
|
TArray< TSharedRef<FOnlineFriend> > FriendList;
|
||||||
FriendsInterface->GetFriendsList(Player->GetControllerId(), EFriendsLists::ToString((EFriendsLists::Type::Default)), FriendList);
|
FriendsInterface->GetFriendsList(Player->GetControllerId(), EFriendsLists::ToString((EFriendsLists::Default)), FriendList);
|
||||||
|
|
||||||
for (int32 i = 0; i < FriendList.Num(); i++)
|
for (int32 i = 0; i < FriendList.Num(); i++)
|
||||||
{
|
{
|
||||||
@@ -412,7 +412,7 @@ void UAdvancedFriendsLibrary::GetStoredFriendsList(APlayerController *PlayerCont
|
|||||||
FBPFriendInfo BPF;
|
FBPFriendInfo BPF;
|
||||||
FOnlineUserPresence pres = Friend->GetPresence();
|
FOnlineUserPresence pres = Friend->GetPresence();
|
||||||
|
|
||||||
BPF.OnlineState = ((EBPOnlinePresenceState::Type)((int32)pres.Status.State));
|
BPF.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||||
BPF.DisplayName = Friend->GetDisplayName();
|
BPF.DisplayName = Friend->GetDisplayName();
|
||||||
BPF.RealName = Friend->GetRealName();
|
BPF.RealName = Friend->GetRealName();
|
||||||
BPF.UniqueNetId.SetUniqueNetId(Friend->GetUserId());
|
BPF.UniqueNetId.SetUniqueNetId(Friend->GetUserId());
|
||||||
@@ -421,7 +421,7 @@ void UAdvancedFriendsLibrary::GetStoredFriendsList(APlayerController *PlayerCont
|
|||||||
BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
|
BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
|
||||||
BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
|
BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
|
||||||
BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
||||||
BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState::Type)((int32)pres.Status.State));
|
BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||||
BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
|
BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||||
BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
|
BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
|
||||||
BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
||||||
|
@@ -60,7 +60,7 @@ void UAdvancedSessionsLibrary::GetExtraSettings(FBlueprintSessionResult SessionR
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedSessionsLibrary::GetSessionState(TEnumAsByte<EBPOnlineSessionState::Type> &SessionState)
|
void UAdvancedSessionsLibrary::GetSessionState(EBPOnlineSessionState &SessionState)
|
||||||
{
|
{
|
||||||
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();
|
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();
|
||||||
|
|
||||||
@@ -70,17 +70,17 @@ void UAdvancedSessionsLibrary::GetSessionState(TEnumAsByte<EBPOnlineSessionState
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SessionState = ((EBPOnlineSessionState::Type)SessionInterface->GetSessionState(GameSessionName));
|
SessionState = ((EBPOnlineSessionState)SessionInterface->GetSessionState(GameSessionName));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, TEnumAsByte<EBlueprintResultSwitch::Type> &Result)
|
void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &NumPrivateConnections, bool &bIsLAN, bool &bIsDedicated, bool &bAllowInvites, bool &bAllowJoinInProgress, bool &bIsAnticheatEnabled, int32 &BuildUniqueID, TArray<FSessionPropertyKeyPair> &ExtraSettings, EBlueprintResultSwitch &Result)
|
||||||
{
|
{
|
||||||
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();
|
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface();
|
||||||
|
|
||||||
if (!SessionInterface.IsValid())
|
if (!SessionInterface.IsValid())
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetSessionSettings couldn't get the session interface!"));
|
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetSessionSettings couldn't get the session interface!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &
|
|||||||
if (!settings)
|
if (!settings)
|
||||||
{
|
{
|
||||||
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetSessionSettings couldn't get the session settings!"));
|
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetSessionSettings couldn't get the session settings!"));
|
||||||
Result = EBlueprintResultSwitch::Type::OnFailure;
|
Result = EBlueprintResultSwitch::OnFailure;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ void UAdvancedSessionsLibrary::GetSessionSettings(int32 &NumConnections, int32 &
|
|||||||
ExtraSettings.Add(NewSetting);
|
ExtraSettings.Add(NewSetting);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result = EBlueprintResultSwitch::Type::OnSuccess;
|
Result = EBlueprintResultSwitch::OnSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedSessionsLibrary::IsPlayerInSession(const FBPUniqueNetId &PlayerToCheck, bool &bIsInSession)
|
void UAdvancedSessionsLibrary::IsPlayerInSession(const FBPUniqueNetId &PlayerToCheck, bool &bIsInSession)
|
||||||
@@ -127,7 +127,7 @@ void UAdvancedSessionsLibrary::IsPlayerInSession(const FBPUniqueNetId &PlayerToC
|
|||||||
bIsInSession = SessionInterface->IsPlayerInSession(GameSessionName, *PlayerToCheck.GetUniqueNetId());
|
bIsInSession = SessionInterface->IsPlayerInSession(GameSessionName, *PlayerToCheck.GetUniqueNetId());
|
||||||
}
|
}
|
||||||
|
|
||||||
FSessionsSearchSetting UAdvancedSessionsLibrary::MakeLiteralSessionSearchProperty(FSessionPropertyKeyPair SessionSearchProperty, EOnlineComparisonOpRedux::Type ComparisonOp)
|
FSessionsSearchSetting UAdvancedSessionsLibrary::MakeLiteralSessionSearchProperty(FSessionPropertyKeyPair SessionSearchProperty, EOnlineComparisonOpRedux ComparisonOp)
|
||||||
{
|
{
|
||||||
FSessionsSearchSetting setting;
|
FSessionsSearchSetting setting;
|
||||||
setting.PropertyKeyPair = SessionSearchProperty;
|
setting.PropertyKeyPair = SessionSearchProperty;
|
||||||
@@ -176,7 +176,7 @@ FSessionPropertyKeyPair UAdvancedSessionsLibrary::MakeLiteralSessionPropertyFloa
|
|||||||
return Prop;
|
return Prop;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedSessionsLibrary::GetSessionPropertyByte(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, uint8 &SettingValue)
|
void UAdvancedSessionsLibrary::GetSessionPropertyByte(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, uint8 &SettingValue)
|
||||||
{
|
{
|
||||||
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
||||||
{
|
{
|
||||||
@@ -187,21 +187,21 @@ void UAdvancedSessionsLibrary::GetSessionPropertyByte(const TArray<FSessionPrope
|
|||||||
int32 Val;
|
int32 Val;
|
||||||
itr.Data.GetValue(Val);
|
itr.Data.GetValue(Val);
|
||||||
SettingValue = (uint8)(Val);
|
SettingValue = (uint8)(Val);
|
||||||
SearchResult = ESessionSettingSearchResult::Type::Found;
|
SearchResult = ESessionSettingSearchResult::Found;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SearchResult = ESessionSettingSearchResult::Type::WrongType;
|
SearchResult = ESessionSettingSearchResult::WrongType;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResult = ESessionSettingSearchResult::Type::NotFound;
|
SearchResult = ESessionSettingSearchResult::NotFound;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedSessionsLibrary::GetSessionPropertyBool(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, bool &SettingValue)
|
void UAdvancedSessionsLibrary::GetSessionPropertyBool(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, bool &SettingValue)
|
||||||
{
|
{
|
||||||
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
||||||
{
|
{
|
||||||
@@ -210,21 +210,21 @@ void UAdvancedSessionsLibrary::GetSessionPropertyBool(const TArray<FSessionPrope
|
|||||||
if (itr.Data.GetType() == EOnlineKeyValuePairDataType::Bool)
|
if (itr.Data.GetType() == EOnlineKeyValuePairDataType::Bool)
|
||||||
{
|
{
|
||||||
itr.Data.GetValue(SettingValue);
|
itr.Data.GetValue(SettingValue);
|
||||||
SearchResult = ESessionSettingSearchResult::Type::Found;
|
SearchResult = ESessionSettingSearchResult::Found;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SearchResult = ESessionSettingSearchResult::Type::WrongType;
|
SearchResult = ESessionSettingSearchResult::WrongType;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResult = ESessionSettingSearchResult::Type::NotFound;
|
SearchResult = ESessionSettingSearchResult::NotFound;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedSessionsLibrary::GetSessionPropertyString(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, FString &SettingValue)
|
void UAdvancedSessionsLibrary::GetSessionPropertyString(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, FString &SettingValue)
|
||||||
{
|
{
|
||||||
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
||||||
{
|
{
|
||||||
@@ -233,21 +233,21 @@ void UAdvancedSessionsLibrary::GetSessionPropertyString(const TArray<FSessionPro
|
|||||||
if (itr.Data.GetType() == EOnlineKeyValuePairDataType::String)
|
if (itr.Data.GetType() == EOnlineKeyValuePairDataType::String)
|
||||||
{
|
{
|
||||||
itr.Data.GetValue(SettingValue);
|
itr.Data.GetValue(SettingValue);
|
||||||
SearchResult = ESessionSettingSearchResult::Type::Found;
|
SearchResult = ESessionSettingSearchResult::Found;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SearchResult = ESessionSettingSearchResult::Type::WrongType;
|
SearchResult = ESessionSettingSearchResult::WrongType;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResult = ESessionSettingSearchResult::Type::NotFound;
|
SearchResult = ESessionSettingSearchResult::NotFound;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedSessionsLibrary::GetSessionPropertyInt(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, int32 &SettingValue)
|
void UAdvancedSessionsLibrary::GetSessionPropertyInt(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, int32 &SettingValue)
|
||||||
{
|
{
|
||||||
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
||||||
{
|
{
|
||||||
@@ -256,21 +256,21 @@ void UAdvancedSessionsLibrary::GetSessionPropertyInt(const TArray<FSessionProper
|
|||||||
if (itr.Data.GetType() == EOnlineKeyValuePairDataType::Int32)
|
if (itr.Data.GetType() == EOnlineKeyValuePairDataType::Int32)
|
||||||
{
|
{
|
||||||
itr.Data.GetValue(SettingValue);
|
itr.Data.GetValue(SettingValue);
|
||||||
SearchResult = ESessionSettingSearchResult::Type::Found;
|
SearchResult = ESessionSettingSearchResult::Found;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SearchResult = ESessionSettingSearchResult::Type::WrongType;
|
SearchResult = ESessionSettingSearchResult::WrongType;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResult = ESessionSettingSearchResult::Type::NotFound;
|
SearchResult = ESessionSettingSearchResult::NotFound;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UAdvancedSessionsLibrary::GetSessionPropertyFloat(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, TEnumAsByte<ESessionSettingSearchResult::Type> &SearchResult, float &SettingValue)
|
void UAdvancedSessionsLibrary::GetSessionPropertyFloat(const TArray<FSessionPropertyKeyPair> & ExtraSettings, FName SettingName, ESessionSettingSearchResult &SearchResult, float &SettingValue)
|
||||||
{
|
{
|
||||||
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
for (FSessionPropertyKeyPair itr : ExtraSettings)
|
||||||
{
|
{
|
||||||
@@ -279,17 +279,17 @@ void UAdvancedSessionsLibrary::GetSessionPropertyFloat(const TArray<FSessionProp
|
|||||||
if (itr.Data.GetType() == EOnlineKeyValuePairDataType::Float)
|
if (itr.Data.GetType() == EOnlineKeyValuePairDataType::Float)
|
||||||
{
|
{
|
||||||
itr.Data.GetValue(SettingValue);
|
itr.Data.GetValue(SettingValue);
|
||||||
SearchResult = ESessionSettingSearchResult::Type::Found;
|
SearchResult = ESessionSettingSearchResult::Found;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SearchResult = ESessionSettingSearchResult::Type::WrongType;
|
SearchResult = ESessionSettingSearchResult::WrongType;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchResult = ESessionSettingSearchResult::Type::NotFound;
|
SearchResult = ESessionSettingSearchResult::NotFound;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ UFindSessionsCallbackProxyAdvanced::UFindSessionsCallbackProxyAdvanced(const FOb
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int MaxResults, bool bUseLAN, TEnumAsByte<EBPServerPresenceSearchType::Type> ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly, bool bNonEmptyServersOnly, bool bSecureServersOnly, int MinSlotsAvailable)
|
UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly, bool bNonEmptyServersOnly, bool bSecureServersOnly, int MinSlotsAvailable)
|
||||||
{
|
{
|
||||||
UFindSessionsCallbackProxyAdvanced* Proxy = NewObject<UFindSessionsCallbackProxyAdvanced>();
|
UFindSessionsCallbackProxyAdvanced* Proxy = NewObject<UFindSessionsCallbackProxyAdvanced>();
|
||||||
Proxy->PlayerControllerWeakPtr = PlayerController;
|
Proxy->PlayerControllerWeakPtr = PlayerController;
|
||||||
@@ -232,7 +232,7 @@ void UFindSessionsCallbackProxyAdvanced::FilterSessionResults(const TArray<FBlue
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool UFindSessionsCallbackProxyAdvanced::CompareVariants(const FVariantData &A, const FVariantData &B, EOnlineComparisonOpRedux::Type Comparator)
|
bool UFindSessionsCallbackProxyAdvanced::CompareVariants(const FVariantData &A, const FVariantData &B, EOnlineComparisonOpRedux Comparator)
|
||||||
{
|
{
|
||||||
if (A.GetType() != B.GetType())
|
if (A.GetType() != B.GetType())
|
||||||
return false;
|
return false;
|
||||||
|
@@ -36,7 +36,7 @@ void UGetFriendsCallbackProxy::Activate()
|
|||||||
{
|
{
|
||||||
ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
|
ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
|
||||||
|
|
||||||
Friends->ReadFriendsList(Player->GetControllerId(), EFriendsLists::ToString((EFriendsLists::Type::Default)), FriendListReadCompleteDelegate);
|
Friends->ReadFriendsList(Player->GetControllerId(), EFriendsLists::ToString((EFriendsLists::Default)), FriendListReadCompleteDelegate);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ void UGetFriendsCallbackProxy::OnReadFriendsListCompleted(int32 LocalUserNum, bo
|
|||||||
TSharedRef<FOnlineFriend> Friend = FriendList[i];
|
TSharedRef<FOnlineFriend> Friend = FriendList[i];
|
||||||
FBPFriendInfo BPF;
|
FBPFriendInfo BPF;
|
||||||
FOnlineUserPresence pres = Friend->GetPresence();
|
FOnlineUserPresence pres = Friend->GetPresence();
|
||||||
BPF.OnlineState = ((EBPOnlinePresenceState::Type)((int32)pres.Status.State));
|
BPF.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||||
BPF.DisplayName = Friend->GetDisplayName();
|
BPF.DisplayName = Friend->GetDisplayName();
|
||||||
BPF.RealName = Friend->GetRealName();
|
BPF.RealName = Friend->GetRealName();
|
||||||
BPF.UniqueNetId.SetUniqueNetId(Friend->GetUserId());
|
BPF.UniqueNetId.SetUniqueNetId(Friend->GetUserId());
|
||||||
@@ -73,7 +73,7 @@ void UGetFriendsCallbackProxy::OnReadFriendsListCompleted(int32 LocalUserNum, bo
|
|||||||
BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
|
BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
|
||||||
BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
|
BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
|
||||||
BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
||||||
BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState::Type)((int32)pres.Status.State));
|
BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||||
BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
|
BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||||
BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
|
BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
|
||||||
BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
||||||
|
@@ -52,7 +52,7 @@ void USendFriendInviteCallbackProxy::Activate()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Friends->SendInvite(Player->GetControllerId(), *cUniqueNetId.GetUniqueNetId(), EFriendsLists::ToString((EFriendsLists::Type::Default)), OnSendInviteCompleteDelegate);
|
Friends->SendInvite(Player->GetControllerId(), *cUniqueNetId.GetUniqueNetId(), EFriendsLists::ToString((EFriendsLists::Default)), OnSendInviteCompleteDelegate);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Fail immediately
|
// Fail immediately
|
||||||
|
Reference in New Issue
Block a user