Browse Source

田野调查上限问题

zhangyuqian 1 year ago
parent
commit
c0c2df3968

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Data/FieldDataManager.cs

@@ -71,6 +71,10 @@ namespace GFGGame
         /// 当前难度
         /// </summary>
         public int difficulty = 0;
+        /// <summary>
+        /// 多轮可获得奖励
+        /// </summary>
+        public int accumulateReward = 0;
 
 
         /// <summary>

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Field/FieldFightInfoView.cs

@@ -92,6 +92,7 @@ namespace GFGGame
                 bool result = await FieldSProxy.ReqFieldInstanceResult();
                 if (result)
                 {
+                    FieldDataManager.Instance.accumulateReward = 0;
                     ViewManager.Show<FieldFightEndView>();
                 }
             });

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

@@ -198,7 +198,7 @@ namespace GFGGame
                 StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID + 1);
                 if (GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) < chapterCfg.lvl)
                 {
-                    PromptController.Instance.ShowFloatTextPrompt(string.Format("角色等级达到%d级开启",chapterCfg.lvl));
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("角色等级达到{0}级开启",chapterCfg.lvl));
                 }
                 else
                 {

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

@@ -179,12 +179,14 @@ namespace GFGGame
                 {
                     ViewManager.Show<FieldView>();
                     FieldDataManager _dataManager = FieldDataManager.Instance;
+                    _dataManager.accumulateReward += (FieldDataManager.Instance.difficulty + 1) * 5;
                     //这里判断如果获取的马蹄金超过上限了,就终止挑战
-                    if (_dataManager.fieldInfos.bonusWeekly >= _dataManager.fieldInfos.bonusMaxLimit)
+                    if (_dataManager.fieldInfos.bonusWeekly + _dataManager.accumulateReward >= _dataManager.fieldInfos.bonusMaxLimit)
                     {
                         AlertUI.Show("本周可获得奖励已达上限,是否继续挑战?")
                         .SetLeftButton(true, "取消",async (object data) =>
                         {
+                            _dataManager.accumulateReward = 0;
                             ViewManager.Show<FieldView>();
                             bool result = await FieldSProxy.ReqFieldInstanceResult();
                             if (result)
@@ -192,14 +194,19 @@ namespace GFGGame
                                 ViewManager.Show<FieldFightEndView>();
                             }
                         })
-                        .SetRightButton(true, "确认",(object data) =>
+                        .SetRightButton(true, "确认", async (object data) =>
                         {
-                                InstanceZonesDataManager.currentCardId = FieldFightDataManager.Instance.CurrentCardId;
-                                InstanceZonesDataManager.currentScoreType = FieldFightDataManager.Instance.CurrentScoreType;
-                                InstanceZonesDataManager.currentLevelCfgId = FieldFightDataManager.Instance.currentLevelCfgId;
-
-                                ViewManager.Hide<FieldView>();
-                                ViewManager.Show<StoryFightTargetView>();
+                            bool result = await FieldSProxy.ReqFieldInstanceResult();
+                            _dataManager.accumulateReward = 0;
+                            ViewManager.Hide<FieldView>();
+                            FieldCfg _curCfg = FieldCfgArray.Instance.dataArray[FieldDataManager.Instance.difficulty]; 
+                            LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.TIAN_YE_DIAO_CHA, 2);
+                            int curLevelId = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_curCfg.type, 0, _curCfg.id)[0].id;
+                            DressUpFightType dressUpFightType = new DressUpFightType();
+                            dressUpFightType.levelID = curLevelId;
+                            dressUpFightType.teaPartID = 0;
+                            ViewManager.Show<DressUpFightView>(dressUpFightType, new object[] { typeof(FieldView).FullName, this.viewData }, true);
+                            InstanceZonesDataManager.currentLevelCfgId = curLevelId;
                         });
                     }
                     else