当前位置: 首页>>代码示例>>C#>>正文


C# IPacketMsg类代码示例

本文整理汇总了C#中IPacketMsg的典型用法代码示例。如果您正苦于以下问题:C# IPacketMsg类的具体用法?C# IPacketMsg怎么用?C# IPacketMsg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPacketMsg类属于命名空间,在下文中一共展示了IPacketMsg类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleNumberOfPlayersResponse

        void HandleNumberOfPlayersResponse( IPacketMsg packetMsg )
        {
            var msg = new ClientMsg<MsgClientGetNumberOfCurrentPlayersResponse>( packetMsg );

            var callback = new NumberOfPlayersCallback( msg.Header.TargetJobID, msg.Body );
            Client.PostCallback( callback );
        }
开发者ID:Badca52,项目名称:SteamKit,代码行数:7,代码来源:SteamUserStats.cs

示例2: HandleClientRequestFreeLicenseResponse

        private static void HandleClientRequestFreeLicenseResponse(IPacketMsg packetMsg)
        {
            var resp = new ClientMsgProtobuf<CMsgClientRequestFreeLicenseResponse>(packetMsg);

            JobAction job;
            JobManager.TryRemoveJob(packetMsg.TargetJobID, out job);

            var packageIDs = resp.Body.granted_packageids;
            var appIDs = resp.Body.granted_appids;

            Log.WriteDebug("FreeLicense", "Received free license: {0} ({1} apps, {2} packages)", (EResult)resp.Body.eresult, appIDs.Count, packageIDs.Count);

            if (packageIDs.Count > 0)
            {
                Steam.Instance.Apps.PICSGetProductInfo(Enumerable.Empty<uint>(), packageIDs);

                if (packageIDs.Count > 5)
                {
                    IRC.Instance.SendMain("{0}{1}{2} new free licenses granted", Colors.OLIVE, packageIDs.Count, Colors.NORMAL);
                }
                else
                {
                    foreach (var package in packageIDs)
                    {
                        IRC.Instance.SendMain("New free license granted: {0}{1}{2} -{3} {4}", Colors.OLIVE, Steam.GetPackageName(package), Colors.NORMAL, Colors.DARKBLUE, SteamDB.GetPackageURL(package));
                    }
                }
            }

            if (appIDs.Count > 0)
            {
                Steam.Instance.Apps.PICSGetAccessTokens(appIDs, Enumerable.Empty<uint>());
            }
        }
开发者ID:RJacksonm1,项目名称:SteamDatabaseBackend,代码行数:34,代码来源:FreeLicense.cs

示例3: HandleMsg

		public override void HandleMsg(IPacketMsg packetMsg) {
			if (packetMsg == null) {
				ArchiLogger.LogNullError(nameof(packetMsg));
				return;
			}

			switch (packetMsg.MsgType) {
				case EMsg.ClientFSOfflineMessageNotification:
					HandleFSOfflineMessageNotification(packetMsg);
					break;
				case EMsg.ClientItemAnnouncements:
					HandleItemAnnouncements(packetMsg);
					break;
				case EMsg.ClientPlayingSessionState:
					HandlePlayingSessionState(packetMsg);
					break;
				case EMsg.ClientPurchaseResponse:
					HandlePurchaseResponse(packetMsg);
					break;
				case EMsg.ClientRedeemGuestPassResponse:
					HandleRedeemGuestPassResponse(packetMsg);
					break;
				case EMsg.ClientSharedLibraryLockStatus:
					HandleSharedLibraryLockStatus(packetMsg);
					break;
				case EMsg.ClientUserNotifications:
					HandleUserNotifications(packetMsg);
					break;
			}
		}
开发者ID:JustArchi,项目名称:ArchiSteamFarm,代码行数:30,代码来源:ArchiHandler.cs

示例4: HandleInitiateTradeResult

        void HandleInitiateTradeResult(IPacketMsg packetMsg)
        {
            var msg = new ClientMsgProtobuf<CMsgTrading_InitiateTradeResult>(packetMsg);

            var callback = new TradeRequestCallback();
            callback.Response = msg.Body.response;
            callback.TradeRequestId = msg.Body.trade_request_id;
            callback.Other = msg.Body.other_steamid;

            if (callback.Response == 0)
                callback.Status = ETradeStatus.Accepted;
            else if (callback.Response == 1)
                callback.Status = ETradeStatus.Rejected;
			else if (callback.Response == 6)
				callback.Status = ETradeStatus.Unknown;
            else if (callback.Response == 7)
                callback.Status = ETradeStatus.Cancelled;
            else if (callback.Response == 8)
                callback.Status = ETradeStatus.Unknown;
            else if (callback.Response == 11)
                callback.Status = ETradeStatus.InTrade;
            else if (callback.Response == 12)
                callback.Status = ETradeStatus.Unknown2;
            else if (callback.Response == 13)
                callback.Status = ETradeStatus.TimedOut;
            else
                throw new Exception("Unknown trade status: "+callback.Status);

            this.Client.PostCallback(callback);
        }
开发者ID:ampped101,项目名称:SteamBot,代码行数:30,代码来源:SteamTrading.cs

示例5: HandleFromGC

        void HandleFromGC( IPacketMsg packetMsg )
        {
            var msg = new ClientMsgProtobuf<CMsgGCClient>( packetMsg );

            var callback = new MessageCallback( msg.Body );
            this.Client.PostCallback( callback );
        }
开发者ID:Zaharkov,项目名称:SteamKit,代码行数:7,代码来源:SteamGameCoordinator.cs

示例6: HandleResponse

        void HandleResponse(IPacketMsg packetMsg)
        {
            var response = new ClientMsgProtobuf<CMsgClientPlayerNicknameList>(packetMsg);

            var nicknames = response.Body.nicknames;
            Client.PostCallback(new ClientPlayerNicknameListCallback(nicknames));
        }
开发者ID:The-Mad-Pirate,项目名称:Mist,代码行数:7,代码来源:PlayerNicknames.cs

示例7: HandleMsg

 public override void HandleMsg(IPacketMsg packetMsg)
 {
     if (packetMsg.MsgType == EMsg.ClientRequestFreeLicenseResponse)
     {
         HandleClientRequestFreeLicenseResponse(packetMsg);
     }
 }
开发者ID:RJacksonm1,项目名称:SteamDatabaseBackend,代码行数:7,代码来源:FreeLicense.cs

示例8: HandleWebAPINonce

        void HandleWebAPINonce(IPacketMsg packetMsg)
        {
            var nonceMsg = new ClientMsgProtobuf<CMsgClientRequestWebAPIAuthenticateUserNonceResponse>(packetMsg);

            var callback = new NonceCallback(nonceMsg.Body);
            Client.PostCallback(callback);
        }
开发者ID:ElPresidentePro,项目名称:CSGOShop-Steambot,代码行数:7,代码来源:ClientMsgHandler.cs

示例9: HandleClientUserNotifications

        private void HandleClientUserNotifications(IPacketMsg packetMsg)
        {
            var clientUserNotificationResponse = new ClientMsgProtobuf<CMsgClientUserNotifications>(packetMsg);

            CMsgClientUserNotifications result = clientUserNotificationResponse.Body;

            Client.PostCallback(new NotificationCallback(result));
        }
开发者ID:einsteinsci,项目名称:SteamBot,代码行数:8,代码来源:Notifications.cs

示例10: HandleClientCommentNotifications

        private void HandleClientCommentNotifications(IPacketMsg packetMsg)
        {
            var clientCommentNotifications = new ClientMsgProtobuf<CMsgClientCommentNotifications>(packetMsg);

            CMsgClientCommentNotifications result = clientCommentNotifications.Body;

            Client.PostCallback(new CommentNotificationCallback(result));
        }
开发者ID:einsteinsci,项目名称:SteamBot,代码行数:8,代码来源:Notifications.cs

示例11: HandleAccountDataResponse

        void HandleAccountDataResponse( IPacketMsg packetMsg )
        {
            var msg = new ClientMsgProtobuf<CMsgClientRequestAccountDataResponse>( packetMsg );

            var callback = new ResponseCallback( msg.TargetJobID, msg.Body );

            Client.PostCallback( callback );
        }
开发者ID:Markusyatina,项目名称:steam-irc-bot,代码行数:8,代码来源:SteamAccountHandler.cs

示例12: HandleSteamLevelsResponse

        void HandleSteamLevelsResponse( IPacketMsg msg )
        {
            var clientMsg = new ClientMsgProtobuf<CMsgClientFSGetFriendsSteamLevelsResponse>( msg );

            var callback = new SteamLevelsCallback( clientMsg.TargetJobID, clientMsg.Body );

            Client.PostCallback( callback );
        }
开发者ID:Markusyatina,项目名称:steam-irc-bot,代码行数:8,代码来源:SteamLevelHandler.cs

示例13: HandleUGCDetailsResponse

        void HandleUGCDetailsResponse( IPacketMsg packetMsg )
        {
            var infoResponse = new ClientMsgProtobuf<CMsgClientUFSGetUGCDetailsResponse>( packetMsg );

            var innerCallback = new UGCDetailsCallback( infoResponse.Body );
            var callback = new SteamClient.JobCallback<UGCDetailsCallback>( infoResponse.TargetJobID, innerCallback );
            this.Client.PostCallback( callback );
        }
开发者ID:JustHev,项目名称:SteamKit,代码行数:8,代码来源:SteamCloud.cs

示例14: HandleMsg

 /// <summary>
 /// Handles a client message. This should not be called directly.
 /// </summary>
 /// <param name="packetMsg">The packet message that contains the data.</param>
 public override void HandleMsg( IPacketMsg packetMsg )
 {
     switch ( packetMsg.MsgType )
     {
         case EMsg.ClientUFSGetUGCDetailsResponse:
             HandleUGCDetailsResponse( packetMsg );
             break;
     }
 }
开发者ID:KimimaroTsukimiya,项目名称:SteamBot-1,代码行数:13,代码来源:SteamCloud.cs

示例15: HandleMsg

 public override void HandleMsg( IPacketMsg packetMsg )
 {
     switch ( packetMsg.MsgType )
     {
         case EMsg.ClientRequestAccountDataResponse:
             HandleAccountDataResponse( packetMsg );
             break;
     }
 }
开发者ID:Netshroud,项目名称:steam-irc-bot,代码行数:9,代码来源:SteamAccountHandler.cs


注:本文中的IPacketMsg类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。