示例#1
0
        public void Init(AccountUC account)
        {
            int skillUID = 0;

            foreach (InteractiveElementSkill skill in account.Safe.enabledSkills)
            {
                if (skill.skillId == 104)
                {
                    skillUID = skill.skillInstanceUid;

                    break;
                }
            }

            InteractiveUseRequestMessage interactiveUseRequestMessage = new InteractiveUseRequestMessage(
                account.Safe.elementId,
                skillUID);

            using (BigEndianWriter writer = new BigEndianWriter())
            {
                interactiveUseRequestMessage.Serialize(writer);
                writer.Content = account.HumanCheck.hash_function(writer.Content);
                MessagePackaging messagePackaging = new MessagePackaging(writer);

                messagePackaging.Pack((int)interactiveUseRequestMessage.ProtocolID);

                account.SocketManager.Send(messagePackaging.Writer.Content);
                account.LastPacketID.Clear();
                if (account.DebugMode.Checked)
                    account.Log(new BlueSheep.Interface.Text.DebugTextInformation("[SND] 5001 (InteractiveUseRequestMessage)"), 0);
            }
        }
示例#2
0
 public void UseHouse()
 {
     using (BigEndianWriter writer = new BigEndianWriter())
     {
         InteractiveUseRequestMessage msg = new InteractiveUseRequestMessage(ElementIdd,SkillInstanceID);
         msg.Serialize(writer);
         writer.Content = account.HumanCheck.hash_function(writer.Content);
         MessagePackaging pack = new MessagePackaging(writer);
         pack.Pack((int)msg.ProtocolID);
         account.SocketManager.Send(pack.Writer.Content);
     }
 }
示例#3
0
 public void UseHouse()
 {
     using (BigEndianWriter writer = new BigEndianWriter())
     {
         InteractiveUseRequestMessage msg = new InteractiveUseRequestMessage(ElementIdd,SkillInstanceID);
         msg.Serialize(writer);
         writer.Content = account.HumanCheck.hash_function(writer.Content);
         MessagePackaging pack = new MessagePackaging(writer);
         pack.Pack((int)msg.ProtocolID);
         account.SocketManager.Send(pack.Writer.Content);
         if (account.DebugMode.Checked)
             account.Log(new DebugTextInformation("[SND] 5001 (InteractiveUseRequestMessage)"), 0);
     }
 }
示例#4
0
文件: Map.cs 项目: Sadikk/BlueSheep
 public void UseElement(int id, int skillId)
 {
     using (BigEndianWriter writer = new BigEndianWriter())
     {
         InteractiveUseRequestMessage msg = new InteractiveUseRequestMessage(id, skillId);
         msg.Serialize(writer);
         writer.Content = m_Account.HumanCheck.hash_function(writer.Content);
         MessagePackaging pack = new MessagePackaging(writer);
         pack.Pack((int)msg.ProtocolID);
         m_Account.SocketManager.Send(pack.Writer.Content);
     }
     if (m_Account.DebugMode.Checked)
         m_Account.Log(new DebugTextInformation("[SND] 5001 (InteractiveUseRequestMessage)"), 0);
 }
示例#5
0
 public void UseElement(int id, int skillId)
 {
     //if (AutoTimeout)
     //    m_Account.Game.Character.State.SetTimeout(StateEnum.Gathering, false, TimeoutMin, TimeoutMax);
     //m_Account.Network.SendToServer(new InteractiveUseRequestMessage(id, skillId));
     using (BigEndianWriter writer = new BigEndianWriter())
     {
         InteractiveUseRequestMessage msg = new InteractiveUseRequestMessage(id, skillId);
         msg.Serialize(writer);
         writer.Content = m_Account.HumanCheck.hash_function(writer.Content);
         MessagePackaging pack = new MessagePackaging(writer);
         pack.Pack((int)msg.ProtocolID);
         m_Account.SocketManager.Send(pack.Writer.Content);
     }
 }