Browse Source

自定义套装

guodong 3 years ago
parent
commit
0179e420bf

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit 23075e2b3f8c1a53092f5856d846d2f7fa305471
+Subproject commit 7ad7a972d01a581588f1c64c43fbeab2913a607e

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstStorageId.cs

@@ -7,6 +7,7 @@ namespace GFGGame
         public const int STORAGE_SKIP_GUIDE = 20000;//跳过引导,0不跳过,1跳过
         public const int STORAGE_AUTO_PLAY = 20001;//自动战斗,0不自动战斗,1自动战斗
         public const int STORAGE_AUTO_PLAY_SPEED = 20002;//战斗速度
+        public const int STORAGE_CUSTOME_SUIT_INDEX = 20003;//自定义套装当前使用索引
 
     }
 }

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

@@ -194,18 +194,6 @@ namespace GFGGame
 
         }
 
-        public static void PrepareUpdateTreasure()
-        {
-            if (!Timers.inst.Exists(UpdateTreasure))
-            {
-                Timers.inst.Add(0.1f, 1, UpdateTreasure);
-            }
-        }
-
-        private static void UpdateTreasure(object param)
-        {
-            GameProxy.ReqUpdateTreasure();
-        }
 
 
     }

+ 4 - 6
GameClient/Assets/Game/HotUpdate/Data/CustomSuitDataManager.cs

@@ -1,13 +1,14 @@
 using System.Collections.Generic;
 using System.Collections;
+using ET;
+
 namespace GFGGame
 {
     public class CustomSuitDataManager
     {
-        private static int _currentIndex = 0;
         public static int currentIndex
         {
-            get {return _currentIndex;}
+            get { return StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_CUSTOME_SUIT_INDEX); }
         }
 
         private static Dictionary<int, CustomSuitData> _dataDic = new Dictionary<int, CustomSuitData>();
@@ -64,19 +65,16 @@ namespace GFGGame
         {
             if(currentIndex != index)
             {
-                _currentIndex = index;
-                GameProxy.ReqUpdateRoleSuitIndex(index);
+                StorageSProxy.ReqSetClientValue(ConstStorageId.STORAGE_CUSTOME_SUIT_INDEX ,index).Coroutine();
             }
             SaveSuit(currentIndex, EquipDataCache.cacher.equipDatas, EquipDataCache.cacher.bgId, EquipDataCache.cacher.suitId, EquipDataCache.cacher.picStatus);
         }
 
         public static void InitServerData(int suitIndex, List<RoleSuit> list)
         {
-            _currentIndex = 0;
             _dataDic.Clear();
             if(list != null)
             {
-                _currentIndex = suitIndex;
                 foreach(RoleSuit roleSuit in list)
                 {
                     CustomSuitData suitSavedData = new CustomSuitData(roleSuit.pos);