Quellcode durchsuchen

服务器移植

guodong vor 3 Jahren
Ursprung
Commit
bfcbbafce2

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit 18dfa1b2fa78c932e1451574029bbcede1f5eb90
+Subproject commit edde91b6eb5408645bdedba65c480d027eb4e3c1

+ 29 - 30
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -60,45 +60,44 @@ namespace GFGGame
         public static void ShowCreateRole()
         {
             ViewManager.Show(ViewName.CREATE_ROLE_VIEW);
-            Alert.Show("是否跳过引导?如果您是第一次体验,建议不要跳过引导!")
-                .SetLeftButton(true, "不用")
-                .SetRightButton(true, "跳过", (obj) =>
-                {
-                    GameGlobal.skipGuide = true;
-                });
         }
 
-        public static void PreEnterGame(GameResult result)
+        public static void PreEnterGame()
         {
-            RoleInfo roleInfo = null;
+            //RoleInfo roleInfo = null;
             GetSuitItemController.enable = false;
             DressUpMenuSuitDataManager.InitData();
             DressUpMenuItemDataManager.InitData();
-            roleInfo = result.roleInfo;
-            bool rerult = AntiAddictionController.CheckAntiAddiction(roleInfo.onlineTimeSecs, roleInfo.onlineDurationSecs, roleInfo.onlineDurationSecsDay);
-            if (rerult)
-            {
-                return;
-            }
-            ServerDataManager.SetServerTime(roleInfo.serverTime);
-            RoleDataManager.InitServerData(roleInfo);
-            ItemDataManager.InitServerData(result.roleItemList);
-            CustomSuitDataManager.InitServerData(roleInfo.suitIndex, result.roleSuitList);
-            StoryDataManager.InitServerData(roleInfo);
-            GuideDataManager.InitServerData(result.roleGuideList);
-            DressUpMenuSuitDataManager.InitServerData(result.systemSuitList);
-            CardDataManager.InitServerData(result.roleCardList);
+            //roleInfo = result.roleInfo;
+            //bool rerult = AntiAddictionController.CheckAntiAddiction(roleInfo.onlineTimeSecs, roleInfo.onlineDurationSecs, roleInfo.onlineDurationSecsDay);
+            //if (rerult)
+            //{
+            //    return;
+            //}
+            //ServerDataManager.SetServerTime(roleInfo.serverTime);
+            //RoleDataManager.InitServerData(roleInfo);
+            //ItemDataManager.InitServerData(result.roleItemList);
+            //CustomSuitDataManager.InitServerData(roleInfo.suitIndex, result.roleSuitList);
+            //StoryDataManager.InitServerData(roleInfo);
+            //GuideDataManager.InitServerData(result.roleGuideList);
+            //DressUpMenuSuitDataManager.InitServerData(result.systemSuitList);
+            //CardDataManager.InitServerData(result.roleCardList);
             GetSuitItemController.enable = true;
-            RoleDataHandler.StartUpdate();
+            //RoleDataHandler.StartUpdate();
 
             GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("CommonGame"));
             GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("Main"));
 
-            if (RoleDataManager.lvl >= 50)
-            {
-                GameGlobal.skipGuide = true;
-            }
-            EnterGame();
+            Alert.Show("是否跳过引导?如果您是第一次体验,建议不要跳过引导!")
+                    .SetLeftButton(true, "不用", (obj) =>
+                    {
+                        EnterGame();
+                    })
+                    .SetRightButton(true, "跳过", (obj) =>
+                    {
+                        GameGlobal.skipGuide = true;
+                        EnterGame();
+                    });
         }
 
         public static void QuitToLoginView(bool logout)
@@ -161,8 +160,8 @@ namespace GFGGame
 
         private static void AfterEnterGame()
         {
-            GameProxy.ReqGetStoryScoreList();
-            GameProxy.ReqGetStoryStarList();
+            //GameProxy.ReqGetStoryScoreList();
+            //GameProxy.ReqGetStoryStarList();
         }
 
         public static void PrepareUpdateTreasure()

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -156,8 +156,7 @@ namespace GFGGame
                 ErrorCodeController.Handler(errorCode);
                 return;
             }
-
-            ViewManager.Hide<LoginView>();
+            GameController.PreEnterGame();
         }
     }
 }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Controller/PromptController.cs

@@ -22,7 +22,7 @@ namespace GFGGame
             {
                 GComponent ui = _uis[0];
                 long endTime = (long)ui.data;
-                if (endTime < ServerDataManager.currentTimeMillis)
+                if (endTime < ET.TimeHelper.ClientNow())
                 {
                     _uis.Remove(ui);
                     GTweener gTweener = ui.TweenFade(0, 0.5f);
@@ -68,7 +68,7 @@ namespace GFGGame
                 ui.x = preui.x;
                 ui.y = preui.y + 50;
             }
-            ui.data = ServerDataManager.currentTimeMillis + 3000;
+            ui.data = ET.TimeHelper.ClientNow() + 3000;
             _uis.Add(ui);
         }
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/Handler/RoleDataHandler.cs

@@ -32,7 +32,7 @@ namespace GFGGame
             int currentTimeSecs = ServerDataManager.currentTimeSecs;
             if(currentTimeSecs >= _heartbeatCDEnd) 
             {
-                GameProxy.ReqUpdateTime();
+                //GameProxy.ReqUpdateTime();
                 _heartbeatCDEnd = currentTimeSecs + INTERVAL_HEARTBEAT;
             }
             int day = ServerDataManager.CurrentDay;