Ejemplo n.º 1
0
        public override void Deserialize(IDataReader reader)
        {
            ObjectId = reader.ReadVarUhShort();
            var finishedObjectiveCount = reader.ReadUShort();

            FinishedObjective = new List <AchievementObjective>();
            for (var finishedObjectiveIndex = 0;
                 finishedObjectiveIndex < finishedObjectiveCount;
                 finishedObjectiveIndex++)
            {
                var objectToAdd = new AchievementObjective();
                objectToAdd.Deserialize(reader);
                FinishedObjective.Add(objectToAdd);
            }
            var startedObjectivesCount = reader.ReadUShort();

            StartedObjectives = new List <AchievementStartedObjective>();
            for (var startedObjectivesIndex = 0;
                 startedObjectivesIndex < startedObjectivesCount;
                 startedObjectivesIndex++)
            {
                var objectToAdd = new AchievementStartedObjective();
                objectToAdd.Deserialize(reader);
                StartedObjectives.Add(objectToAdd);
            }
        }
Ejemplo n.º 2
0
        public override void Serialize(IDataWriter writer)
        {
            writer.WriteShort(((short)(m_finishedObjective.Count)));
            int finishedObjectiveIndex;

            for (finishedObjectiveIndex = 0; (finishedObjectiveIndex < m_finishedObjective.Count); finishedObjectiveIndex = (finishedObjectiveIndex + 1))
            {
                AchievementObjective objectToSend = m_finishedObjective[finishedObjectiveIndex];
                objectToSend.Serialize(writer);
            }
            writer.WriteShort(((short)(m_startedObjectives.Count)));
            int startedObjectivesIndex;

            for (startedObjectivesIndex = 0; (startedObjectivesIndex < m_startedObjectives.Count); startedObjectivesIndex = (startedObjectivesIndex + 1))
            {
                AchievementStartedObjective objectToSend = m_startedObjectives[startedObjectivesIndex];
                objectToSend.Serialize(writer);
            }
            writer.WriteVarUhShort(m_ObjectId);
        }
Ejemplo n.º 3
0
        public override void Deserialize(IDataReader reader)
        {
            int finishedObjectiveCount = reader.ReadUShort();
            int finishedObjectiveIndex;

            m_finishedObjective = new System.Collections.Generic.List <AchievementObjective>();
            for (finishedObjectiveIndex = 0; (finishedObjectiveIndex < finishedObjectiveCount); finishedObjectiveIndex = (finishedObjectiveIndex + 1))
            {
                AchievementObjective objectToAdd = new AchievementObjective();
                objectToAdd.Deserialize(reader);
                m_finishedObjective.Add(objectToAdd);
            }
            int startedObjectivesCount = reader.ReadUShort();
            int startedObjectivesIndex;

            m_startedObjectives = new System.Collections.Generic.List <AchievementStartedObjective>();
            for (startedObjectivesIndex = 0; (startedObjectivesIndex < startedObjectivesCount); startedObjectivesIndex = (startedObjectivesIndex + 1))
            {
                AchievementStartedObjective objectToAdd = new AchievementStartedObjective();
                objectToAdd.Deserialize(reader);
                m_startedObjectives.Add(objectToAdd);
            }
            m_ObjectId = reader.ReadVarUhShort();
        }