浏览代码

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

zhaoyang 3 年之前
父节点
当前提交
2f01437ce6

+ 12 - 16
GameClient/Assets/Game/HotUpdate/Data/StoryDataManager.cs

@@ -36,10 +36,6 @@ namespace GFGGame
         public static void InitServerData(RoleInfo roleInfo)
         public static void InitServerData(RoleInfo roleInfo)
         {
         {
             usedRecommend = false;
             usedRecommend = false;
-            _passChapter = roleInfo.chapter;
-            _passLevel = roleInfo.chapterLvl;
-            _passChapterJY = roleInfo.chapterJY;
-            _passLevelJY = roleInfo.chapterLvlJY;
             _recommendCount = roleInfo.recommendCount;
             _recommendCount = roleInfo.recommendCount;
             recommendDay = roleInfo.recommendDay;
             recommendDay = roleInfo.recommendDay;
         }
         }
@@ -102,13 +98,13 @@ namespace GFGGame
         {
         {
             if (StoryUtil.CheckChapterIsHard(chapter))
             if (StoryUtil.CheckChapterIsHard(chapter))
             {
             {
-                _passChapterJY = chapter;
-                _passLevelJY = chapterLvl;
+                //_passChapterJY = chapter;
+                //_passLevelJY = chapterLvl;
             }
             }
             else
             else
             {
             {
-                _passChapter = chapter;
-                _passLevel = chapterLvl;
+                //_passChapter = chapter;
+                //_passLevel = chapterLvl;
             }
             }
         }
         }
 
 
@@ -198,7 +194,7 @@ namespace GFGGame
         public static bool CheckNormalChapterPass(int chapterId)
         public static bool CheckNormalChapterPass(int chapterId)
         {
         {
             int normalChapterId = StoryUtil.GetNormalChapterId(chapterId);
             int normalChapterId = StoryUtil.GetNormalChapterId(chapterId);
-            return normalChapterId <= _passChapter;
+            return normalChapterId <= GameGlobal.myNumericComponent.GetAsInt(NumericType.Chapter);
         }
         }
 
 
         public static bool CheckChapterUnlock(int chapterId)
         public static bool CheckChapterUnlock(int chapterId)
@@ -216,14 +212,14 @@ namespace GFGGame
                     return false;
                     return false;
                 }
                 }
                 //前一精英章需要通关
                 //前一精英章需要通关
-                if (chapterId - 1 > _passChapterJY)
+                if (chapterId - 1 > GameGlobal.myNumericComponent.GetAsInt(NumericType.ChapterJY))
                 {
                 {
                     return false;
                     return false;
                 }
                 }
             }
             }
             else
             else
             {
             {
-                if (chapterId - 1 > _passChapter)
+                if (chapterId - 1 > GameGlobal.myNumericComponent.GetAsInt(NumericType.Chapter))
                 {
                 {
                     return false;
                     return false;
                 }
                 }
@@ -368,18 +364,18 @@ namespace GFGGame
         {
         {
             if (StoryUtil.CheckChapterIsHard(fromChapter))
             if (StoryUtil.CheckChapterIsHard(fromChapter))
             {
             {
-                return _passChapterJY;
+                return GameGlobal.myNumericComponent.GetAsInt(NumericType.ChapterJY);
             }
             }
-            return _passChapter;
+            return GameGlobal.myNumericComponent.GetAsInt(NumericType.Chapter);
         }
         }
 
 
         public static int GetPassLevel(int fromChapter)
         public static int GetPassLevel(int fromChapter)
         {
         {
             if (StoryUtil.CheckChapterIsHard(fromChapter))
             if (StoryUtil.CheckChapterIsHard(fromChapter))
             {
             {
-                return _passLevelJY;
+                return GameGlobal.myNumericComponent.GetAsInt(NumericType.ChapterLvlJY);
             }
             }
-            return _passLevel;
+            return GameGlobal.myNumericComponent.GetAsInt(NumericType.ChapterLvl);
         }
         }
 
 
         public static List<ItemData> PassCurrentLevel(out bool fistPassLastLvl, out bool curLvfirstPass)
         public static List<ItemData> PassCurrentLevel(out bool fistPassLastLvl, out bool curLvfirstPass)
@@ -403,7 +399,7 @@ namespace GFGGame
                 }
                 }
                 SetPassData(tempPassChapter, tempPassLevel);
                 SetPassData(tempPassChapter, tempPassLevel);
                 // FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(_passChapter + 1, _passLevel);//首次通过要检查是否有功能开启
                 // FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(_passChapter + 1, _passLevel);//首次通过要检查是否有功能开启
-                GameProxy.ReqUpdateStoryProgress(_passChapter, _passLevel, _passChapterJY, _passLevelJY);
+                //GameProxy.ReqUpdateStoryProgress(_passChapter, _passLevel, _passChapterJY, _passLevelJY);
                 currentBonusList = StoryBonusDataCache.GetBonusList(currentLevelID, true, true);
                 currentBonusList = StoryBonusDataCache.GetBonusList(currentLevelID, true, true);
             }
             }
             else
             else

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

@@ -23,7 +23,6 @@ namespace GFGGame
         public static string gameApiUrlTest;
         public static string gameApiUrlTest;
 
 
         //ET
         //ET
-        public const string LoginAddress = "127.0.0.1:10002";
         public static Scene zoneScene;
         public static Scene zoneScene;
         public static Unit myUnit;
         public static Unit myUnit;
         public static NumericComponent myNumericComponent;
         public static NumericComponent myNumericComponent;

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryController.cs

@@ -1,3 +1,4 @@
+using ET;
 using System.Collections.Generic;
 using System.Collections.Generic;
 
 
 namespace GFGGame
 namespace GFGGame
@@ -54,7 +55,7 @@ namespace GFGGame
             }
             }
             if (_curLvfirstPass)
             if (_curLvfirstPass)
             {
             {
-                FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(StoryDataManager._passChapter + 1, StoryDataManager._passLevel);//首次通过要检查是否有功能开启
+                FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(GameGlobal.myNumericComponent.GetAsInt(NumericType.Chapter) + 1, GameGlobal.myNumericComponent.GetAsInt(NumericType.ChapterLvl));//首次通过要检查是否有功能开启
             }
             }
             if (bonusList != null && bonusList.Count > 0)
             if (bonusList != null && bonusList.Count > 0)
             {
             {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -94,7 +94,7 @@ namespace GFGGame
                 _currentBonusList = StoryDataManager.PassCurrentLevel(out _fistPassLastLvl, out _curLvfirstPass);
                 _currentBonusList = StoryDataManager.PassCurrentLevel(out _fistPassLastLvl, out _curLvfirstPass);
                 if (_curLvfirstPass)
                 if (_curLvfirstPass)
                 {
                 {
-                    FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(StoryDataManager._passChapter + 1, StoryDataManager._passLevel);//首次通过要检查是否有功能开启
+                    FunctionOpenDataManager.Instance.CheckHasChapterFunOpen(GameGlobal.myNumericComponent.GetAsInt(NumericType.Chapter) + 1, GameGlobal.myNumericComponent.GetAsInt(NumericType.ChapterLvl));//首次通过要检查是否有功能开启
                 }
                 }
             }
             }
             Timers.inst.Add(0.5f, 1, AddExp);
             Timers.inst.Add(0.5f, 1, AddExp);