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

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            account.FightData.AddFighter(msg.informations);
        }
Esempio n. 2
0
        public static void GameFightShowFighterMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            GameFightShowFighterMessage msg = (GameFightShowFighterMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (account.Fight == null)
            {
                return;
            }
            if (msg.informations is GameFightMonsterInformations)
            {
                GameFightMonsterInformations infos = (GameFightMonsterInformations)msg.informations;
                account.Fight.Fighters.Add(new BFighter(msg.informations.contextualId, msg.informations.disposition.cellId, msg.informations.stats.actionPoints, msg.informations.stats, msg.informations.alive, msg.informations.stats.lifePoints, msg.informations.stats.maxLifePoints, msg.informations.stats.movementPoints, (uint)msg.informations.teamId, infos.creatureGenericId));
            }
            else
            {
                account.Fight.Fighters.Add(new BFighter(msg.informations.contextualId, msg.informations.disposition.cellId, msg.informations.stats.actionPoints, msg.informations.stats, msg.informations.alive, msg.informations.stats.lifePoints, msg.informations.stats.maxLifePoints, msg.informations.stats.movementPoints, (uint)msg.informations.teamId, 0));
            }
        }