Пример #1
0
        private void Init(STUProgressionUnlocks progressionUnlocks)
        {
            if (progressionUnlocks == null)
            {
                return;
            }

            if (progressionUnlocks.m_lootBoxesUnlocks != null)
            {
                LootBoxesUnlocks = new LootBoxUnlocks[progressionUnlocks.m_lootBoxesUnlocks.Length];

                for (int i = 0; i < progressionUnlocks.m_lootBoxesUnlocks.Length; i++)
                {
                    STULootBoxUnlocks lootBoxUnlocks = progressionUnlocks.m_lootBoxesUnlocks[i];
                    LootBoxesUnlocks[i] = new LootBoxUnlocks(lootBoxUnlocks);
                }
            }

            if (progressionUnlocks.m_7846C401 != null)
            {
                LevelUnlocks = new LevelUnlocks[progressionUnlocks.m_7846C401.Length];
                for (int i = 0; i < LevelUnlocks.Length; i++)
                {
                    var levelUnlocks = progressionUnlocks.m_7846C401[i];
                    LevelUnlocks[i] = new LevelUnlocks(levelUnlocks);
                }
            }

            OtherUnlocks   = Unlock.GetArray(progressionUnlocks.m_otherUnlocks);
            UnknownUnlocks = Unlock.GetArray(progressionUnlocks.m_9135A4B2);
        }
Пример #2
0
        public Achievement(STUAchievement achievement)
        {
            Name        = GetString(achievement.m_name);
            Description = GetString(achievement.m_description);

            Trophy     = achievement.m_trophy;
            Category   = achievement.m_category;
            GamerScore = achievement.m_gamerScore;

            if (achievement.m_unlock != 0)
            {
                Reward = new Unlock(achievement.m_unlock);
            }
        }
Пример #3
0
        public void Init(STUAchievement achievement, ulong key = default)
        {
            GUID            = (teResourceGUID)key;
            Name            = GetString(achievement.m_name);
            AchievementName = achievement.m_4E291DCC.Value;
            Description     = GetString(achievement.m_description);

            //Trophy = achievement.m_trophy;
            //Category = achievement.m_category;
            GamerScore = achievement.m_gamerScore;

            if (achievement.m_unlock != 0)
            {
                Reward = new Unlock(achievement.m_unlock);
            }
        }
Пример #4
0
        /// <summary>
        /// Get an array of <see cref="Unlock"/> from an array of GUIDs
        /// </summary>
        /// <param name="guids">GUID collection</param>
        /// <returns>Array of <see cref="Unlock"/></returns>
        public static Unlock[] GetArray(IEnumerable <ulong> guids)
        {
            if (guids == null)
            {
                return(null);
            }
            List <Unlock> unlocks = new List <Unlock>();

            foreach (ulong guid in guids)
            {
                STUUnlock stu = GetInstance <STUUnlock>(guid);
                if (stu == null)
                {
                    continue;
                }
                Unlock unlock = new Unlock(stu, guid);
                unlocks.Add(unlock);
            }
            return(unlocks.ToArray());
        }
Пример #5
0
        public PlayerProgression(STUGenericSettings_PlayerProgression progression)
        {
            if (progression.m_lootBoxesUnlocks != null)
            {
                LootBoxesUnlocks = new LootBoxUnlocks[progression.m_lootBoxesUnlocks.Length];

                for (int i = 0; i < progression.m_lootBoxesUnlocks.Length; i++)
                {
                    STULootBoxUnlocks lootBoxUnlocks = progression.m_lootBoxesUnlocks[i];
                    LootBoxesUnlocks[i] = new LootBoxUnlocks(lootBoxUnlocks);
                }
            }

            if (progression.m_additionalUnlocks != null)
            {
                AdditionalUnlocks = new AdditionalUnlocks[progression.m_additionalUnlocks.Length];
                for (int i = 0; i < progression.m_additionalUnlocks.Length; i++)
                {
                    AdditionalUnlocks[i] = new AdditionalUnlocks(progression.m_additionalUnlocks[i]);
                }
            }

            OtherUnlocks = Unlock.GetArray(progression.m_otherUnlocks);
        }
Пример #6
0
 public LevelUnlocks(STU_1757E817 levelUnlocks)
 {
     Level   = levelUnlocks.m_level;
     Unlocks = Unlock.GetArray(levelUnlocks.m_unlocks);
 }
Пример #7
0
 public LootBoxUnlocks(STULootBoxUnlocks lootBoxUnlocks)
 {
     LootBoxType = lootBoxUnlocks.m_lootboxType;
     Unlocks     = Unlock.GetArray(lootBoxUnlocks.m_unlocks);
 }
Пример #8
0
 public AdditionalUnlocks(STUAdditionalUnlocks additionalUnlocks)
 {
     Level   = additionalUnlocks.m_level;
     Unlocks = Unlock.GetArray(additionalUnlocks.m_unlocks);
 }