浏览代码

Merge remote-tracking branch 'remotes/origin/master' into zhaoyang

# Conflicts:
#	GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs
#	GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs
#	GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes
zhaoyang 3 年之前
父节点
当前提交
e8a7953c78
共有 22 个文件被更改,包括 152 次插入94 次删除
  1. 16 17
      GameClient/Assets/Game/HotUpdate/Controller/ErrorCodeController.cs
  2. 3 7
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  3. 27 11
      GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs
  4. 10 4
      GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs
  5. 11 8
      GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/DisConnected/DisConnectedCompnentSystem.cs
  6. 1 1
      GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Item/ItemHelper.cs
  7. 6 5
      GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Login/LoginHelper.cs
  8. 2 2
      GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Numeric/NumericHelper.cs
  9. 0 6
      GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Scene/SceneChangeHelper.cs
  10. 1 0
      GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Scene/SceneFactory.cs
  11. 3 3
      GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Session/SessionComponentSystem.cs
  12. 1 13
      GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Unit/UnitFactory.cs
  13. 2 8
      GameClient/Assets/Game/HotUpdate/ETCodes/Model/App/DisConnected/DisConnectedCompnent.cs
  14. 8 1
      GameClient/Assets/Game/HotUpdate/ETCodes/Model/App/Session/SessionComponent.cs
  15. 4 1
      GameClient/Assets/Game/HotUpdate/GameGlobal.cs
  16. 39 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/ItemProxy.cs
  17. 11 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/ItemProxy.cs.meta
  18. 1 1
      GameClient/Assets/Game/HotUpdate/ServerProxy/LogSProxy.cs
  19. 1 1
      GameClient/Assets/Game/HotUpdate/ServerProxy/MessageHelper.cs
  20. 4 4
      GameClient/Assets/Game/HotUpdate/ServerProxy/SuitFosterProxy.cs
  21. 1 1
      GameClient/Assets/Game/HotUpdate/Views/Common/Controller/GetSuitItemController.cs
  22. 二进制
      GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes

+ 16 - 17
GameClient/Assets/Game/HotUpdate/Controller/ErrorCodeController.cs

@@ -4,17 +4,17 @@ namespace GFGGame
 {
     public class ErrorCodeController
     {
-        //返回结果为true时,表示可以继续失败步骤
+        //返回结果为true时,表示可以在错误提示后继续处理后续逻辑
         public static bool Handler(int errorCode)
         {
             switch (errorCode)
             {
                 case ET.ErrorCode.ERR_NetWorkError:
                     {
-                        AlertSystem.Show("网络异常")
-                        .SetRightButton(true, "稍后再试", (object data) =>
+                        AlertSystem.Show("网络异常,也有可能是服务器异常,请稍后再试!")
+                        .SetRightButton(true, "好的", (object data) =>
                         {
-                            Application.Quit();
+                            
                         });
                     }
                     break;
@@ -25,52 +25,51 @@ namespace GFGGame
                             {
                                 Application.Quit();
                             });
+                        return false;
                     }
-                    break;
                 case ET.ErrorCode.Err_LoginCountFull:
                     {
-                        AlertSystem.Show("游戏已爆满!")
-                              .SetLeftButton(true, "稍后再试", (data) =>
+                        AlertSystem.Show("游戏已爆满,请稍后再试!")
+                              .SetLeftButton(true, "好的", (data) =>
                               {
-                                  Application.Quit();
+                                  
                               });
                     }
                     break;
                 case ET.ErrorCode.Err_ServerMaintain:
                     {
-                        AlertSystem.Show("服务器维护中!")
-                            .SetLeftButton(true, "稍后再试", (data) =>
+                        AlertSystem.Show("服务器维护中,请稍后再试!")
+                            .SetLeftButton(true, "好的", (data) =>
                             {
-                                Application.Quit();
+                                
                             });
                     }
                     break;
                 case ET.ErrorCode.ERR_AntiAddiction:
                     {
-                        string promptStr = "您属于未成年人,已被纳入防沉迷系统。每日22时至次日8时,本游戏将无法为未成年人用户提供游戏服务。";
+                        string promptStr = "您属于未成年人,已被纳入防沉迷系统,当前为非游戏时间,本游戏将无法为未成年人用户提供游戏服务。";
                         AlertSystem.Show(promptStr)
-                            .SetRightButton(true, "稍后再试", (object data) =>
+                            .SetRightButton(true, "休息一下", (object data) =>
                             {
                                 Application.Quit();
                             });
+                        return false;
                     }
-                    break;
                 default:
                     if (ErrorCodeCfgArray.Instance.GetCfg(errorCode) != null)
                     {
                         PromptController.Instance.ShowFloatTextPrompt(ErrorCodeCfgArray.Instance.GetCfg(errorCode).tips);
                         ET.Log.Debug("errorCode" + errorCode.ToString());
-                        return true;
                     }
                     else
                     {
                         PromptController.Instance.ShowFloatTextPrompt("errorCode " + errorCode.ToString());
                         ET.Log.Error("errorCode" + errorCode.ToString());
-                        return true;
                     }
+                    break;
 
             }
-            return false;
+            return true;
         }
     }
 }

+ 3 - 7
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -104,7 +104,7 @@ namespace GFGGame
             GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("CommonGame"));
             GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("Main"));
 
-
+            await ItemProxy.GetItemInfos();
             await InstanceZonesSProxy.GetInstanceZonesInfos();
             await StorageSProxy.ReqGetClientValues();
             await SuitFosterProxy.SendGetSuitInfos();
@@ -142,17 +142,13 @@ namespace GFGGame
 
         public static void QuitToLoginView(bool logout)
         {
+            GameGlobal.DataInited = false;
             PlatformTapManager.Instance.OnQuitGame();
             GameGlobal.isVisitor = false;
             GameGlobal.antiAddiction = true;
             GameGlobal.userId = 0;
             GameGlobal.userAge = 0;
             GameGlobal.skipGuide = false;
-            if (GameGlobal.myUnit != null)
-            {
-                GameGlobal.myUnit.Dispose();
-                GameGlobal.myUnit = null;
-            }
             RoleDataHandler.StopUpdate();
             CardDataManager.Clear();
             DecomposeDataManager.Instance.Clear();
@@ -232,8 +228,8 @@ namespace GFGGame
             RechargeSProxy.ReqRequestGiftBagInfo().Coroutine();
             RechargeSProxy.ReqExchangeInfo().Coroutine();
             DailyTaskSProxy.ReqDailyTaskInfos().Coroutine();
-            NoticeSProxy.ReqSystemNoticeList().Coroutine();
             StudioSProxy.ReqStudioInfos().Coroutine();
+            NoticeSProxy.ReqSystemNoticeList().Coroutine();
             MailSProxy.ReqMailCount().Coroutine();
 
             EquipDataCache.cacher.autoPlay = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY) <= 0 ? false : true;

+ 27 - 11
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -133,7 +133,7 @@ namespace GFGGame
         public static void Logout()
         {
             GameGlobal.zoneScene.GetComponent<SessionComponent>().AccountSession?.Dispose();
-            GameGlobal.zoneScene.GetComponent<SessionComponent>().Session?.Dispose();
+            GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession?.Dispose();
         }
 
         public static async ETTask Register(string account, string password, string name, string identityNum, string code)
@@ -154,9 +154,11 @@ namespace GFGGame
 
         public static async ETTask GetServerInfos()
         {
+            ViewManager.Show<ModalStatusView>("获取服务器列表...");
             int errorCode = await LoginHelper.GetServerInfos(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)
             {
+                ViewManager.Hide<ModalStatusView>();
                 ErrorCodeController.Handler(errorCode);
                 await ETTask.Create();
                 return;
@@ -181,6 +183,7 @@ namespace GFGGame
 
         public static async ETTask GetRoles()
         {
+            ViewManager.Show<ModalStatusView>("获取角色信息...");
             int errorCode = await LoginHelper.GetRoles(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)
             {
@@ -221,22 +224,20 @@ namespace GFGGame
 
         public static async ETTask ReqEnterGame()
         {
-            ViewManager.Hide<LoginView>();
-            ViewManager.Show<LoadingView>();
-            // LoadingView.Instance.Open();
-            LoadingView.Instance.GetUI();
-            LoadingView.Instance.SetProgress(99);
-            LoadingView.Instance.GetUI();
-            LoadingView.Instance.SetDesc("正在进入游戏");
-            LoadingView.Instance.GetUI();
-
-            LogServerHelperHttp.SendNodeLog((int)LogNode.StartEnterGame);
+            ViewManager.Show<ModalStatusView>("请求进入游戏...");
             int errorCode = await LoginHelper.GetRealmKey(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)
             {
+                ViewManager.Hide<ModalStatusView>();
                 ErrorCodeController.Handler(errorCode);
                 return;
             }
+            ViewManager.Hide<ModalStatusView>();
+            ViewManager.Hide<LoginView>();
+            ViewManager.Show<LoadingView>();
+            LoadingView.Instance.SetProgress(99);
+            LoadingView.Instance.SetDesc("正在进入游戏");
+            LogServerHelperHttp.SendNodeLog((int)LogNode.StartEnterGame);
             errorCode = await LoginHelper.EnterGame(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)
             {
@@ -248,5 +249,20 @@ namespace GFGGame
 
             LogServerHelperHttp.SendNodeLog((int)LogNode.OnEnterGame);
         }
+
+        public static async ETTask ReqReConnectGate()
+        {
+            ViewManager.Show<ModalStatusView>("重新连接中...");
+            int errorCode = await LoginHelper.EnterGame(GameGlobal.zoneScene);
+            if (errorCode != ErrorCode.ERR_Success)
+            {
+                ErrorCodeController.Handler(errorCode);
+            }
+            EventAgent.DispatchEvent(ConstMessage.NUMERIC_CHANGE, NumericType.All);
+            //重连成功请求邮件和公告等离线后会变更的数据
+            NoticeSProxy.ReqSystemNoticeList().Coroutine();
+            MailSProxy.ReqMailCount().Coroutine();
+            ViewManager.Hide<ModalStatusView>();
+        }
     }
 }

+ 10 - 4
GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs

@@ -36,14 +36,20 @@ namespace GFGGame
             itemData.num += itemNum;
             if (ItemUtilCS.IsDressUpItem(itemID) && itemID % GameConst.MAX_COUNT_EVERY_TYPE_ITEM > 0)
             {
-                DressUpMenuItemDataManager.Add(itemID);
+                //游戏角色初始数据完成后才执行
+                bool dataInited = GameGlobal.DataInited;
+                if(dataInited)
+                {
+                    DressUpMenuItemDataManager.Add(itemID);
+                }
                 if (!DressUpMenuItemDataManager.CheckIsSceneType(itemID))
                 {
                     DecomposeDataManager.Instance.Add(itemID);
                 }
-                string functionId = typeof(ClothingListView).Name;
-                FunctionOpenCfg functionOpenCfg = FunctionOpenCfgArray.Instance.GetCfg(functionId);
-                if (GameGlobal.myUnit != null//游戏角色初始数据不处理
+
+                FunctionOpenCfg functionOpenCfg = FunctionOpenCfgArray.Instance.GetCfg(typeof(SuitListView).Name);
+
+                if (dataInited
                     && itemCfg.rarity == ConstDressRarity.Rarity_TIANYI
                     && StorageDataManager.Instance.GetStorageValue(ConstStorageId.FUNCTION_OPEN + functionOpenCfg.index) == 0)
                 {

+ 11 - 8
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/DisConnected/DisConnectedCompnentSystem.cs

@@ -11,15 +11,18 @@ namespace ET
     {
         public override void Destroy(DisConnectedCompnent self)
         {
-            if (self.showAlert)
+            if (self.ToReconnect)
             {
-                AlertSystem.Show("服务器连接已断开!")
-                      .SetLeftButton(true, "返回登录", (obj) =>
-                      {
-                          GameController.QuitToLoginView(false);
-                      });
+                if(GameGlobal.zoneScene.GetComponent<SessionComponent>().SessionState == SessionState.Gate)
+                {
+                    LoginController.ReqReConnectGate().Coroutine();
+                }
+                else
+                {
+                    GameController.QuitToLoginView(false);
+                }
             }
-            self.showAlert = true;
+            self.ToReconnect = true;
         }
     }
 
@@ -27,7 +30,7 @@ namespace ET
     {
         public static void CancelAlert(this DisConnectedCompnent self)
         {
-            self.showAlert = false;
+            self.ToReconnect = false;
         }
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Item/ItemHelper.cs

@@ -11,7 +11,7 @@ namespace ET
             Session session = null;
             try
             {
-                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().Session;
+                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession;
                 m2C_GetItemAttributeInfos = (M2C_GetItemAttributeInfos)await session.Call(new C2M_GetItemAttributeInfos());
             }
             catch(Exception e)

+ 6 - 5
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Login/LoginHelper.cs

@@ -76,6 +76,7 @@ namespace ET
             zoneScene.GetComponent<SessionComponent>().AccountSession = accountSession;
             accountSession.AddComponent<PingComponent>();
             accountSession.AddComponent<DisConnectedCompnent>();
+            zoneScene.GetComponent<SessionComponent>().SessionState = SessionState.Login;
             AccountInfoComponent accountInfoComponent = zoneScene.GetComponent<AccountInfoComponent>();
             accountInfoComponent.Token = a2CLoginAccount.Token;
             accountInfoComponent.AccountId = a2CLoginAccount.AccountId;
@@ -312,7 +313,8 @@ namespace ET
             Session gateSession = zoneScene.GetComponent<NetKcpComponent>().Create(NetworkHelper.ToIPEndPoint(r2C_LoginRealm.GateAddress));
             gateSession.AddComponent<PingComponent>();
             gateSession.AddComponent<DisConnectedCompnent>();
-            zoneScene.GetComponent<SessionComponent>().Session = gateSession;
+            zoneScene.GetComponent<SessionComponent>().GateSession = gateSession;
+            zoneScene.GetComponent<SessionComponent>().SessionState = SessionState.Gate;
 
             //2.역迦젯쌈Gate
             long currentRoleId = zoneScene.GetComponent<RoleInfosComponent>().CurrentRoleId;
@@ -330,16 +332,15 @@ namespace ET
             catch (Exception e)
             {
                 Log.Debug(e.ToString());
-                zoneScene.GetComponent<SessionComponent>().Session?.Dispose();
+                zoneScene.GetComponent<SessionComponent>().GateSession?.Dispose();
                 return ErrorCode.ERR_NetWorkError;
             }
 
             if (g2C_LoginGate.Error != ErrorCode.ERR_Success)
             {
-                zoneScene.GetComponent<SessionComponent>().Session?.Dispose();
+                zoneScene.GetComponent<SessionComponent>().GateSession?.Dispose();
                 return g2C_LoginGate.Error;
             }
-
             Log.Debug("되쩍gate냥묘!");
 
             //3.실�攣駕헝헹쏵흙踏狗쭉서륩
@@ -351,7 +352,7 @@ namespace ET
             catch (Exception e)
             {
                 Log.Debug(e.ToString());
-                zoneScene.GetComponent<SessionComponent>().Session.Dispose();
+                zoneScene.GetComponent<SessionComponent>().GateSession.Dispose();
                 return ErrorCode.ERR_NetWorkError;
             }
 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Numeric/NumericHelper.cs

@@ -9,7 +9,7 @@ namespace ET
             M2C_TestUnitNumric m2C_TestUnitNumric = null;
             try
             {
-                m2C_TestUnitNumric = (M2C_TestUnitNumric)await zoneScene.GetComponent<SessionComponent>().Session.Call(new C2M_TestUnitNumric() { });
+                m2C_TestUnitNumric = (M2C_TestUnitNumric)await zoneScene.GetComponent<SessionComponent>().GateSession.Call(new C2M_TestUnitNumric() { });
             }
             catch(System.Exception e)
             {
@@ -31,7 +31,7 @@ namespace ET
             M2C_AddAttributePoint m2C_AddAttributePoint = null;
             try
             {
-                m2C_AddAttributePoint = (M2C_AddAttributePoint)await zoneScene.GetComponent<SessionComponent>().Session.Call(new C2M_AddAtributePoint() { NumericType = numericType });
+                m2C_AddAttributePoint = (M2C_AddAttributePoint)await zoneScene.GetComponent<SessionComponent>().GateSession.Call(new C2M_AddAtributePoint() { NumericType = numericType });
             }
             catch(Exception e)
             {

+ 0 - 6
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Scene/SceneChangeHelper.cs

@@ -11,17 +11,11 @@ namespace ET
             CurrentScenesComponent currentScenesComponent = zoneScene.GetComponent<CurrentScenesComponent>();
             currentScenesComponent.Scene?.Dispose(); // 删除之前的CurrentScene,创建新的
             Scene currentScene = SceneFactory.CreateCurrentScene(sceneInstanceId, zoneScene.Zone, sceneName, currentScenesComponent);
-            UnitComponent unitComponent = currentScene.AddComponent<UnitComponent>();
-
-            // 可以订阅这个事件中创建Loading界面
-            //Game.EventSystem.Publish(new EventType.SceneChangeStart() { ZoneScene = zoneScene });
 
             // 等待CreateMyUnit的消息
             WaitType.Wait_CreateMyUnit waitCreateMyUnit = await zoneScene.GetComponent<ObjectWait>().Wait<WaitType.Wait_CreateMyUnit>();
             M2C_CreateMyUnit m2CCreateMyUnit = waitCreateMyUnit.Message;
             Unit unit = UnitFactory.Create(currentScene, m2CCreateMyUnit.Unit);
-            unitComponent.Add(unit);
-            GameGlobal.myUnit = unit;
             GameGlobal.myNumericComponent = unit.GetComponent<NumericComponent>();
 
             // 通知等待场景切换的协程

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Scene/SceneFactory.cs

@@ -25,6 +25,7 @@ namespace ET
         public static Scene CreateCurrentScene(long id, int zone, string name, CurrentScenesComponent currentScenesComponent)
         {
             Scene currentScene = EntitySceneFactory.CreateScene(id, zone, SceneType.Current, name, currentScenesComponent);
+            currentScene.AddComponent<UnitComponent>();
             currentScenesComponent.Scene = currentScene;
             return currentScene;
         }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Session/SessionComponentSystem.cs

@@ -5,7 +5,7 @@
 		public override void Destroy(SessionComponent self)
 		{
 			self.AccountSession?.Dispose();
-			self.Session?.Dispose();
+			self.GateSession?.Dispose();
 		}
 	}
 
@@ -15,8 +15,8 @@
 		{
 			self.AccountSession?.GetComponent<DisConnectedCompnent>()?.CancelAlert();
 			self.AccountSession?.Dispose();
-			self.Session?.GetComponent<DisConnectedCompnent>()?.CancelAlert();
-			self.Session?.Dispose();
+			self.GateSession?.GetComponent<DisConnectedCompnent>()?.CancelAlert();
+			self.GateSession?.Dispose();
 		}
     }
 }

+ 1 - 13
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Unit/UnitFactory.cs

@@ -12,23 +12,11 @@ namespace ET
             unitComponent.Add(unit);
             //数值组件
             NumericComponent numericComponent = unit.AddComponent<NumericComponent>();
+            unit.AddComponent<ObjectWait>();
             for (int i = 0; i < unitInfo.Ks.Count; ++i)
             {
                 numericComponent.Set(unitInfo.Ks[i], unitInfo.Vs[i]);
             }
-            //物品兑换
-            for (int i = 0; i < unitInfo.KsItemExchange.Count; i++)
-            {
-                ItemDataManager.InitItemExchange(unitInfo.KsItemExchange[i], unitInfo.VsItemExchange[i]);
-            }
-            unit.AddComponent<ObjectWait>();
-            //服装数据与物品通步
-            DressUpMenuSuitDataManager.InitData();
-            DressUpMenuItemDataManager.InitData();
-            //初始化物品
-            ItemDataManager.InitServerData(unitInfo.Items);
-            //自定义套装
-            CustomSuitDataManager.InitServerData(unitInfo.CustomSuits);
             //角色信息
             RoleDataManager.InitServerData();
             return unit;

+ 2 - 8
GameClient/Assets/Game/HotUpdate/ETCodes/Model/App/DisConnected/DisConnectedCompnent.cs

@@ -1,13 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ET
+namespace ET
 {
     public class DisConnectedCompnent : Entity, IAwake, IDestroy
     {
-        public bool showAlert = true;
+        public bool ToReconnect = true;
     }
 }

+ 8 - 1
GameClient/Assets/Game/HotUpdate/ETCodes/Model/App/Session/SessionComponent.cs

@@ -1,10 +1,17 @@
 namespace ET
 {
+	public enum SessionState
+	{
+		Login,
+		Gate
+	}
 	public class SessionComponent: Entity, IAwake, IDestroy
 	{
 		//登录会话
 		public Session AccountSession;
 		//游戏会话
-		public Session Session;
+		public Session GateSession;
+		//连接状态
+		public SessionState SessionState;
 	}
 }

+ 4 - 1
GameClient/Assets/Game/HotUpdate/GameGlobal.cs

@@ -23,7 +23,10 @@ namespace GFGGame
 
         //ET
         public static Scene zoneScene;
-        public static Unit myUnit;
+        /// <summary>
+        /// 初始数据是否已处理
+        /// </summary>
+        public static bool DataInited;
         public static NumericComponent myNumericComponent;
         public static int lastLoginTime;//上次登录时间
 

+ 39 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ItemProxy.cs

@@ -0,0 +1,39 @@
+using ET;
+
+namespace GFGGame
+{
+    public class ItemProxy
+    {
+        public static async ETTask<bool> GetItemInfos()
+        {
+            GameGlobal.DataInited = false;
+            M2C_GetItemInfos response = null;
+            response = (M2C_GetItemInfos)await MessageHelper.SendToServer(new C2M_GetItemInfos());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    //物品兑换
+                    for (int i = 0; i < response.KsItemExchange.Count; i++)
+                    {
+                        ItemDataManager.InitItemExchange(response.KsItemExchange[i], response.VsItemExchange[i]);
+                    }
+                    //服装数据与物品通步
+                    DressUpMenuSuitDataManager.InitData();
+                    DressUpMenuItemDataManager.InitData();
+                    //初始化物品
+                    ItemDataManager.InitServerData(response.Items);
+                    //自定义套装
+                    CustomSuitDataManager.InitServerData(response.CustomSuits);
+                    return true;
+                }
+            }
+
+
+            //!!!必须放在最后,标记数据初始化完成
+            GameGlobal.DataInited = true;
+            return false;
+
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ItemProxy.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5907d7f2ee206084da1c0dff13f4b7d0
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/LogSProxy.cs

@@ -7,7 +7,7 @@ namespace GFGGame
 
         public static void SendLog(string message)
         {
-            Session session = GameGlobal.zoneScene.GetComponent<SessionComponent>().Session;
+            Session session = GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession;
             if (session == null || session.IsDisposed)
             {
                 return;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/MessageHelper.cs

@@ -8,7 +8,7 @@ namespace GFGGame
         public static async ETTask<IResponse> SendToServer(IRequest request, bool showError = true)
         {
             IResponse response = null;
-            Session session = GameGlobal.zoneScene.GetComponent<SessionComponent>().Session;
+            Session session = GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession;
             try
             {
                 response = await session.Call(request);

+ 4 - 4
GameClient/Assets/Game/HotUpdate/ServerProxy/SuitFosterProxy.cs

@@ -12,7 +12,7 @@ namespace ET
             Session session = null;
             try
             {
-                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().Session;
+                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession;
                 getSuitInfos = (M2C_GetSuitInfos)await session.Call(new C2M_GetSuitInfos() { });
             }
             catch
@@ -36,7 +36,7 @@ namespace ET
             Session session = null;
             try
             {
-                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().Session;
+                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession;
                 maintainSuit = (M2C_MaintainSuit)await session.Call(new C2M_MaintainSuit() { SuitId = suitId, MaintainStep = maintainStep });
             }
             catch
@@ -59,7 +59,7 @@ namespace ET
             Session session = null;
             try
             {
-                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().Session;
+                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession;
                 getMaintainSuitBonus = (M2C_GetMaintainSuitBonus)await session.Call(new C2M_GetMaintainSuitBonus() { SuitId = suitId, MaintainStep = maintainStep });
             }
             catch
@@ -82,7 +82,7 @@ namespace ET
             Session session = null;
             try
             {
-                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().Session;
+                session = GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession;
                 makeNewSuit = (M2C_MakeNewSuit)await session.Call(new C2M_MakeNewSuit() { SuitId = suitId });
             }
             catch

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

@@ -14,7 +14,7 @@ namespace GFGGame
 
         public static void AddItemId(int itemId)
         {
-            if (!enable || GameGlobal.myUnit == null)
+            if (!enable)
             {
                 return;
             }

二进制
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes