zhaoyang 3 жил өмнө
parent
commit
da52887094

+ 67 - 127
GameClient/Assets/Game/HotUpdate/Data/Cache/LuckyBoxBonusDataCache.cs

@@ -1,134 +1,74 @@
-using System.Collections.Generic;
-using UnityEngine;
-using System;
+// 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);
-                }
-            }
-        }
+// 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<LuckyBoxBonusData> _showList;
-        // private static int _dropOutId;
-        // private static int _dropId;
+//         public static string probShow;
+//         private static List<LuckyBoxBonusData> _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 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<LuckyBoxBonusData> GetCurrentShowList()
-        {
-            return _showList.GetRange(0, _showList.Count);
-        }
+//         public static List<LuckyBoxBonusData> GetCurrentShowList()
+//         {
+//             return _showList.GetRange(0, _showList.Count);
+//         }
 
-        // public static List<ItemData> GetBonusList(int count, bool isGuide = false)
-        // {
-        //     List<ItemData> bonusList = null;
-        //     if (isGuide)
-        //     {
-        //         int[][] temp = new int[5][];
-        //         temp[0] = new int[] { 10332, 1 };
-        //         temp[1] = new int[] { 10334, 1 };
-        //         temp[2] = new int[] { 10335, 1 };
-        //         temp[3] = new int[] { 10336, 1 };
-        //         temp[4] = new int[] { 10338, 1 };
-        //         List<ItemData> guideBonusList = ItemUtil.CreateItemDataList(temp);
-        //         count = count - guideBonusList.Count;
-        //         bonusList = DropOutDataCache.GetDropItemDatas(_dropOutId, count);
-        //         while (guideBonusList.Count > 1)
-        //         {
-        //             ItemData itemData = guideBonusList[0];
-        //             guideBonusList.RemoveAt(0);
-        //             int index = UnityEngine.Random.Range(0, bonusList.Count);
-        //             bonusList.Insert(index, itemData);
-        //         }
-        //         bonusList.Add(guideBonusList[0]);
-        //     }
-        //     else
-        //     {
-        //         bonusList = DropOutDataCache.GetDropItemDatas(_dropOutId, count);
-        //     }
-        //     int dicIndex = 0;
-        //     LuckyBoxDataManager.Instance.FirstRewardList.Clear();
-        //     foreach (ItemData itemData in bonusList)
-        //     {
+//         private static void InitData(int boxId)
+//         {
+//             LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(boxId);
+//             probShow = luckyBoxCfg.probShow;
+//             _showList = GetBonusDataList(luckyBoxCfg.bonusShowArr);
 
-        //         if (ItemDataManager.GetItemNum(itemData.id) == 0)
-        //         {
-        //             LuckyBoxDataManager.Instance.FirstRewardList.Add(dicIndex, itemData);
-        //         }
-        //         ItemDataManager.Add(itemData.id, itemData.num);
-        //         dicIndex++;
-        //     }
-        //     ItemDataManager.Add(_dropId, count);
+//         }
 
-        //     //100¸öÐÇм»»1¸öÂäÐÇʯ
-        //     LuckyBoxCfg boxCfg0 = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.luckyBoxIds[0]);
-        //     LuckyBoxCfg boxCfg1 = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.luckyBoxIds[1]);
-        //     int itemCount = ItemDataManager.GetItemNum(boxCfg0.drop);
-        //     if (_dropId == boxCfg0.drop && itemCount >= 100)
-        //     {
-        //         ItemDataManager.Add(boxCfg1.drop, itemCount / 100);
-        //         ItemDataManager.Remove(_dropId, itemCount / 100 * 100);
-        //     }
-
-        //     GetSuitItemController.TryShow(0);
-        //     return bonusList;
-        // }
-
-        private static void InitData(int boxId)
-        {
-            LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(boxId);
-            probShow = luckyBoxCfg.probShow;
-            _showList = GetBonusDataList(luckyBoxCfg.bonusShowArr);
-            // _dropOutId = luckyBoxCfg.bonus;
-            // _dropId = luckyBoxCfg.drop;
-        }
-
-        private static List<LuckyBoxBonusData> GetBonusDataList(int[] idsList)
-        {
-            List<LuckyBoxBonusData> list = new List<LuckyBoxBonusData>();
-            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;
-        }
-
-
-    }
-}
+//         private static List<LuckyBoxBonusData> GetBonusDataList(int[] idsList)
+//         {
+//             List<LuckyBoxBonusData> list = new List<LuckyBoxBonusData>();
+//             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;
+//         }
+//     }
+// }

+ 66 - 0
GameClient/Assets/Game/HotUpdate/Data/LuckyBoxDataManager.cs

@@ -17,9 +17,14 @@ namespace GFGGame
 
         private List<ItemData> _rewardsList;//当前奖励,每次抽奖后刷新
         private Dictionary<int, ItemData> _firstRewardsList = new Dictionary<int, ItemData>();//首次获得的奖励
+        public string probShow;
+        private List<LuckyBoxBonusData> _showList;
+
         public int[] luckyBoxIds = new int[] { 1, 2, 3 };//奖池列表
         public int startTime = 1635157620;
         public int endTime = 1704038400;
+
+
         public List<ItemData> RewardList
         {
             get { return _rewardsList; }
@@ -45,6 +50,67 @@ namespace GFGGame
             set { _firstRewardsList = value; }
 
         }
+        private int _currentBoxId;
+        private int _currentSelectId;
+        public int currentBoxId
+        {
+            get
+            {
+                return _currentBoxId;
+            }
+            set
+            {
+                if (_currentBoxId != value)
+                {
+                    _currentBoxId = value;
+                    InitData(_currentBoxId);
+                }
+            }
+        }
+        private void InitData(int boxId)
+        {
+            LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(boxId);
+            probShow = luckyBoxCfg.probShow;
+            _showList = GetBonusDataList(luckyBoxCfg.bonusShowArr);
+
+        }
+
+
+        public 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 List<LuckyBoxBonusData> GetCurrentShowList()
+        {
+            return _showList.GetRange(0, _showList.Count);
+        }
+
+        private List<LuckyBoxBonusData> GetBonusDataList(int[] idsList)
+        {
+            List<LuckyBoxBonusData> list = new List<LuckyBoxBonusData>();
+            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;
+        }
         //获取首次获得的服装的列表
         public List<ItemData> GetFirstClothingList()
         {

+ 1 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/LuckyBoxSProxy.cs

@@ -14,9 +14,8 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    
+
                     LuckyBoxDataManager.Instance.RewardList = ItemUtil.CreateItemDataList(response.bonusList);
-                    // EventAgent.DispatchEvent(ConstMessage.LUCKY_BOX);
                     return true;
                 }
             }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -48,7 +48,7 @@ namespace GFGGame
 
             _valueBar.m_btnCJ.onClick.Add((EventCallback0)(() =>
             {
-                int luckyBoxId = LuckyBoxBonusDataCache.currentBoxId;
+                int luckyBoxId = LuckyBoxDataManager.Instance.currentBoxId;
                 LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(luckyBoxId);
 
                 ItemUtil.ExchangeItemById(luckyBoxCfg.costID, 10, true);
@@ -70,7 +70,7 @@ namespace GFGGame
         {
             UpdateNumeric();
             UpdateCJExchange();
-            UpdateCJ(LuckyBoxBonusDataCache.currentBoxId);
+            UpdateCJ(LuckyBoxDataManager.Instance.currentBoxId);
             EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateNumeric);
             EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdateItem);
         }
@@ -88,7 +88,7 @@ namespace GFGGame
         private void UpdateItem()
         {
             UpdateCJExchange();
-            UpdateCJ(LuckyBoxBonusDataCache.currentBoxId);
+            UpdateCJ(LuckyBoxDataManager.Instance.currentBoxId);
         }
 
         private void UpdateNumeric()

+ 2 - 3
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyTipsView.cs

@@ -59,9 +59,8 @@ namespace GFGGame
             bool result = await ItemExchangeSProxy.ItemExchange(_itemId, _count);
             if (result)
             {
-                ItemData itemData = new ItemData();
-                itemData.id = _itemId;
-                itemData.num = _count;
+                ItemData itemData = ItemUtil.createItemData(_itemId, _count); ;//new ItemData();
+
                 ViewManager.Show<RewardView>(itemData);
                 if (_onSuccess != null)
                 {

+ 6 - 4
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxPreShowView.cs

@@ -27,11 +27,11 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            string probShow = LuckyBoxBonusDataCache.probShow;
+            string probShow = LuckyBoxDataManager.Instance.probShow;
             probShow = probShow.Replace("\\n", "\n");
             _ui.m_compText.m_txtShow.text = probShow;
 
-            _bonusList = LuckyBoxBonusDataCache.GetCurrentShowList();
+            _bonusList = LuckyBoxDataManager.Instance.GetCurrentShowList();
             _ui.m_list.RemoveChildrenToPool();
             _ui.m_list.itemRenderer = ListItemRenderer;
             _ui.m_list.numItems = _bonusList.Count;
@@ -48,7 +48,8 @@ namespace GFGGame
             UI_CompLuckyBoxBonusListItem listItem = UI_CompLuckyBoxBonusListItem.Proxy(item);
             LuckyBoxBonusData luckyBoxBonusData = _bonusList[index];
             listItem.m_txtName.text = luckyBoxBonusData.name;
-            listItem.m_list.itemRenderer = (int index, GObject item) => {
+            listItem.m_list.itemRenderer = (int index, GObject item) =>
+            {
                 UI_BonusItem1 goodsItem = UI_BonusItem1.Proxy(item);
                 ItemData itemData = luckyBoxBonusData.itemList[index] as ItemData;
                 ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
@@ -58,7 +59,8 @@ namespace GFGGame
                 RarityIconController.UpdateRarityIcon(goodsItem.m_iconItem.m_rarity, itemData.id, true);
                 goodsItem.target.data = itemData.id;
             };
-            listItem.m_list.onClickItem.Add((EventContext context) => {
+            listItem.m_list.onClickItem.Add((EventContext context) =>
+            {
                 GComponent item = context.data as GComponent;
                 int itemID = (int)item.data;
                 GoodsItemTipsController.ShowItemTips(itemID);

+ 24 - 24
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -78,10 +78,10 @@ namespace GFGGame
                 }
             }
 
-            LuckyBoxBonusDataCache.currentBoxId = boxId;
+            LuckyBoxDataManager.Instance.currentBoxId = boxId;
             isActiveBoxOpen = Array.IndexOf(LuckyBoxDataManager.Instance.luckyBoxIds, LuckyBoxDataManager.BOX_ID_1) >= 0;
 
-            int index = Array.IndexOf(LuckyBoxDataManager.Instance.luckyBoxIds, LuckyBoxBonusDataCache.currentBoxId);
+            int index = Array.IndexOf(LuckyBoxDataManager.Instance.luckyBoxIds, LuckyBoxDataManager.Instance.currentBoxId);
             _ui.m_listBg.numItems = LuckyBoxDataManager.Instance.luckyBoxIds.Length;
             _ui.m_listBg.ScrollToView(index);
             _ui.m_listBg.scrollPane.decelerationRate = 0.8f;
@@ -107,7 +107,7 @@ namespace GFGGame
             if (!isActiveBoxOpen)
             {
                 //活动未开启
-                LuckyBoxBonusDataCache.currentBoxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
+                LuckyBoxDataManager.Instance.currentBoxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
                 Timers.inst.Remove(CheckTime);
                 return;
             }
@@ -118,12 +118,12 @@ namespace GFGGame
         private void OnListBgScroll()
         {
             UI_ComListBgItem item = UI_ComListBgItem.Proxy(_ui.m_listBg.GetChildAt(_ui.m_c1.selectedIndex));
-            LuckyBoxBonusDataCache.currentBoxId = LuckyBoxDataManager.Instance.luckyBoxIds[_ui.m_c1.selectedIndex];
-            item.m_txtTime.visible = LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
-            item.m_imgTitle.visible = LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
-            item.m_holder.visible = isActiveBoxOpen && LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
-            item.m_holder1.visible = isActiveBoxOpen && LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
-            item.m_loaImg.visible = LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_3;
+            LuckyBoxDataManager.Instance.currentBoxId = LuckyBoxDataManager.Instance.luckyBoxIds[_ui.m_c1.selectedIndex];
+            item.m_txtTime.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
+            item.m_imgTitle.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
+            item.m_holder.visible = isActiveBoxOpen && LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
+            item.m_holder1.visible = isActiveBoxOpen && LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
+            item.m_loaImg.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_3;
 
             onClickChange(0);
             UpdateNormal();
@@ -131,8 +131,8 @@ namespace GFGGame
 
         private void UpdateNormal()
         {
-            LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxBonusDataCache.currentBoxId);
-            _valueBarController.UpdateCJ(LuckyBoxBonusDataCache.currentBoxId);
+            LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.currentBoxId);
+            _valueBarController.UpdateCJ(LuckyBoxDataManager.Instance.currentBoxId);
 
             _ui.m_comCostOne.m_txtCost.text = luckyBoxCfg.costNum.ToString();
             _ui.m_comCostTen.m_txtCost.text = luckyBoxCfg.costNumTen.ToString();
@@ -140,7 +140,7 @@ namespace GFGGame
             _ui.m_comCostTen.m_loaCost.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(luckyBoxCfg.costID).res);
 
 
-            int count = LuckyBoxBonusDataCache.GetOwnedCount();
+            int count = LuckyBoxDataManager.Instance.GetOwnedCount();
             _ui.m_txtOwned.SetVar("v1", "" + count).FlushVars();
 
         }
@@ -148,11 +148,11 @@ namespace GFGGame
         private void onClickChange(int count)
         {
             _ui.m_c1.selectedIndex = _ui.m_c1.selectedIndex + count;
-            _ui.m_imgSpecial.visible = LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
+            _ui.m_imgSpecial.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
             _ui.m_btnRight.visible = _ui.m_c1.selectedIndex != _ui.m_listBg.numItems - 1;
             _ui.m_btnLeft.visible = _ui.m_c1.selectedIndex != 0;
-            _ui.m_btnBuyOne.m_holder.visible = LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
-            _ui.m_btnBuyTen.m_holder.visible = LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
+            _ui.m_btnBuyOne.m_holder.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
+            _ui.m_btnBuyTen.m_holder.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
         }
 
         private void updateBoxEffect()
@@ -174,8 +174,8 @@ namespace GFGGame
         }
         private void OnClickBtnExChange()
         {
-            int storeId = LuckyBoxBonusDataCache.currentBoxId == LuckyBoxDataManager.BOX_ID_1 ? ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID : ConstStoreId.LUCKY_BOX_STORE_ID;
-            ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { storeId }, new object[] { ViewName.LUCKY_BOX_VIEW, LuckyBoxBonusDataCache.currentBoxId });
+            int storeId = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1 ? ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID : ConstStoreId.LUCKY_BOX_STORE_ID;
+            ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { storeId }, new object[] { ViewName.LUCKY_BOX_VIEW, LuckyBoxDataManager.Instance.currentBoxId });
             this.Hide();
         }
         private void OnClickBtnPreview()
@@ -184,24 +184,24 @@ namespace GFGGame
         }
         private void OnClickBtnBuyOne()
         {
-            LuckyBoxDataManager.Instance.CheckItemEnough(LuckyBoxBonusDataCache.currentBoxId, LuckyBoxDataManager.ONCE_TIME, async () =>
+            LuckyBoxDataManager.Instance.CheckItemEnough(LuckyBoxDataManager.Instance.currentBoxId, LuckyBoxDataManager.ONCE_TIME, async () =>
              {
-                 bool result = await LuckyBoxSProxy.ReqGetBonus(LuckyBoxBonusDataCache.currentBoxId, LuckyBoxDataManager.ONCE_TIME);
+                 bool result = await LuckyBoxSProxy.ReqGetBonus(LuckyBoxDataManager.Instance.currentBoxId, LuckyBoxDataManager.ONCE_TIME);
                  if (result)
                  {
-                     ViewManager.Show(ViewName.LUCKY_BOX_STAR_VIEW, LuckyBoxBonusDataCache.currentBoxId, new object[] { ViewName.LUCKY_BOX_VIEW, LuckyBoxBonusDataCache.currentBoxId });
+                     ViewManager.Show(ViewName.LUCKY_BOX_STAR_VIEW, LuckyBoxDataManager.Instance.currentBoxId, new object[] { ViewName.LUCKY_BOX_VIEW, LuckyBoxDataManager.Instance.currentBoxId });
                  }
              });
         }
 
         private void OnClickBtnBuyTen()
         {
-            LuckyBoxDataManager.Instance.CheckItemEnough(LuckyBoxBonusDataCache.currentBoxId, LuckyBoxDataManager.TEN_TIME, async () =>
+            LuckyBoxDataManager.Instance.CheckItemEnough(LuckyBoxDataManager.Instance.currentBoxId, LuckyBoxDataManager.TEN_TIME, async () =>
             {
-                bool result = await LuckyBoxSProxy.ReqGetBonus(LuckyBoxBonusDataCache.currentBoxId, LuckyBoxDataManager.TEN_TIME);
+                bool result = await LuckyBoxSProxy.ReqGetBonus(LuckyBoxDataManager.Instance.currentBoxId, LuckyBoxDataManager.TEN_TIME);
                 if (result)
                 {
-                    ViewManager.Show(ViewName.LUCKY_BOX_STAR_VIEW, LuckyBoxBonusDataCache.currentBoxId, new object[] { ViewName.LUCKY_BOX_VIEW, LuckyBoxBonusDataCache.currentBoxId });
+                    ViewManager.Show(ViewName.LUCKY_BOX_STAR_VIEW, LuckyBoxDataManager.Instance.currentBoxId, new object[] { ViewName.LUCKY_BOX_VIEW, LuckyBoxDataManager.Instance.currentBoxId });
                 }
             });
         }
@@ -232,7 +232,7 @@ namespace GFGGame
         }
         private void Reset()
         {
-            LuckyBoxBonusDataCache.currentBoxId = LuckyBoxDataManager.BOX_ID_1;
+            LuckyBoxDataManager.Instance.currentBoxId = LuckyBoxDataManager.BOX_ID_1;
         }
         protected override void UpdateToCheckGuide(object param)
         {