コード例 #1
0
        public override void Deserialize(IDataReader reader)
        {
            int resultsCount = reader.ReadUShort();
            int resultsIndex;

            m_results = new System.Collections.Generic.List <FightResultListEntry>();
            for (resultsIndex = 0; (resultsIndex < resultsCount); resultsIndex = (resultsIndex + 1))
            {
                FightResultListEntry objectToAdd = ProtocolManager.GetTypeInstance <FightResultListEntry>(reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                m_results.Add(objectToAdd);
            }
            int namedPartyTeamsOutcomesCount = reader.ReadUShort();
            int namedPartyTeamsOutcomesIndex;

            m_namedPartyTeamsOutcomes = new System.Collections.Generic.List <NamedPartyTeamWithOutcome>();
            for (namedPartyTeamsOutcomesIndex = 0; (namedPartyTeamsOutcomesIndex < namedPartyTeamsOutcomesCount); namedPartyTeamsOutcomesIndex = (namedPartyTeamsOutcomesIndex + 1))
            {
                NamedPartyTeamWithOutcome objectToAdd = new NamedPartyTeamWithOutcome();
                objectToAdd.Deserialize(reader);
                m_namedPartyTeamsOutcomes.Add(objectToAdd);
            }
            m_duration            = reader.ReadInt();
            m_ageBonus            = reader.ReadShort();
            m_lootShareLimitMalus = reader.ReadShort();
        }
コード例 #2
0
        public override void Deserialize(ICustomDataInput reader)
        {
            Duration            = reader.ReadInt();
            RewardRate          = reader.ReadVarShort();
            LootShareLimitMalus = reader.ReadShort();
            var countResults = reader.ReadShort();

            Results = new List <FightResultListEntry>();
            for (short i = 0; i < countResults; i++)
            {
                var resultstypeId         = reader.ReadShort();
                FightResultListEntry type = new FightResultListEntry();
                type.Deserialize(reader);
                Results.Add(type);
            }
            var countNamedPartyTeamsOutcomes = reader.ReadShort();

            NamedPartyTeamsOutcomes = new List <NamedPartyTeamWithOutcome>();
            for (short i = 0; i < countNamedPartyTeamsOutcomes; i++)
            {
                NamedPartyTeamWithOutcome type = new NamedPartyTeamWithOutcome();
                type.Deserialize(reader);
                NamedPartyTeamsOutcomes.Add(type);
            }
        }
コード例 #3
0
        public override void Deserialize(IDataReader reader)
        {
            this.duration = (uint)reader.ReadInt();
            if (this.duration < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.duration + ") on element of GameFightEndMessage.duration.");
            }
            this.rewardRate          = (int)reader.ReadVarShort();
            this.lootShareLimitMalus = (int)reader.ReadShort();
            uint num1 = (uint)reader.ReadUShort();

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

            for (int index = 0; (long)index < (long)num2; ++index)
            {
                NamedPartyTeamWithOutcome partyTeamWithOutcome = new NamedPartyTeamWithOutcome();
                partyTeamWithOutcome.Deserialize(reader);
                this.namedPartyTeamsOutcomes.Add(partyTeamWithOutcome);
            }
        }
コード例 #4
0
        public override void Deserialize(IDataReader reader)
        {
            Duration            = reader.ReadInt();
            RewardRate          = reader.ReadVarShort();
            LootShareLimitMalus = reader.ReadShort();
            var ResultsCount = reader.ReadShort();

            Results = new List <FightResultListEntry>();
            for (var i = 0; i < ResultsCount; i++)
            {
                FightResultListEntry objectToAdd = ProtocolTypeManager.GetInstance(reader.ReadUShort());
                objectToAdd.Deserialize(reader);
                Results.Add(objectToAdd);
            }
            var NamedPartyTeamsOutcomesCount = reader.ReadShort();

            NamedPartyTeamsOutcomes = new List <NamedPartyTeamWithOutcome>();
            for (var i = 0; i < NamedPartyTeamsOutcomesCount; i++)
            {
                var objectToAdd = new NamedPartyTeamWithOutcome();
                objectToAdd.Deserialize(reader);
                NamedPartyTeamsOutcomes.Add(objectToAdd);
            }
        }