Exemple #1
0
        public void GetLootboxes(ICLIFlags toolFlags)
        {
            string basePath;

            if (toolFlags is ExtractFlags flags)
            {
                basePath = flags.OutputPath;
            }
            else
            {
                throw new Exception("no output path");
            }


            foreach (ulong key in TrackedFiles[0xCF])
            {
                STULootBox lootbox = GetInstance <STULootBox>(key);
                if (lootbox == null)
                {
                    continue;
                }

                string name = LootBox.GetName(lootbox.m_lootboxType);

                Combo.ComboInfo info = Combo.Find(null, lootbox.m_baseEntity); // 003
                Combo.Find(info, lootbox.m_chestEntity);                       // 003
                Combo.Find(info, lootbox.m_idleEffect);                        // 00D
                Combo.Find(info, lootbox.m_FEC3ED62);                          // 00D
                Combo.Find(info, lootbox.m_FFE7768F);                          // 00D
                Combo.Find(info, lootbox.m_baseModelLook);                     // 01A
                Combo.Find(info, lootbox.m_modelLook);

                Combo.Find(info, 0x400000000001456); // coin chest, todo
                // 00000000315A.00C in 000000001456.003 (288230376151716950)

                if (lootbox.m_shopCards != null)
                {
                    foreach (STULootBoxShopCard lootboxShopCard in lootbox.m_shopCards)
                    {
                        Combo.Find(info, lootboxShopCard.m_cardTexture); // 004
                    }
                }

                var context = new SaveLogic.Combo.SaveContext(info);
                SaveLogic.Combo.SaveLooseTextures(flags, Path.Combine(basePath, Container, name, "ShopCards"), context);
                SaveLogic.Combo.Save(flags, Path.Combine(basePath, Container, name), context);
                context.Wait();
                SaveScratchDatabase();
            }
        }
Exemple #2
0
        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]);
                }
            }
        }
Exemple #3
0
        public List <LootBox> GetLootboxes()
        {
            List <LootBox> @return = new List <LootBox>();

            foreach (ulong key in TrackedFiles[0xCF])
            {
                STULootBox lootbox = GetInstance <STULootBox>(key);
                if (lootbox == null)
                {
                    continue;
                }

                @return.Add(new LootBox(lootbox));
            }

            return(@return);
        }
Exemple #4
0
 public LootBox(STULootBox lootBox)
 {
     Init(lootBox);
 }