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


C# AccountUC.Wait方法代码示例

本文整理汇总了C#中BlueSheep.Interface.AccountUC.Wait方法的典型用法代码示例。如果您正苦于以下问题:C# AccountUC.Wait方法的具体用法?C# AccountUC.Wait怎么用?C# AccountUC.Wait使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BlueSheep.Interface.AccountUC的用法示例。


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

示例1: SelectedServerDataExtendedMessageTreatment

 public static void SelectedServerDataExtendedMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
 {
     SelectedServerDataExtendedMessage msg = (SelectedServerDataExtendedMessage)message;
     using (BigEndianReader reader = new BigEndianReader(packetDatas))
     {
         msg.Deserialize(reader);
     }
     //account.Log(new BotTextInformation(selectedServerDataExtendedMessage.address + " " + (int)selectedServerDataExtendedMessage.port));
     account.Ticket = msg.ticket;
     account.HumanCheck = new HumanCheck(account);
     account.SocketManager.IsChangingServer = true;
     if (!account.IsMITM)
     {
         account.Log(new ConnectionTextInformation("Connexion au serveur " + BlueSheep.Common.Data.I18N.GetText((int)GameData.GetDataObject(D2oFileEnum.Servers, msg.serverId).Fields["nameId"])), 0);
         account.SocketManager.Connect(new ConnectionInformations(msg.address, (int)msg.port, "de jeu"));
         account.loginstate = "de jeu";
     }
     else
     {
         SelectedServerDataExtendedMessage nmsg = new SelectedServerDataExtendedMessage(
         msg.ssl, msg.canCreateNewCharacter, msg.serverId, "127.0.0.1", msg.port, msg.ticket, msg.serverIds);
         using (BigEndianWriter writer = new BigEndianWriter())
         {
             nmsg.Serialize(writer);
             MessagePackaging pack = new MessagePackaging(writer);
             pack.Pack((int)nmsg.ProtocolID);
             account.SocketManager.SendToDofusClient(pack.Writer.Content);
             //account.SocketManager.DisconnectFromDofusClient();
             account.SocketManager.DisconnectServer("42 packet handling.");
             account.SocketManager.ListenDofus();
             account.Wait(100, 200);
         }
         account.Log(new ConnectionTextInformation("Connexion au serveur " + BlueSheep.Common.Data.I18N.GetText((int)GameData.GetDataObject(D2oFileEnum.Servers, msg.serverId).Fields["nameId"])), 0);
         account.SocketManager.Connect(new ConnectionInformations(msg.address, (int)msg.port, "de jeu"));
         account.loginstate = "de jeu";
     }
 }
开发者ID:Sadikk,项目名称:BlueSheep,代码行数:37,代码来源:ConnectionHandler.cs

示例2: PopupWarningMessageTreatment

        public static void PopupWarningMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            PopupWarningMessage msg = (PopupWarningMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            account.Log(new ErrorTextInformation("[FROM " + msg.author + " ] : " + msg.content),0);
            account.Log(new BotTextInformation("You has been locked for " + msg.lockDuration + ". Stopping BlueSheep actions while blocked..."),0);
            account.Log(new ErrorTextInformation("Y a un popup sur l'écran, surement un modo :s"), 0);
             account.Wait(msg.lockDuration, msg.lockDuration);
            //account.SocketManager.Disconnect("Alerte au modo ! Alerte au modo !");
        }
开发者ID:Sadikk,项目名称:BlueSheep,代码行数:14,代码来源:ContextHandler.cs

示例3: PartyMemberInFightMessageTreatment

        public static void PartyMemberInFightMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            PartyMemberInFightMessage msg = (PartyMemberInFightMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (msg.fightMap.mapId == account.Map.Id && msg.memberName == account.MyGroup.GetMaster().CharacterBaseInformations.name)
            {
                account.Wait(500, 1500);
                using (BigEndianWriter writer = new BigEndianWriter())
                {
                    GameFightJoinRequestMessage msg2 = new GameFightJoinRequestMessage(msg.memberId, msg.fightId);
                    account.SocketManager.Send(msg2);
                }
            }
        }
开发者ID:DjTrilogic,项目名称:BlueSheep,代码行数:18,代码来源:ContextHandler.cs

示例4: ExchangeStartedWithPodsMessageTreatment

        public static void ExchangeStartedWithPodsMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            ExchangeStartedWithPodsMessage msg = (ExchangeStartedWithPodsMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.GestItemsUC.ListenerBox.Checked)
                return;
            List<int> items = account.GestItemsUC.GetItemsToTransfer();
            account.Inventory.TransferItems(items);
            account.Wait(2000, 3000);
            account.Inventory.ExchangeReady();
        }
开发者ID:Sadikk,项目名称:BlueSheep,代码行数:15,代码来源:ContextHandler.cs


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