Exemple #1
0
        public override void Deserialize(IDataReader reader)
        {
            var finishedAchievementsIdsCount = reader.ReadUShort();

            FinishedAchievementsIds = new List <ushort>();
            for (var finishedAchievementsIdsIndex = 0; finishedAchievementsIdsIndex < finishedAchievementsIdsCount; finishedAchievementsIdsIndex++)
            {
                FinishedAchievementsIds.Add(reader.ReadVarUhShort());
            }
            var rewardableAchievementsCount = reader.ReadUShort();

            RewardableAchievements = new List <AchievementRewardable>();
            for (var rewardableAchievementsIndex = 0; rewardableAchievementsIndex < rewardableAchievementsCount; rewardableAchievementsIndex++)
            {
                var objectToAdd = new AchievementRewardable();
                objectToAdd.Deserialize(reader);
                RewardableAchievements.Add(objectToAdd);
            }
        }
        public override void Deserialize(ICustomDataInput reader)
        {
            int finishedAchievementsIdsCount = reader.ReadUShort();
            int finishedAchievementsIdsIndex;

            m_finishedAchievementsIds = new System.Collections.Generic.List <ushort>();
            for (finishedAchievementsIdsIndex = 0; (finishedAchievementsIdsIndex < finishedAchievementsIdsCount); finishedAchievementsIdsIndex = (finishedAchievementsIdsIndex + 1))
            {
                m_finishedAchievementsIds.Add(reader.ReadVarUhShort());
            }
            int rewardableAchievementsCount = reader.ReadUShort();
            int rewardableAchievementsIndex;

            m_rewardableAchievements = new System.Collections.Generic.List <AchievementRewardable>();
            for (rewardableAchievementsIndex = 0; (rewardableAchievementsIndex < rewardableAchievementsCount); rewardableAchievementsIndex = (rewardableAchievementsIndex + 1))
            {
                AchievementRewardable objectToAdd = new AchievementRewardable();
                objectToAdd.Deserialize(reader);
                m_rewardableAchievements.Add(objectToAdd);
            }
        }