Browse Source

田野调查-中级 失败弹窗加上系列

huangxiaoyue 2 years ago
parent
commit
341846654f

+ 0 - 1
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs

@@ -228,7 +228,6 @@ namespace GFGGame
         /// <returns></returns>
         public List<CardData> SortCardList(List<CardData> cardList, double itemSum, int scoreType)
         {
-
             int baseScore = RoleLevelCfgArray.Instance.GetCfg(RoleDataManager.lvl).baseScore;
             int leagueSkillScore = LeagueDataManager.Instance.GetAllSkillScore(scoreType);
             cardList.Sort((CardData a, CardData b) =>

+ 12 - 8
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -26,6 +26,7 @@ namespace GFGGame
         private int _currentSuitId;
         private StoryLevelCfg _levelCfg;
         private StoryFightCfg _fightCfg;
+        private int scoreType = 0;  //目标分数类型保存
 
         private const int SORT_BY_HIGH_SCORE = 0;
         private const int SORT_BY_LOW_SCORE = 1;
@@ -149,9 +150,12 @@ namespace GFGGame
             _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
             if (_levelCfg.type == ConstInstanceZonesType.Field)
             {
-                _fightCfg.scoreType = FieldDataManager.Instance.fieldInfos.theme;
+                scoreType = FieldDataManager.Instance.fieldInfos.theme;
                 _ui.m_btnAutoPlay.visible = false;
             }
+            else {
+                scoreType = _fightCfg.scoreType;
+            }
             InstanceZonesDataManager.FightScene = _levelCfg.type;
 
             _ui.m_compNeed.target.visible = _fightCfg.needItemId > 0 || _fightCfg.needSuitId > 0 || _fightCfg.needTagsArr.Length > 0;
@@ -177,7 +181,7 @@ namespace GFGGame
                     _ui.m_compNeed.m_imgGot.visible = false;
                 }
             }
-            InstanceZonesDataManager.currentScoreType = _fightCfg.scoreType;
+            InstanceZonesDataManager.currentScoreType = scoreType;
             //一级菜单
             _ui.m_comListType1.m_listType.RemoveChildrenToPool();
             _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 3;
@@ -192,7 +196,7 @@ namespace GFGGame
             _ui.m_partsList.target.x = _ui.target.width;
             _ui.m_partsList2.target.x = _ui.target.width;
             _ui.m_partsListSearch.target.x = _ui.target.width;
-            _ui.m_scoreType.url = "ui://CommonGame/kp_sx_" + _fightCfg.scoreType;
+            _ui.m_scoreType.url = "ui://CommonGame/kp_sx_" + scoreType;
             this.showListType1();
             if (_sceneObject == null)
             {
@@ -293,7 +297,7 @@ namespace GFGGame
 
         private void OnClickBtnClothingShop()
         {
-            ViewManager.Show<ClothingShopView>(new object[] { null, _fightCfg.scoreType }, null, false, true);
+            ViewManager.Show<ClothingShopView>(new object[] { null, scoreType }, null, false, true);
         }
 
         private void OnClickListType1Item(EventContext context)
@@ -566,7 +570,7 @@ namespace GFGGame
             if (CardDataManager.GetCardListByRarity(0).Count > 0)
             {
 
-                ViewManager.Show<StoryCardChoose>(_fightCfg.scoreType);
+                ViewManager.Show<StoryCardChoose>(scoreType);
             }
             else
             {
@@ -997,7 +1001,7 @@ namespace GFGGame
             }
             listItem.m_btnAni.visible = false;
             listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
-            listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + _fightCfg.scoreType;
+            listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + scoreType;
             listItem.m_txtTitle.text = partName;
             listItem.target.data = id;
             listItem.m_imgNeed.visible = _fightCfg.needItemId == id || _fightCfg.needSuitId == id;
@@ -1031,8 +1035,8 @@ namespace GFGGame
             // int mainScore;
             // int mainValuel;
             // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
-            listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + _fightCfg.scoreType);
-            listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, _fightCfg.scoreType, _fightCfg.needTagsArr);
+            listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + scoreType);
+            listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, scoreType, _fightCfg.needTagsArr);
 
             listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
             listItem.m_txtTitle.text = partName;

+ 9 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightFailView.cs

@@ -68,10 +68,18 @@ namespace GFGGame
         {
             UI_ListFailItem item = UI_ListFailItem.Proxy(gObject);
 
+            FieldDataManager _dataManager = FieldDataManager.Instance;
+
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
             item.m_grpRecommend.visible = _cfgs[index].isAdvise == 1;
-            item.m_txtDesc.text = string.Format(_cfgs[index].desc, ConstDressUpScoreType.scoreTypeList()[fightCfg.scoreType]);
+            int scoreType = 0;
+            if (fightCfg.scoreType > 0) 
+                scoreType = fightCfg.scoreType;
+            else
+                scoreType = _dataManager.fieldInfos.theme;
+
+            item.m_txtDesc.text = string.Format(_cfgs[index].desc, ConstDressUpScoreType.scoreTypeList()[scoreType]);
             if (item.m_btnGo.data == null)
             {
                 item.m_btnGo.onClick.Add(OnBtnGoClick);
@@ -79,7 +87,6 @@ namespace GFGGame
             item.m_btnGo.data = _cfgs[index];
 
             UI_ListFailItem.ProxyEnd();
-
         }
 
         private void OnBtnGoClick(EventContext context)
@@ -94,7 +101,6 @@ namespace GFGGame
             }
             if (cfg.jumpId != nameof(FirstChargeBonusView))
             {
-
                 ViewManager.Hide<StroyFightResultView>();
                 Hide();
             }