Exemplo n.º 1
0
        public static void GameFightJoinMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameFightJoinMessage msg = (GameFightJoinMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.Fight != null)
            {
                account.Fight.Fighters.Clear();
                account.Fight.Options.Clear();
                account.Fight.TotalLaunchBySpell.Clear();
                account.Fight.LastTurnLaunchBySpell.Clear();
                account.Fight.TotalLaunchByCellBySpell.Clear();
                account.Fight.DurationByEffect.Clear();
                account.Fight.IsFightStarted = msg.isFightStarted;
                account.Fight.WaitForReady   = (!msg.isFightStarted && msg.canSayReady);
                if (account.IsLockingFight.Checked)
                {
                    account.Fight.PerformAutoTimeoutFight(1000);
                    account.Fight.LockFight();
                }
                account.Fight.followinggroup = null;
            }
            //if (account.Path != null)
            //{
            //    account.Path.Stop = true;
            //}
        }
Exemplo n.º 2
0
        public static void GameFightJoinMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameFightJoinMessage msg = (GameFightJoinMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.Fight != null)
            {
                account.FightData.Reset(msg.isFightStarted, msg.canSayReady);
                if (account.IsLockingFight.Checked && account.Fight != null)
                {
                    account.FightData.PerformAutoTimeoutFight(2000);
                    account.Fight.LockFight();
                }
            }
        }