Exemplo n.º 1
0
        public DotaGCNewBloomHandler( GCManager manager )
            : base(manager)
        {
            Instance = this;

            new GCCallback<CMsgGCToClientNewBloomTimingUpdated>( (uint)EDOTAGCMsg.k_EMsgGCToClientNewBloomTimingUpdated, OnNewBloomUpdate, manager );
        }
Exemplo n.º 2
0
        public GCSessionHandler( GCManager manager )
            : base(manager)
        {
            new GCCallback<CMsgClientWelcome>( ( uint )EGCBaseClientMsg.k_EMsgGCClientWelcome, OnWelcome, manager );

            // these two callbacks exist to cover the gc message differences between dota and tf2
            // in TF2, it still uses k_EMsgGCClientGoodbye, whereas dota is using k_EMsgGCClientConnectionStatus
            // luckily the message format between the two messages is the same
            new GCCallback<CMsgConnectionStatus>( ( uint )EGCBaseClientMsg.k_EMsgGCClientConnectionStatus, OnConnectionStatus, manager );
            new GCCallback<CMsgConnectionStatus>( 4008 /* tf2's k_EMsgGCClientGoodbye */, OnConnectionStatus, manager );
        }
Exemplo n.º 3
0
        public GCClientNotificationHandler( GCManager manager )
            : base(manager)
        {
            new GCCallback<CMsgGCClientDisplayNotification>( ClientNotification, OnNotification, manager );

            tfEnglish = KeyValue.LoadAsText( Path.Combine( Application.StartupPath, "tf_english.txt" ) );

            if ( tfEnglish == null )
            {
                Log.WriteWarn( "GCClientNotificationHandler", "Unable to load tf_english.txt, localizations will be unavailable!" );
            }
        }
Exemplo n.º 4
0
        public void Init()
        {
            Client = new SteamClient();

            CallbackManager = new CallbackManager(Client);

            User            = Client.GetHandler <SteamUser>();
            Friends         = Client.GetHandler <SteamFriends>();
            Apps            = Client.GetHandler <SteamApps>();
            UserStats       = Client.GetHandler <SteamUserStats>();
            Cloud           = Client.GetHandler <SteamCloud>();
            Workshop        = Client.GetHandler <SteamWorkshop>();
            Unified         = Client.GetHandler <SteamUnifiedMessages>();
            MasterServer    = Client.GetHandler <SteamMasterServer>();
            GameCoordinator = Client.GetHandler <SteamGameCoordinator>();
            Levels          = new SteamLevels();
            Games           = new SteamGames();
            AppInfo         = new SteamAppInfo();
            Account         = new SteamAccount();

            PublishedFiles = Unified.CreateService <IPublishedFile>();

            Client.AddHandler(Levels);
            Client.AddHandler(Games);
            Client.AddHandler(AppInfo);
            Client.AddHandler(Account);

            SteamManager = new SteamManager(CallbackManager);
            GCManager    = new GCManager(CallbackManager);

            JobManager = new JobManager(CallbackManager);

            CallbackManager.Subscribe <SteamClient.ConnectedCallback>(OnConnected);
            CallbackManager.Subscribe <SteamClient.DisconnectedCallback>(OnDisconnected);

            CallbackManager.Subscribe <SteamUser.LoggedOnCallback>(OnLoggedOn);
            CallbackManager.Subscribe <SteamUser.LoggedOffCallback>(OnLoggedOff);

            CallbackManager.Subscribe <SteamUser.AccountInfoCallback>(OnAccountInfo);
        }
Exemplo n.º 5
0
 public GCSystemMsgHandler( GCManager manager )
     : base(manager)
 {
     new GCCallback<CMsgSystemBroadcast>( ( uint )EGCBaseMsg.k_EMsgGCSystemMessage, OnSystemMessage, manager );
 }
Exemplo n.º 6
0
 public GCHandler( GCManager manager )
 {
 }
Exemplo n.º 7
0
        public void Init()
        {
            Client = new SteamClient();

            CallbackManager = new CallbackManager( Client );

            User = Client.GetHandler<SteamUser>();
            Friends = Client.GetHandler<SteamFriends>();
            Apps = Client.GetHandler<SteamApps>();
            UserStats = Client.GetHandler<SteamUserStats>();
            Cloud = Client.GetHandler<SteamCloud>();
            Workshop = Client.GetHandler<SteamWorkshop>();
            Unified = Client.GetHandler<SteamUnifiedMessages>();
            MasterServer = Client.GetHandler<SteamMasterServer>();
            Levels = new SteamLevels();
            Games = new SteamGames();
            AppInfo = new SteamAppInfo();
            Account = new SteamAccount();

            PublishedFiles = Unified.CreateService<IPublishedFile>();

            Client.AddHandler( Levels );
            Client.AddHandler( Games );
            Client.AddHandler( AppInfo );
            Client.AddHandler( Account );

            TaskManager = new TaskManager( CallbackManager );

            GCManager = new GCManager( CallbackManager );
            SteamManager = new SteamManager( CallbackManager );

            JobManager = new JobManager( CallbackManager );

            new Callback<SteamClient.ConnectedCallback>( OnConnected, CallbackManager );
            new Callback<SteamClient.DisconnectedCallback>( OnDisconnected, CallbackManager );

            new Callback<SteamUser.LoggedOnCallback>( OnLoggedOn, CallbackManager );
            new Callback<SteamUser.LoggedOffCallback>( OnLoggedOff, CallbackManager );

            new Callback<SteamUser.AccountInfoCallback>( OnAccountInfo, CallbackManager );
        }
Exemplo n.º 8
0
 public GCHandler(GCManager manager)
 {
     this.Manager = manager;
 }
Exemplo n.º 9
0
 public GCClientItemBroadcastNotificationHandler(GCManager manager)
     : base(manager)
 {
     new GCCallback <CMsgGCTFSpecificItemBroadcast>(ItemBroadcastNotification, OnNotification, manager);
 }
Exemplo n.º 10
0
 public GCSystemMsgHandler(GCManager manager)
     : base(manager)
 {
     new GCCallback <CMsgSystemBroadcast>((uint)EGCBaseMsg.k_EMsgGCSystemMessage, OnSystemMessage, manager);
 }
Exemplo n.º 11
0
 public GCHandler( GCManager manager )
 {
     this.Manager = manager;
 }
Exemplo n.º 12
0
 public GCClientItemBroadcastNotificationHandler( GCManager manager )
     : base(manager)
 {
     new GCCallback<CMsgGCTFSpecificItemBroadcast>( ItemBroadcastNotification, OnNotification, manager );
 }
Exemplo n.º 13
0
 public GCWrenchHandler( GCManager manager )
     : base(manager)
 {
     new GCCallback<CMsgTFGoldenWrenchBroadcast>( ( uint )EGCItemMsg.k_EMsgGCGoldenWrenchBroadcast, OnWrenchBroadcast, manager );
 }
Exemplo n.º 14
0
 public GCSaxxyHandler( GCManager manager )
     : base(manager)
 {
     new GCCallback<CMsgTFSaxxyBroadcast>( ( uint )EGCItemMsg.k_EMsgGCSaxxyBroadcast, OnSaxxyBroadcast, manager );
 }
Exemplo n.º 15
0
        public DotaGCTopGamesHandler( GCManager manager )
            : base(manager)
        {
            Instance = this;

            new GCCallback<CMsgGCTopCustomGamesList>( (uint)EDOTAGCMsg.k_EMsgGCTopCustomGamesList, OnTopCustomGames, manager );

            ugcHandler = Steam.Instance.SteamManager.GetHandler<UGCHandler>();
        }
Exemplo n.º 16
0
 public GCSchemaHandler( GCManager manager )
     : base(manager)
 {
     new GCCallback<CMsgUpdateItemSchema>( ( uint )EGCItemMsg.k_EMsgGCUpdateItemSchema, OnItemSchema, manager );
 }
Exemplo n.º 17
0
 public GCSaxxyHandler(GCManager manager)
     : base(manager)
 {
     new GCCallback <CMsgTFSaxxyBroadcast>(( uint )EGCItemMsg.k_EMsgGCSaxxyBroadcast, OnSaxxyBroadcast, manager);
 }
Exemplo n.º 18
0
 public GCWrenchHandler(GCManager manager)
     : base(manager)
 {
     new GCCallback <CMsgTFGoldenWrenchBroadcast>(( uint )EGCItemMsg.k_EMsgGCGoldenWrenchBroadcast, OnWrenchBroadcast, manager);
 }
Exemplo n.º 19
0
 public GCSchemaHandler(GCManager manager)
     : base(manager)
 {
     new GCCallback <CMsgUpdateItemSchema>((uint)EGCItemMsg.k_EMsgGCUpdateItemSchema, OnItemSchema, manager);
 }
Exemplo n.º 20
0
        public GCSessionHandler( GCManager manager )
            : base(manager)
        {
            new GCCallback<CMsgClientWelcome>( (uint)EGCBaseClientMsg.k_EMsgGCClientWelcome, OnClientWelcome, manager );
            new GCCallback<CMsgServerWelcome>( (uint)EGCBaseClientMsg.k_EMsgGCServerWelcome, OnServerWelcome, manager );

            // these two callbacks exist to cover the gc message differences between dota and tf2
            // in TF2, it still uses k_EMsgGCClientGoodbye, whereas dota is using k_EMsgGCClientConnectionStatus
            // luckily the message format between the two messages is the same
            new GCCallback<CMsgConnectionStatus>( ( uint )EGCBaseClientMsg.k_EMsgGCClientConnectionStatus, OnConnectionStatus, manager );
            new GCCallback<CMsgConnectionStatus>( 4008 /* tf2's k_EMsgGCClientGoodbye */, OnConnectionStatus, manager );

            sessTimer.Interval = TimeSpan.FromSeconds( 30 ).TotalMilliseconds;
            sessTimer.Elapsed += SessionTick;

            sessTimer.Start();
        }