Exemplo n.º 1
0
 public static void HandleInteractiveUseRequestMessage(Client client, InteractiveUseRequestMessage message)
 {
     ConsoleUtils.Write(ConsoleUtils.Type.DEBUG, message.elemId.ToString());
     client.Send(new InteractiveUsedMessage(client.Character.Id, message.elemId, message.skillId, 0));
     client.Send(new InteractiveUseEndedMessage(message.elemId, message.skillId));
     ParseInteractive(client, message.elemId);
 }
Exemplo n.º 2
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);
                }
            }
        }
Exemplo n.º 3
0
Arquivo: Map.cs Projeto: Mixi59/Cookie
        public void UseElement(int id, int skillId)
        {
            Thread.Sleep(200);
            var msg = new InteractiveUseRequestMessage((uint)id, (uint)skillId);

            _client.Send(msg);
            _client.Logger.Log($"Récole ressource id {id}", LogMessageType.Info);
        }
Exemplo n.º 4
0
 public void HandleInteractiveUseRequestMessage(Bot bot, InteractiveUseRequestMessage message)
 {
     if (PartyLeaderId == CharacterId)
     {
         foreach (FFight ffight in GetOtherFFights(true, true)) // All member of the party on the same map
         {
             //if (Character.Cell.Id != ffight.Character.Cell.Id)
             ffight.Bot.Character.MoveIfNeededThenAction(Character.Cell.Id, () => ffight.Bot.SendToServer(new InteractiveUseRequestMessage(message.elemId, message.skillInstanceUid), 2500 + 500 * ffight.Id), 500 * ffight.Id, 0);
             //ffight.Bot.SendToServer(new InteractiveUseRequestMessage(message.elemId, message.skillInstanceUid), 2500 + 500 * ffight.Id);
         }
     }
 }
Exemplo n.º 5
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);
         }
     }
 }
Exemplo n.º 6
0
 public void UseElement(int id, int skillId)
 {
     using (BigEndianWriter writer = new BigEndianWriter())
     {
         InteractiveUseRequestMessage msg = new InteractiveUseRequestMessage((uint)id, (uint)skillId);
         msg.Serialize(writer);
         writer.Content = m_Account.HumanCheck.hash_function(writer.Content);
         MessagePackaging pack = new MessagePackaging(writer);
         pack.Pack((int)msg.MessageID);
         m_Account.SocketManager.Send(pack.Writer.Content);
     }
     if (m_Account.DebugMode.Checked)
     {
         m_Account.Log(new DebugTextInformation("[SND] 5001 (InteractiveUseRequestMessage)"), 0);
     }
 }
Exemplo n.º 7
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);
     }
     if (m_Account.DebugMode.Checked)
     {
         m_Account.Log(new BotTextInformation("[SND] 5001 (InteractiveUseRequestMessage)"), 0);
     }
 }
Exemplo n.º 8
0
        public static void HandleInteractiveUseRequestMessage(GameClient client, InteractiveUseRequestMessage message)
        {
            client.Character.CurrentMap.Send(new InteractiveUsedMessage(client.Character.Id, message.elemId, message.skillId, 0));
            switch (message.skillId)
            {
            case 44:
                client.Character.SetSpawnMap(client.Character.Map.Id);
                break;

            case 114:
                IEnumerable <int> zaaps = from interactive in Common.Data.Interactive.Interactives
                                          from interactiveElement in interactive.Value
                                          where interactiveElement.enabledSkillIds.SequenceEqual(new short[] { 44, 114 })
                                          select interactive.Key;
                IEnumerable <short> zaapsSubAreaIds = from interactive in Common.Data.Interactive.Interactives
                                                      join map in Map.Maps on interactive.Key equals map.Id
                                                      select(short) map.SubAreaId;

                client.Send(new ZaapListMessage(0, zaaps.ToArray(), zaapsSubAreaIds.ToArray(), new short[zaaps.Count()], client.Character.GetSpawnMap));
                break;
            }
            client.Send(new InteractiveUseEndedMessage(message.elemId, message.skillId));
        }
Exemplo n.º 9
0
 public void InteractiveUseRequestMessageFrame(WorldClient client, InteractiveUseRequestMessage interactiveUseRequestMessage)
 {
     InteractiveManager.Instance.Dispatch(114, client);
 }
Exemplo n.º 10
0
 public static void HandleInteractiveUseRequestMessage(WorldClient client, InteractiveUseRequestMessage message)
 {
     client.Character.Map.UseInteractiveObject(client.Character, message.elemId, message.skillInstanceUid);
 }
 public static void HandleInteractiveUse(InteractiveUseRequestMessage message, WorldClient client)
 {
     client.Character.Map.Instance.UseInteractive(client.Character, message.elemId, message.skillInstanceUid);
 }
Exemplo n.º 12
0
 private void InteractiveUseRequestMessageHandler(DofusClient client, InteractiveUseRequestMessage message)
 {
     //
 }
Exemplo n.º 13
0
        public static void HandleInteractiveUse(InteractiveUseRequestMessage message, WorldClient client)
        {
            var interactive = InteractiveRecord.GetInteractive(message.elemId);

            InteractiveActionProvider.Handle(client, interactive);
        }