예제 #1
0
        public static void BasicNoOperationMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            //MainForm.ActualMainForm.ActualizeAccountInformations();
            if (account.checkBoxBegin.Checked)
            {
                account.ActualizeFamis();
            }
            Thread.Sleep(GetRandomTime());

            if (account.LastPacketID.Count == 0)
            {
                return;
            }

            //switch ((uint)account.LastPacketID.Dequeue())
            switch ((uint)account.LastPacket)
            {
            case InteractiveUseRequestMessage.ID:
                if (account.Running != null && account.Running.OnSafe)
                {
                    account.Log(new CharacterTextInformation("Ouverture du coffre."), 2);

                    account.Running.Init();
                }
                return;

            case ExchangeObjectMoveMessage.ID:
                if (account.Running.OnLeaving)
                {
                    account.Running.OnLeaving = false;
                    account.Log(new ActionTextInformation("Dépôt d'un objet dans le coffre."), 3);
                    account.Running.Init();
                }
                else if (account.Running.OnGetting)
                {
                    account.Running.OnGetting = false;
                    account.Log(new ActionTextInformation("Récupération d'un objet du coffre."), 3);
                    account.Running.Init();
                }
                return;

            case ObjectFeedMessage.ID:
                if (account.Running != null && !account.Running.Feeding.SecondFeeding)
                {
                    account.Running.CheckStatisticsUp();
                }
                else if (account.Running != null)
                {
                    account.Running.CurrentPetIndex++;
                    account.Running.Init();
                }
                return;

            case LeaveDialogRequestMessage.ID:
                account.Log(new ActionTextInformation("Fermeture du coffre."), 3);
                if (account.Running != null)
                {
                    account.Running.Init();
                }
                return;

            //case GameMapMovementRequestMessage.ID:

            //    return;

            //case GameMapMovementConfirmMessage.ID:
            //    account.Fight.LaunchFight(account.Fight.flag);
            //    return;

            default:
                return;
            }
        }