Inheritance: global::ProtoBuf.IExtensible
Esempio n. 1
0
            internal ClanStateCallback( CMsgClientClanState msg )
            {
                ClanID = msg.steamid_clan;

                StatusFlags = ( EClientPersonaStateFlag )msg.m_unStatusFlags;
                AccountFlags = ( EAccountFlags )msg.clan_account_flags;

                if ( msg.name_info != null )
                {
                    ClanName = msg.name_info.clan_name;
                    AvatarHash = msg.name_info.sha_avatar;
                }

                if ( msg.user_counts != null )
                {
                    MemberTotalCount = msg.user_counts.members;
                    MemberOnlineCount = msg.user_counts.online;
                    MemberChattingCount = msg.user_counts.chatting;
                    MemberInGameCount = msg.user_counts.in_game;
                }

                var events = msg.events
                    .Select( e => new Event( e ) )
                    .ToList();
                Events = new ReadOnlyCollection<Event>( events );

                var announcements = msg.announcements
                    .Select( a => new Event( a ) )
                    .ToList();
                Announcements = new ReadOnlyCollection<Event>( announcements );
            }
Esempio n. 2
0
                internal Event( CMsgClientClanState.Event clanEvent )
                {
                    ID = clanEvent.gid;

                    EventTime = DateUtils.DateTimeFromUnixTime( clanEvent.event_time );
                    Headline = clanEvent.headline;
                    GameID = clanEvent.game_id;

                    JustPosted = clanEvent.just_posted;
                }