zhaoyang 2 жил өмнө
parent
commit
0a4b713874

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -86,7 +86,9 @@ namespace GFGGame
             _roleData.scoreType = InstanceZonesDataManager.currentScoreType;
             _roleData.baseScore = RoleLevelCfgArray.Instance.GetCfg(RoleDataManager.lvl).baseScore;
             _roleData.cardId = InstanceZonesDataManager.currentCardId; ;//卡牌id
-            _roleData.cardScore = _roleData.cardId <= 0 ? 0 : CardDataManager.GetCardDataById(_roleData.cardId).scores[_roleData.scoreType];//卡牌对应主题的属性分数
+
+            CardData cardData = CardDataManager.GetCardDataById(_roleData.cardId);
+            _roleData.cardScore = _roleData.cardId <= 0 || cardData == null ? 0 : cardData.scores[_roleData.scoreType];//卡牌对应主题的属性分数
 
 
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);

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

@@ -53,7 +53,7 @@ namespace GFGGame
             subType = 0;//MainStoryDataManager.GetChapterSubType(MainStoryDataManager.currentChapterCfgId);
             if (this.viewData != null)
             {
-                subType = (int)this.viewData;
+                subType = (int)(this.viewData as object[])[0];
             }
             _ui.m_listType.selectedIndex = subType;
             UpdateList();
@@ -96,7 +96,7 @@ namespace GFGGame
             StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(chapterID);
             if (MainStoryDataManager.CheckChapterUnlock(chapterID))
             {
-                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, chapterID, new object[] { ViewName.STORY_CHAPTER_LIST_VIEW, _ui.m_listType.selectedIndex });
+                ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, chapterID, new object[] { ViewName.STORY_CHAPTER_LIST_VIEW, new object[] { _ui.m_listType.selectedIndex } });
                 this.Hide();
             }
             else

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

@@ -37,7 +37,7 @@ namespace GFGGame
                     {
                         index = 1;
                     }
-                    ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW, index, null, true);
+                    ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW, new object[] { index }, null, true);
                 }
                 else
                 {