浏览代码

切换账号清空套装展示数据

zhaoyang 3 年之前
父节点
当前提交
e0da2dd179

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -160,6 +160,7 @@ namespace GFGGame
             StorageDataManager.Instance.Clear();
             RechargeDataManager.Instance.Clear();
             DressUpMenuItemDataManager.Clear();
+            GetSuitItemController.Clear();
             GameGlobal.zoneScene.GetComponent<SessionComponent>()?.Disconnect();
             GameGlobal.zoneScene.GetComponent<ServerInfosComponent>()?.ServerInfoList?.Clear();
             GameGlobal.zoneScene.GetComponent<AccountInfoComponent>()?.Clear();

+ 5 - 2
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/GetSuitItemController.cs

@@ -5,16 +5,19 @@ namespace GFGGame
     public class GetSuitItemController
     {
         public static bool enable = true;
-        private static List<int> _waitingToShowList = new List<int>();
         private static List<int> _waitingToShowSuit = new List<int>();
 
+        public static void Clear()
+        {
+            _waitingToShowSuit.Clear();
+        }
+
         public static void AddItemId(int itemId)
         {
             if (!enable || GameGlobal.myUnit == null)
             {
                 return;
             }
-            _waitingToShowList.Add(itemId);
             int suitId = SuitCfgManager.Instance.GetItemSuitId(itemId);
             if (_waitingToShowSuit.IndexOf(suitId) < 0)
             {