Beispiel #1
0
 public bool IsInGame()
 {
     try
     {
         FriendGameInfo_t gameInfo = new FriendGameInfo_t();
         return SteamContext.ClientFriends.GetFriendGamePlayed( this.SteamID, ref gameInfo );
     }
     catch
     {
         return false;
     }
 }
Beispiel #2
0
        private void UpdateSkypeMood( PersonaStateChange_t param )
        {
            FriendGameInfo_t gameInfo = new FriendGameInfo_t();

            if ( !SteamContext.SteamFriends.GetFriendGamePlayed( param.m_ulSteamID, ref gameInfo ) )
            {
                // this happens when we stop playing a game
                SetSkypeMood( "Stopped playing" );
                return;
            }

            CGameID gameId = gameInfo.m_gameID;

            if ( gameId.AppType != CGameID.EGameID.k_EGameIDTypeApp )
            {
                Log( "Info: Detected game launch, but wasn't steam game. Only official steam apps are supported!" );
                return;
            }

            StringBuilder sb = new StringBuilder( 256 );
            int len = SteamContext.SteamApps.GetAppData( gameId.AppID, "name", sb );

            string name = sb.ToString();

            if ( string.IsNullOrWhiteSpace( name ) || len == 0 )
            {
                Log( "Info: Detect game launch, but wasn't able to get the name! AppID: {0}, GameID: {1}", gameId.AppID, gameId.ConvertToUint64() );
                Log( "Will try to pick up a delayed game update!" );

                delayAppId = gameId.AppID;
                return;
            }

            SetSkypeMood( "Now Playing: {0}", name );
            Log( "Now playing: {0}", name );
        }
Beispiel #3
0
 public bool GetFriendGamePlayed(CSteamID steamIDFriend, ref FriendGameInfo_t pFriendGameInfo)
 {
     return(this.GetFunction <NativeGetFriendGamePlayedCF>(this.Functions.GetFriendGamePlayed8)(this.ObjectAddress, steamIDFriend.ConvertToUint64(), ref pFriendGameInfo));
 }