Răsfoiți Sursa

主线星星区分副本

zhaoyang 3 ani în urmă
părinte
comite
315d2d67b4

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -108,13 +108,13 @@ namespace GFGGame
             return star;
         }
 
-        public static int GetChapterStarCount(int chapterID)
+        public static int GetChapterStarCount(int chapterID, int type, int subType)
         {
             var star = 0;
             foreach (var item in _starDic)
             {
                 var levelCfg = StoryLevelCfgArray.Instance.GetCfg(item.Key);
-                if (levelCfg.chapterId == chapterID)
+                if (levelCfg.chapterId == chapterID && levelCfg.type == type && levelCfg.subType == subType)
                 {
                     star += item.Value;
                 }

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

@@ -118,7 +118,7 @@ namespace GFGGame
                 UI_ListChapterItem listItem = UI_ListChapterItem.Proxy(_ui.m_listChapter.GetChildAt(i));
                 int chapterID = (int)listItem.target.data;
                 StoryChapterCfg chapterCfg = _chapterCfgs[i];
-                int starCountChapter = InstanceZonesDataManager.GetChapterStarCount(chapterCfg.id);
+                int starCountChapter = InstanceZonesDataManager.GetChapterStarCount(chapterCfg.id, chapterCfg.type, chapterCfg.subType);
                 listItem.m_content.m_txtProgress.text = "" + starCountChapter + "/" + chapterCfg.bonusStar3;
                 if (MainStoryDataManager.CheckChapterUnlock(chapterCfg.id))
                 {

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

@@ -99,7 +99,7 @@ namespace GFGGame
         {
             StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
             _ui.m_txtChapterName.text = StoryUtil.GetChapterOrderText(_chapterID) + "·" + chapterCfg.name;
-            int starCountChapter = InstanceZonesDataManager.GetChapterStarCount(_chapterID);
+            int starCountChapter = InstanceZonesDataManager.GetChapterStarCount(_chapterID, chapterCfg.type, chapterCfg.subType);
             _ui.m_txtStarCount.text = "" + starCountChapter + "/" + chapterCfg.bonusStar3;
             UpdateBonusBoxName(_ui.m_bonusBox1, "" + chapterCfg.bonusStar1);
             UpdateBonusBoxName(_ui.m_bonusBox2, "" + chapterCfg.bonusStar2);