Explorar el Código

Merge remote-tracking branch 'remotes/origin/master' into ios_test

hexiaojie hace 11 meses
padre
commit
a8323c7578

+ 4 - 3
GameClient/Assets/Game/HotUpdate/ServerProxy/FieldWorkSproxy.cs

@@ -35,6 +35,7 @@ namespace GFGGame
                     AddDressup(response.EquipAIds, 0, 0);
                     AddDressup(response.EquipBIds, 0, 1);
                     AddDressup(response.EquipCIds, 0, 2);
+                    EventAgent.DispatchEvent(ConstMessage.FieldWork_StateCHANGE);
                 }
             }
         }
@@ -109,12 +110,12 @@ namespace GFGGame
             }) ;
             if (response != null)
             {
-                FieldWorkDataManager.Instance.MaxLevelId = response.MaxLevelId;
-                FieldWorkDataManager.Instance.HistoryDressupList = response.WeekUserItems;
                 FieldWorkDataManager.Instance.CardAbrasionInfoList = response.CardAbrasionInfoList;
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    if(response.CimbingTowerLevelInfo.IsPass)
+                    FieldWorkDataManager.Instance.MaxLevelId = response.MaxLevelId;
+                    FieldWorkDataManager.Instance.HistoryDressupList = response.WeekUserItems;
+                    if (response.CimbingTowerLevelInfo.IsPass)
                     {
                         if (FieldWorkDataManager.Instance.CimbingTowerLevelInfoList.ContainsKey(response.CimbingTowerLevelInfo.LevelId))
                         {

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaDressInfoView.cs

@@ -102,7 +102,9 @@ namespace GFGGame
 
             _ui.m_grhCloseComFightScore.visible = false;
             _ui.m_comValueInfo.m_c2.selectedIndex = 0;
+            _ui.m_btnConfire.touchable = true;
             Timers.inst.Remove(CheckGuide);
+            Timers.inst.Remove(SetConfireTouch);
         }
 
         protected override void RemoveEventListener()
@@ -125,6 +127,11 @@ namespace GFGGame
             //    ViewManager.Show(_openViewName); //打开来源界面:如历史记录、排行榜
             //}
         }
+        private void SetConfireTouch(object parm)
+        {
+            _ui.m_btnConfire.touchable = true;
+            Timers.inst.Remove(SetConfireTouch);
+        }
         private void OnClickConfire()
         {
             ViewManager.GoBackFrom(typeof(ArenaDressInfoView).FullName);
@@ -198,6 +205,8 @@ namespace GFGGame
             }
             else if (_roleType == FightRoleType.FieldWork)
             {
+                _ui.m_btnConfire.touchable = false;
+                Timers.inst.Add(1.0f,1,SetConfireTouch);
                 for (int i = 0; i < FieldWorkDataManager.Instance.ThemeList.Count; i++)
                 {
                     int scoreType = FieldWorkDataManager.Instance.ThemeList[i];

+ 35 - 27
GameClient/Assets/Game/HotUpdate/Views/FieldWork/FieldWorkLevelView.cs

@@ -206,41 +206,49 @@ namespace GFGGame
         {
             int normal = CimbingTowerCfgArray.Instance.dataArray[0].ClearanceLimit;
             int vip = CimbingTowerCfgArray.Instance.dataArray[0].VipClearanceLimit;
-            if (RoleDataManager.CheckIsMonthCardOpenByType(1) || RoleDataManager.CheckIsMonthCardOpenByType(1))
+            int canPassCount = 0;
+            int isPassCount = 0;
+            foreach (var item in FieldWorkDataManager.Instance.CimbingTowerLevelInfoList)
             {
-                int isPassCount = 0;
-                foreach (var item in FieldWorkDataManager.Instance.CimbingTowerLevelInfoList)
-                {
-                    if (item.Value.IsPass)
-                    {
-                        isPassCount++;
-                    }
-                }
-                if (isPassCount >= FieldWorkDataManager.Instance.MaxLevelId)
+                if (item.Value.IsPass)
                 {
-                    PromptController.Instance.ShowFloatTextPrompt("通关数量已超过最大可通关数量!");
-                    return;
+                    isPassCount++;
                 }
             }
+            if (RoleDataManager.CheckIsMonthCardOpenByType(1) || RoleDataManager.CheckIsMonthCardOpenByType(1))
+            {
+                canPassCount = vip;
+            }
             else
             {
-                if(FieldWorkDataManager.Instance.MaxLevelId != 0)
+                canPassCount = normal;
+            }
+            if (isPassCount > canPassCount)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("通关数量已超过最大可通关数量!");
+                return;
+            }
+            else if((isPassCount >= FieldWorkDataManager.Instance.MaxLevelId && FieldWorkDataManager.Instance.MaxLevelId < canPassCount))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("通关数量已超过最大可通关数量!");
+                return;
+            }
+            if (FieldWorkDataManager.Instance.MaxLevelId != 0)
+            {
+                AlertUI.Show("一键通关不消耗服装和词牌的使用次数,是否快速通关?")
+                .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
                 {
-                    AlertUI.Show("一键通关不消耗服装和词牌的使用次数,每周可使用一次,是否快速通关?")
-                    .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
+                    bool result = await FieldWorkSproxy.ReqFieldWorkOneClickPass();
+                    if (result)
                     {
-                        bool result = await FieldWorkSproxy.ReqFieldWorkOneClickPass();
-                        if (result)
-                        {
-                            UpdateLevel();
-                            PromptController.Instance.ShowFloatTextPrompt("一键通关成功!");
-                        }
-                    });
-                }
-                else
-                {
-                    PromptController.Instance.ShowFloatTextPrompt("暂未满足通关要求,无法使用此功能!");
-                }
+                        UpdateLevel();
+                        PromptController.Instance.ShowFloatTextPrompt("一键通关成功!");
+                    }
+                });
+            }
+            else
+            {
+                PromptController.Instance.ShowFloatTextPrompt("暂未满足通关要求,无法使用此功能!");
             }
         }
         private void CheckGuide(object param)

BIN
GameClient/Assets/ResIn/UI/FieldWork/FieldWork_fui.bytes