Example #1
0
 public override void Serialize(IDataWriter writer)
 {
     writer.WriteInt(this.duration);
     writer.WriteShort(this.ageBonus);
     writer.WriteShort(this.lootShareLimitMalus);
     writer.WriteShort((short)((int)this.results.Length));
     FightResultListEntry[] fightResultListEntryArray = this.results;
     for (int i = 0; i < (int)fightResultListEntryArray.Length; i++)
     {
         FightResultListEntry fightResultListEntry = fightResultListEntryArray[i];
         writer.WriteShort(fightResultListEntry.TypeId);
         fightResultListEntry.Serialize(writer);
     }
     writer.WriteShort((short)((int)this.namedPartyTeamsOutcomes.Length));
     NamedPartyTeamWithOutcome[] namedPartyTeamWithOutcomeArray = this.namedPartyTeamsOutcomes;
     for (int j = 0; j < (int)namedPartyTeamWithOutcomeArray.Length; j++)
     {
         namedPartyTeamWithOutcomeArray[j].Serialize(writer);
     }
 }
Example #2
0
        public override void Serialize(IDataWriter writer)
        {
            writer.WriteShort(((short)(m_results.Count)));
            int resultsIndex;

            for (resultsIndex = 0; (resultsIndex < m_results.Count); resultsIndex = (resultsIndex + 1))
            {
                FightResultListEntry objectToSend = m_results[resultsIndex];
                writer.WriteUShort(((ushort)(objectToSend.TypeID)));
                objectToSend.Serialize(writer);
            }
            writer.WriteShort(((short)(m_namedPartyTeamsOutcomes.Count)));
            int namedPartyTeamsOutcomesIndex;

            for (namedPartyTeamsOutcomesIndex = 0; (namedPartyTeamsOutcomesIndex < m_namedPartyTeamsOutcomes.Count); namedPartyTeamsOutcomesIndex = (namedPartyTeamsOutcomesIndex + 1))
            {
                NamedPartyTeamWithOutcome objectToSend = m_namedPartyTeamsOutcomes[namedPartyTeamsOutcomesIndex];
                objectToSend.Serialize(writer);
            }
            writer.WriteInt(m_duration);
            writer.WriteShort(m_ageBonus);
            writer.WriteShort(m_lootShareLimitMalus);
        }