Ejemplo n.º 1
0
        private void OnPersonaState(SteamFriends.PersonaStateCallback callback)
        {
            if (callback == null)
            {
                return;
            }

            SteamID       steamID       = callback.FriendID;
            SteamID       sourceSteamID = callback.SourceSteamID;
            string        steamNickname = callback.Name;
            EPersonaState personaState  = callback.State;
            EClanRank     clanRank      = (EClanRank)callback.ClanRank;
        }
Ejemplo n.º 2
0
        static void OnPersonaState(SteamFriends.PersonaStateCallback callback)
        {
            SteamID       friendID      = callback.FriendID;
            SteamID       sourceSteamID = callback.SourceSteamID.ConvertToUInt64();
            EClanRank     clanRank      = (EClanRank)callback.ClanRank;
            EPersonaState state         = callback.State;

            //ListFriends.UpdateName(friendId.ConvertToUInt64(), callback.Name); not yet
            //ListFriends.UpdateStatus(friendId.ConvertToUInt64(), state.ToString()); not yet

            if (friendID.ConvertToUInt64() == steamClient.SteamID)
            {
                if (sourceSteamID.IsClanAccount)
                {
                    switch (clanRank)
                    {
                    case EClanRank.Owner:
                        // case EClanRank.Officer:
                        //case EClanRank.Moderator:
                        if (!OfficerClanDictionary.ContainsKey(sourceSteamID))
                        {
                            OfficerClanDictionary.Add(sourceSteamID, friendID.ConvertToUInt64());
                        }
                        break;
                    }
                }

                //
                if (callback.GameID > 0)
                {
                    UserPlaying = true;
                }
                else
                {
                    UserPlaying = false;
                }
                if (steamFriends.GetPersonaState() != EPersonaState.Online) //detect when user goes afk
                {
                    //isAwayState = true;
                }
                else
                {
                    //isAwayState = false;
                }
            }
        }
Ejemplo n.º 3
0
		public void Deserialize( Stream stream )
		{
			BinaryReader br = new BinaryReader( stream );

			steamIdUser = br.ReadUInt64();
			steamIdGroup = br.ReadUInt64();
			ClanRelationship = (EClanRelationship)br.ReadInt32();
			ClanRank = (EClanRank)br.ReadInt32();
		}
Ejemplo n.º 4
0
		public MsgGSGetUserGroupStatusResponse()
		{
			steamIdUser = 0;
			steamIdGroup = 0;
			ClanRelationship = 0;
			ClanRank = 0;
		}