예제 #1
0
파일: LootBox.cs 프로젝트: ipud2/OWLib
        private void Init(STULootBox lootBox)
        {
            Name        = GetName(lootBox.m_lootboxType);
            LootBoxType = lootBox.m_lootboxType;

            HidePucks = lootBox.m_hidePucks == 1;

            if (lootBox.m_shopCards != null)
            {
                ShopCards = new LootBoxShopCard[lootBox.m_shopCards.Length];
                for (int i = 0; i < lootBox.m_shopCards.Length; i++)
                {
                    ShopCards[i] = new LootBoxShopCard(lootBox.m_shopCards[i]);
                }
            }
        }
예제 #2
0
        public void SpecialHelper(ICLIFlags toolFlags)
        {
            var guids = ExtractDebugNewEntities.GetGUIDs(@"D:\ow\resources\verdata\52926.guids");

            const Enum_BABC4175 lootboxType = Enum_BABC4175.Winter;

            HashSet <ulong> addedUnlocks = new HashSet <ulong>();

            foreach (var progressionGuid in TrackedFiles[0x58])
            {
                STUProgressionUnlocks progressionUnlocks = GetInstance <STUProgressionUnlocks>(progressionGuid);

                if (progressionUnlocks?.m_lootBoxesUnlocks == null)
                {
                    continue;
                }
                foreach (STULootBoxUnlocks lootBoxUnlocks in progressionUnlocks.m_lootBoxesUnlocks)
                {
                    ProcessLootBoxUnlocks(lootBoxUnlocks, guids, lootboxType, addedUnlocks);
                }
            }

            foreach (ulong genericSettingsGuid in TrackedFiles[0x54])
            {
                STUGenericSettings_PlayerProgression playerProgression =
                    GetInstance <STUGenericSettings_PlayerProgression>(genericSettingsGuid);
                if (playerProgression == null)
                {
                    continue;
                }

                foreach (STULootBoxUnlocks lootBoxUnlocks in playerProgression.m_lootBoxesUnlocks)
                {
                    ProcessLootBoxUnlocks(lootBoxUnlocks, guids, lootboxType, addedUnlocks);
                }

                break;
            }

            Console.Out.WriteLine("new ulong[] {");
            foreach (ulong addedUnlock in addedUnlocks)
            {
                Console.Out.WriteLine($"    0x{addedUnlock:X16},");
            }

            Console.Out.WriteLine("};");
        }
예제 #3
0
        public void SpecialHelper(ICLIFlags toolFlags)
        {
            ExtractDebugNewEntities.VersionInfo versionInfo = ExtractDebugNewEntities.GetGUIDVersionInfo(@"D:\ow\resources\verdata\49154.guids");

            const Enum_BABC4175 lootboxType = Enum_BABC4175.SummerGames;

            HashSet <ulong> addedUnlocks = new HashSet <ulong>();

            foreach (var progressionGuid in TrackedFiles[0x58])
            {
                STUProgressionUnlocks progressionUnlocks = GetInstance <STUProgressionUnlocks>(progressionGuid);

                if (progressionUnlocks?.m_lootBoxesUnlocks == null)
                {
                    continue;
                }
                foreach (STULootBoxUnlocks lootBoxUnlocks in progressionUnlocks.m_lootBoxesUnlocks)
                {
                    ProcessLootBoxUnlocks(lootBoxUnlocks, versionInfo, lootboxType, addedUnlocks);
                }
            }

            foreach (ulong genericSettingsGuid in TrackedFiles[0x54])
            {
                STUGenericSettings_PlayerProgression playerProgression =
                    GetInstance <STUGenericSettings_PlayerProgression>(genericSettingsGuid);
                if (playerProgression == null)
                {
                    continue;
                }

                foreach (STULootBoxUnlocks lootBoxUnlocks in playerProgression.m_lootBoxesUnlocks)
                {
                    ProcessLootBoxUnlocks(lootBoxUnlocks, versionInfo, lootboxType, addedUnlocks);
                }

                break;
            }

            Console.Out.WriteLine("public static readonly ulong[] SummerGames2018 = new ulong[] {");
            foreach (ulong addedUnlock in addedUnlocks)
            {
                Console.Out.WriteLine($"    0x{addedUnlock:X8},");
            }
            Console.Out.WriteLine("};");
        }
예제 #4
0
        public static void ProcessLootBoxUnlocks(STULootBoxUnlocks lootBoxUnlocks, HashSet <ulong> guids, Enum_BABC4175 lootboxType, HashSet <ulong> addedUnlocks)
        {
            if (lootBoxUnlocks?.m_unlocks?.m_unlocks == null)
            {
                return;
            }
            if (lootBoxUnlocks.m_lootboxType != lootboxType)
            {
                return;
            }
            foreach (teStructuredDataAssetRef <ulong> unlock in lootBoxUnlocks.m_unlocks.m_unlocks)
            {
                //Unlock unlockModel = new Unlock(unlock);
                //if (unlockModel.Type != "Skin") continue;

                if (!guids.Contains(unlock))
                {
                    addedUnlocks.Add(unlock);
                }
            }
        }
예제 #5
0
 public LootBoxUnlocks(STULootBoxUnlocks lootBoxUnlocks)
 {
     LootBoxType = lootBoxUnlocks.m_lootboxType;
     Unlocks     = Unlock.GetArray(lootBoxUnlocks.m_unlocks);
 }
예제 #6
0
 public static string GetBasicName(Enum_BABC4175 lootBoxType)
 {
     return(GetBasicName((uint)lootBoxType));
 }
예제 #7
0
        public static void ProcessLootBoxUnlocks(STULootBoxUnlocks lootBoxUnlocks, ExtractDebugNewEntities.VersionInfo versionInfo, Enum_BABC4175 lootboxType, HashSet <ulong> addedUnlocks)
        {
            if (lootBoxUnlocks?.m_unlocks?.m_unlocks == null)
            {
                return;
            }
            if (lootBoxUnlocks.m_lootboxType != lootboxType)
            {
                return;
            }
            foreach (teStructuredDataAssetRef <STUUnlock> unlock in lootBoxUnlocks.m_unlocks.m_unlocks)
            {
                //Unlock unlockModel = new Unlock(unlock);
                //if (unlockModel.Type != "Skin") continue;

                if (!versionInfo.GUIDs.Contains(unlock))
                {
                    addedUnlocks.Add(unlock);
                }
            }
        }