mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-24 04:28:00 +03:00
friend.GetRichPresence
This commit is contained in:
parent
3752e75316
commit
4390724cbe
@ -71,6 +71,19 @@ namespace Facepunch.Steamworks
|
|||||||
|
|
||||||
internal Client Client { get; set; }
|
internal Client Client { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns null if the value doesn't exist
|
||||||
|
/// </summary>
|
||||||
|
public string GetRichPresence( string key )
|
||||||
|
{
|
||||||
|
var val = Client.native.friends.GetFriendRichPresence( Id, key );
|
||||||
|
if ( string.IsNullOrEmpty( val ) ) return null;
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update this friend, request the latest data from Steam's servers
|
||||||
|
/// </summary>
|
||||||
public void Refresh()
|
public void Refresh()
|
||||||
{
|
{
|
||||||
Name = Client.native.friends.GetFriendPersonaName( Id );
|
Name = Client.native.friends.GetFriendPersonaName( Id );
|
||||||
@ -95,6 +108,8 @@ namespace Facepunch.Steamworks
|
|||||||
ServerQueryPort = gameInfo.QueryPort;
|
ServerQueryPort = gameInfo.QueryPort;
|
||||||
ServerLobbyId = gameInfo.SteamIDLobby;
|
ServerLobbyId = gameInfo.SteamIDLobby;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Client.native.friends.RequestFriendRichPresence( Id );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user