Added PersonaChange flags to PersonaStateChange_t callback for SteamFriends

This commit is contained in:
Jason Thompson 2021-09-30 17:52:55 -05:00
parent 41d2121974
commit fe58c4bbb7

View File

@ -27,7 +27,7 @@ internal override void InitializeInterface( bool server )
internal void InstallEvents() internal void InstallEvents()
{ {
Dispatch.Install<PersonaStateChange_t>( x => OnPersonaStateChange?.Invoke( new Friend( x.SteamID ) ) ); Dispatch.Install<PersonaStateChange_t>( x => OnPersonaStateChange?.Invoke( new Friend( x.SteamID ), (PersonaChange)x.ChangeFlags ) );
Dispatch.Install<GameRichPresenceJoinRequested_t>( x => OnGameRichPresenceJoinRequested?.Invoke( new Friend( x.SteamIDFriend), x.ConnectUTF8() ) ); Dispatch.Install<GameRichPresenceJoinRequested_t>( x => OnGameRichPresenceJoinRequested?.Invoke( new Friend( x.SteamIDFriend), x.ConnectUTF8() ) );
Dispatch.Install<GameConnectedFriendChatMsg_t>( OnFriendChatMessage ); Dispatch.Install<GameConnectedFriendChatMsg_t>( OnFriendChatMessage );
Dispatch.Install<GameConnectedClanChatMsg_t>( OnGameConnectedClanChatMessage ); Dispatch.Install<GameConnectedClanChatMsg_t>( OnGameConnectedClanChatMessage );
@ -52,7 +52,7 @@ internal void InstallEvents()
/// <summary> /// <summary>
/// called when a friends' status changes /// called when a friends' status changes
/// </summary> /// </summary>
public static event Action<Friend> OnPersonaStateChange; public static event Action<Friend, PersonaChange> OnPersonaStateChange;
/// <summary> /// <summary>