public override void Deserialize(IDataReader reader)
        {
            FightId = reader.ReadVarUhShort();
            var AttackersCount = reader.ReadShort();

            Attackers = new List <GameFightFighterLightInformations>();
            for (var i = 0; i < AttackersCount; i++)
            {
                GameFightFighterLightInformations objectToAdd = ProtocolTypeManager.GetInstance(reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                Attackers.Add(objectToAdd);
            }
            var DefendersCount = reader.ReadShort();

            Defenders = new List <GameFightFighterLightInformations>();
            for (var i = 0; i < DefendersCount; i++)
            {
                GameFightFighterLightInformations objectToAdd = ProtocolTypeManager.GetInstance(reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                Defenders.Add(objectToAdd);
            }
        }
Esempio n. 2
0
        public override void Deserialize(ICustomDataInput reader)
        {
            int attackersCount = reader.ReadUShort();
            int attackersIndex;

            m_attackers = new System.Collections.Generic.List <GameFightFighterLightInformations>();
            for (attackersIndex = 0; (attackersIndex < attackersCount); attackersIndex = (attackersIndex + 1))
            {
                GameFightFighterLightInformations objectToAdd = ProtocolTypeManager.GetInstance <GameFightFighterLightInformations>((short)reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                m_attackers.Add(objectToAdd);
            }
            int defendersCount = reader.ReadUShort();
            int defendersIndex;

            m_defenders = new System.Collections.Generic.List <GameFightFighterLightInformations>();
            for (defendersIndex = 0; (defendersIndex < defendersCount); defendersIndex = (defendersIndex + 1))
            {
                GameFightFighterLightInformations objectToAdd = ProtocolTypeManager.GetInstance <GameFightFighterLightInformations>((short)reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                m_defenders.Add(objectToAdd);
            }
            m_fightId = reader.ReadInt();
        }
        public override void Deserialize(ICustomDataInput reader)
        {
            FightId = reader.ReadVarShort();
            var countAttackers = reader.ReadShort();

            Attackers = new List <GameFightFighterLightInformations>();
            for (short i = 0; i < countAttackers; i++)
            {
                var attackerstypeId = reader.ReadShort();
                GameFightFighterLightInformations type = new GameFightFighterLightInformations();
                type.Deserialize(reader);
                Attackers.Add(type);
            }
            var countDefenders = reader.ReadShort();

            Defenders = new List <GameFightFighterLightInformations>();
            for (short i = 0; i < countDefenders; i++)
            {
                var defenderstypeId = reader.ReadShort();
                GameFightFighterLightInformations type = new GameFightFighterLightInformations();
                type.Deserialize(reader);
                Defenders.Add(type);
            }
        }
        public override void Deserialize(IDataReader reader)
        {
            this.fightId = (uint)reader.ReadVarUhShort();
            if (this.fightId < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.fightId + ") on element of MapRunningFightDetailsMessage.fightId.");
            }
            uint num1 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num1; ++index)
            {
                GameFightFighterLightInformations instance = ProtocolTypeManager.GetInstance <GameFightFighterLightInformations>((uint)reader.ReadUShort());
                instance.Deserialize(reader);
                this.attackers.Add(instance);
            }
            uint num2 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num2; ++index)
            {
                GameFightFighterLightInformations instance = ProtocolTypeManager.GetInstance <GameFightFighterLightInformations>((uint)reader.ReadUShort());
                instance.Deserialize(reader);
                this.defenders.Add(instance);
            }
        }