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

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }

            if (msg.CharId == account.CharacterBaseInformations.ObjectID)
            {
                account.FightData.FightStop();
            }
        }
Exemplo n.º 2
0
        public static void GameFightLeaveMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameFightLeaveMessage msg = (GameFightLeaveMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            /* TODO : HANDLE IT */

            if (msg.charId == account.CharacterBaseInformations.id)
            {
                account.FightData.FightStop();
            }
            //else
            //{
            //    BFighter fighter = account.Fight.GetFighter(msg.charId);
            //    if (fighter != null)
            //        account.Fight.Fighters.Remove(fighter);
            //}
        }
Exemplo n.º 3
0
        public static void GameFightLeaveMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameFightLeaveMessage msg = (GameFightLeaveMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (msg.charId == account.CharacterBaseInformations.id)
            {
                account.Fight.IsFightStarted = false;
                account.Fight.WaitForReady   = false;
            }
            else
            {
                BFighter fighter = account.Fight.GetFighter(msg.charId);
                if (fighter != null)
                {
                    account.Fight.Fighters.Remove(fighter);
                }
            }
        }