瀏覽代碼

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

guodong 1 年之前
父節點
當前提交
6af75b52b6

+ 15 - 0
GameClient/Assets/Game/HotUpdate/Data/ActivityTeaDataManager.cs

@@ -52,5 +52,20 @@ namespace Assets.Game.HotUpdate.Data
             }
             return false;
         }
+        //获取华容道可用次数
+        public bool CheckHRDRed()
+        {
+            RoleLimitData limitData;
+            limitData = RoleLimitDataManager.GetLimitData(300);
+            int times = limitData.TotalPlayMax - limitData.PlayTimes;
+            if(times > 0 && ActivityTeaDataManager.Instance.CheckOpenOne(ActivityType.AfternoonLeisure))
+            {
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
     }
 }

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Data/InstanceZonesDataManager.cs

@@ -390,6 +390,12 @@ namespace GFGGame
                 var limitData = RoleLimitDataManager.GetLimitData(studioCfg.limit);
                 times = Math.Min(times, limitData.TotalPlayMax - limitData.PlayTimes);
             }
+            else if(type == ConstInstanceZonesType.PureFight && subType == 1)
+            {
+                var zcjbFightCfg = ActivityFightCfgArray.Instance.GetCfg(levelCfg.chapterId);
+                var limitData = RoleLimitDataManager.GetLimitData(zcjbFightCfg.limit);
+                times = Math.Min(times, 10);
+            }
             title = string.Format("挑战{0}次", NumberUtil.GetChiniseNumberText(times));
         }
         public static void GetTotalProgress(out int count, out int totalCount)

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/ActivityAfternoonTea/ActivityTeaMainView.cs

@@ -47,6 +47,7 @@ namespace GFGGame
         {
             base.OnShown();
             RedDotController.Instance.SetComRedDot(_ui.m_twoViewIcon, ActivityTeaDataManager.Instance.GetRewardRed());
+            RedDotController.Instance.SetComRedDot(_ui.m_oneViewIcon, ActivityTeaDataManager.Instance.CheckHRDRed(),"",-70);
         }
 
         protected override void OnHide()

+ 0 - 1
GameClient/Assets/Game/HotUpdate/Views/ActivityMainTips/ZCJBBuyTipsView.cs

@@ -61,7 +61,6 @@ namespace GFGGame
         private void OnClickBtnSure()
         {
             RoleLimitSProxy.ReqBuyLimitPlayTimes(500, 1, 1).Coroutine();
-            EventAgent.DispatchEvent(ConstMessage.NUMERIC_CHANGE);
         }
         private void LimitChanged(EventContext context = null)
         {

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

@@ -55,6 +55,7 @@ namespace GFGGame
         {
             base.AddEventListener();
             EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateBtnFightTimes);
+            EventAgent.AddEventListener(ConstMessage.NOTICE_LIMIT_CHANGED, UpdateBtnFightTimes);
         }
         protected override void OnShown()
         {
@@ -83,6 +84,7 @@ namespace GFGGame
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateBtnFightTimes);
             EventAgent.RemoveEventListener(ConstMessage.NOTICE_LIMIT_CHANGED, UpdateVisitNum);
+            EventAgent.RemoveEventListener(ConstMessage.NOTICE_LIMIT_CHANGED, UpdateBtnFightTimes);
         }
         private void OnClickBtnStart()
         {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -945,7 +945,7 @@ namespace GFGGame
             if (_ui.m_btnTea.target.visible)
             {
                 if (redPointUpdateFrame == 19)
-                    RedDotController.Instance.SetComRedDot(_ui.m_btnTea.target, ActivityTeaDataManager.Instance.GetRewardRed(), "", -24, -3);
+                    RedDotController.Instance.SetComRedDot(_ui.m_btnTea.target, ActivityTeaDataManager.Instance.GetRewardRed() || ActivityTeaDataManager.Instance.CheckHRDRed(), "", -24, -3);
             }
             // 招财进宝活动
             if (_ui.m_btnActivityZCJB.target.visible)