// using System.Collections.Generic; // using UnityEngine; // using System; // namespace GFGGame // { // public class LuckyBoxBonusDataCache // { // private static int _currentBoxId; // private static int _currentSelectId; // public static int currentBoxId // { // get // { // return _currentBoxId; // } // set // { // if (_currentBoxId != value) // { // _currentBoxId = value; // InitData(_currentBoxId); // } // } // } // public static string probShow; // private static List _showList; // public static int GetOwnedCount() // { // int count = 0; // foreach (LuckyBoxBonusData luckyBoxBonusData in _showList) // { // foreach (ItemData itemData in luckyBoxBonusData.itemList) // { // if (ItemDataManager.GetItemNum(itemData.id) > 0) // { // count++; // } // } // } // return count; // } // public static List GetCurrentShowList() // { // return _showList.GetRange(0, _showList.Count); // } // private static void InitData(int boxId) // { // LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(boxId); // probShow = luckyBoxCfg.probShow; // _showList = GetBonusDataList(luckyBoxCfg.bonusShowArr); // } // private static List GetBonusDataList(int[] idsList) // { // List list = new List(); // foreach (int id in idsList) // { // BonusListCfg bonusListCfg = BonusListCfgArray.Instance.GetCfg(id); // LuckyBoxBonusData luckyBoxBonusData = new LuckyBoxBonusData(); // luckyBoxBonusData.id = id; // luckyBoxBonusData.name = bonusListCfg.name; // luckyBoxBonusData.itemList = ItemUtil.CreateItemDataList(bonusListCfg.bonusListArr); // list.Add(luckyBoxBonusData); // } // return list; // } // } // }