mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-23 16:34:07 +00:00
fsdf
This commit is contained in:
@@ -61,15 +61,15 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedFriends|FriendsList")
|
||||
static void IsAFriend(APlayerController *PlayerController, const FBPUniqueNetId UniqueNetId, bool &IsFriend);
|
||||
|
||||
// Get a texture of a valid friends avatar, STEAM ONLY
|
||||
// Get a texture of a valid friends avatar, STEAM ONLY, Returns invalid texture if the subsystem hasn't loaded that size of avatar yet
|
||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI")
|
||||
static UTexture2D * GetSteamFriendAvatar(APlayerController *PlayerController, const FBPUniqueNetId UniqueNetId, SteamAvatarSize AvatarSize = SteamAvatarSize::SteamAvatar_Medium);
|
||||
|
||||
// Preloads the avatar and name of a steam friend, return whether it is already available or not, STEAM ONLY
|
||||
// Preloads the avatar and name of a steam friend, return whether it is already available or not, STEAM ONLY, Takes time to actually load everything after this is called.
|
||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI")
|
||||
static bool RequestSteamFriendInfo(APlayerController *PlayerController, const FBPUniqueNetId UniqueNetId);
|
||||
|
||||
// Gets the level of a friends steam account, STEAM ONLY
|
||||
// Gets the level of a friends steam account, STEAM ONLY, Returns -1 if the steam level is not known, might need RequestSteamFriendInfo called first.
|
||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI")
|
||||
static int32 GetFriendSteamLevel(APlayerController *PlayerController, const FBPUniqueNetId UniqueNetId);
|
||||
|
||||
|
@@ -111,6 +111,10 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|PlayerInfo|PlayerID")
|
||||
static void GetUniqueNetID(APlayerController *PlayerController, FBPUniqueNetId &UniqueNetId);
|
||||
|
||||
// Get the unique net id of a network player who is assigned the the given player state
|
||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|PlayerInfo|PlayerID")
|
||||
static void GetUniqueNetIDFromPlayerState(APlayerState *PlayerState, FBPUniqueNetId &UniqueNetId);
|
||||
|
||||
// Check if a UniqueNetId is a friend
|
||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|UniqueNetId")
|
||||
static void UniqueNetIdToString(const FBPUniqueNetId &UniqueNetId, FString &String);
|
||||
|
@@ -336,6 +336,22 @@ void UAdvancedSessionsLibrary::GetUniqueNetID(APlayerController *PlayerControlle
|
||||
}
|
||||
}
|
||||
|
||||
void UAdvancedSessionsLibrary::GetUniqueNetIDFromPlayerState(APlayerState *PlayerState, FBPUniqueNetId &UniqueNetId)
|
||||
{
|
||||
if (!PlayerState)
|
||||
{
|
||||
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetUniqueNetIdFromPlayerState received a bad PlayerState!"));
|
||||
return;
|
||||
}
|
||||
|
||||
UniqueNetId.SetUniqueNetId(PlayerState->UniqueId.GetUniqueNetId());
|
||||
if (!UniqueNetId.IsValid())
|
||||
{
|
||||
UE_LOG(AdvancedSessionsLog, Warning, TEXT("GetUniqueNetIdFromPlayerState couldn't get the player uniquenetid!"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void UAdvancedSessionsLibrary::SetPlayerName(APlayerController *PlayerController, FString PlayerName)
|
||||
{
|
||||
if (!PlayerController)
|
||||
|
Reference in New Issue
Block a user