Esempio n. 1
0
        public static void ObtainedItemMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            ObtainedItemMessage msg = (ObtainedItemMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.Gather.resourceName == "Unknown")
            {
                return;
            }
            account.SetStatus(Status.None);
            account.Log(new ActionTextInformation("Ressource récoltée : " + account.Gather.resourceName + " +" + msg.baseQuantity), 3);
            if (account.Gather.Stats.ContainsKey(account.Gather.resourceName))
            {
                account.Gather.Stats[account.Gather.resourceName] += msg.baseQuantity;
            }
            else
            {
                account.Gather.Stats.Add(account.Gather.resourceName, msg.baseQuantity);
            }
            account.Gather.Current_Job.ActualizeStats(account.Gather.Stats);
            if (account.PerformGather() == false && account.Path != null)
            {
                account.Path.PerformActionsStack();
            }
        }
Esempio n. 2
0
        public static void ObtainedItemMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            ObtainedItemMessage msg = (ObtainedItemMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.Gather.Current_El == null)
            {
                return;
            }
            account.Log(new ActionTextInformation("Ressource récoltée : " + account.Gather.resourceName + " +" + msg.BaseQuantity), 3);
            if (account.Gather.Stats.ContainsKey(account.Gather.resourceName))
            {
                account.Gather.Stats[account.Gather.resourceName] += (int)msg.BaseQuantity;
            }
            else
            {
                account.Gather.Stats.Add(account.Gather.resourceName, (int)msg.BaseQuantity);
            }
            account.Gather.Current_Job.ActualizeStats(account.Gather.Stats);
        }
Esempio n. 3
0
 private void HandleObtainedItemMessage(IAccount account, ObtainedItemMessage message)
 {
     Logger.Default.Log(
         $"Tu as reçu :{FastD2IReader.Instance.GetText(ObjectDataManager.Instance.Get<Item>(message.GenericId).NameId)} x {message.BaseQuantity}");
 }
Esempio n. 4
0
 private void ObtainedItemMessageHandler(DofusClient client, ObtainedItemMessage message)
 {
     client.Logger.Log(
         $"Tu as reçu : {FastD2IReader.Instance.GetText(ObjectDataManager.Instance.Get<Item>(message.GenericId).NameId)} x {message.BaseQuantity}");
 }