zhaoyang 2 жил өмнө
parent
commit
ce96809812

+ 3 - 3
FGUIProject/assets/Main/MainUI.xml

@@ -74,13 +74,13 @@
       <relation target="" sidePair="left-left,top-top"/>
       <Button title="活动" icon="ui://mfvz4q8kvolsof"/>
     </component>
-    <component id="n78_bhmm" name="btnActivityDay7" src="t6j1ow" fileName="components/BtnModle2.xml" xy="28,609" size="141,159" group="n89_vols">
+    <component id="n78_bhmm" name="btnActivityDay7" src="t6j1ow" fileName="components/BtnModle2.xml" xy="28,609" group="n89_vols">
       <Button title="七日活动" icon="ui://mfvz4q8kvolsoh"/>
     </component>
-    <component id="n75_mbf1" name="btnActivityLuckyBox" src="t6j1ow" fileName="components/BtnModle2.xml" xy="28,778" size="141,159" group="n89_vols">
+    <component id="n75_mbf1" name="btnActivityLuckyBox" src="t6j1ow" fileName="components/BtnModle2.xml" xy="28,784" group="n89_vols">
       <Button title="镜花水月" icon="ui://mfvz4q8kvolsog"/>
     </component>
-    <group id="n89_vols" name="n89" xy="0,314" size="411,623" group="n52_qqat" advanced="true" layout="vt" lineGap="10" excludeInvisibles="true">
+    <group id="n89_vols" name="n89" xy="0,314" size="411,635" group="n52_qqat" advanced="true" layout="vt" lineGap="10" excludeInvisibles="true">
       <relation target="" sidePair="left-left,top-top"/>
     </group>
     <group id="n52_qqat" name="grpLeft" xy="0,160" size="1130,1760" group="n59_oju1" advanced="true"/>

+ 8 - 8
FGUIProject/assets/Main/components/BtnModle2.xml

@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="141,159" extention="Button">
+<component size="141,165" extention="Button">
   <controller name="button" pages="0,up,1,down" selected="0"/>
   <displayList>
-    <loader id="n4_wg7t" name="icon" xy="70,51" pivot="0.5,0.5" anchor="true" size="127,102" group="n14_t6j1" url="ui://mfvz4q8kvolsog" align="center"/>
-    <image id="n5_vols" name="n5" src="volsoe" fileName="imagesNew/zjm_tb_db_hd.png" xy="30,100" pivot="0.5,0" size="81,29" group="n14_t6j1">
+    <loader id="n4_wg7t" name="icon" xy="65,70" pivot="0.5,0.5" anchor="true" size="175,140" group="n14_t6j1" url="ui://mfvz4q8kvolsog" align="center" autoSize="true"/>
+    <image id="n5_vols" name="n5" src="volsoe" fileName="imagesNew/zjm_tb_db_hd.png" xy="30,108" pivot="0.5,0" size="81,29" group="n14_t6j1">
       <relation target="n7_vols" sidePair="width-width,height-height"/>
     </image>
-    <text id="n7_vols" name="title" xy="39,92" pivot="0.5,0" size="63,41" group="n14_t6j1" font="ui://eg2y0ldpa0cftkz" fontSize="30" color="#ffffff" align="center" strokeColor="#936f37" text="首充"/>
-    <group id="n14_t6j1" name="n14" xy="6,0" size="127,133" advanced="true"/>
-    <image id="n10_vols" name="n10" src="volsoa" fileName="imagesNew/zjm_hd_sj_db.png" xy="14,132" pivot="0.5,0" group="n11_vols">
+    <text id="n7_vols" name="title" xy="39,100" pivot="0.5,0" size="63,41" group="n14_t6j1" font="ui://eg2y0ldpa0cftkz" fontSize="30" color="#ffffff" align="center" strokeColor="#936f37" text="首充"/>
+    <group id="n14_t6j1" name="n14" xy="-22,0" size="175,141" advanced="true"/>
+    <image id="n10_vols" name="n10" src="volsoa" fileName="imagesNew/zjm_hd_sj_db.png" xy="14,140" pivot="0.5,0" group="n11_vols">
       <relation target="n9_vols" sidePair="width-width,height-height"/>
     </image>
-    <text id="n9_vols" name="txtTime" xy="20,123" pivot="0.5,0" size="100,39" group="n11_vols" fontSize="28" color="#775839" text="03:58:28"/>
-    <group id="n11_vols" name="grpTime" xy="14,123" size="112,39" advanced="true"/>
+    <text id="n9_vols" name="txtTime" xy="20,131" pivot="0.5,0" size="100,39" group="n11_vols" fontSize="28" color="#775839" text="03:58:28"/>
+    <group id="n11_vols" name="grpTime" xy="14,131" size="112,39" advanced="true"/>
   </displayList>
   <Button/>
 </component>

+ 73 - 27
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -70,14 +70,7 @@ namespace GFGGame
             return false;
         }
 
-        /// <summary>
-        /// 七天签到
-        /// </summary>
-        /// <returns></returns>
-        public bool GetDailyLoginRed()
-        {
-            return ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.CAN_GET;
-        }
+
 
         /// <summary>
         /// 有邮件未读或未领奖励
@@ -434,25 +427,7 @@ namespace GFGGame
             }
             return false;
         }
-        /// <summary>
-        /// 限时累充可领奖励红点
-        /// </summary>
-        /// <returns></returns>
-        public bool GetLimiteChargeRewardRed()
-        {
-            if (ActivityDataManager.Instance.actLimitChargeId == 0) return false;
-            ActivityInfo _activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
-            if (_activityInfo == null) return false;
-            List<ActivityRechargeCfg> _rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(ActivityDataManager.Instance.actLimitChargeId);
-            for (int i = 0; i < _rechargeCfgs.Count; i++)
-            {
-                if (_activityInfo.CountValue >= _rechargeCfgs[i].value && _activityInfo.GetRewards.IndexOf(_rechargeCfgs[i].id) < 0)
-                {
-                    return true;
-                }
-            }
-            return false;
-        }
+
         /// <summary>
         /// 限时抽奖活动奖励
         /// </summary>
@@ -556,6 +531,77 @@ namespace GFGGame
         //
         //     return false;
         // }
+        /// <summary>
+        /// 福利大厅
+        /// </summary>
+        /// <returns></returns>
+        public bool GetDailyWelfareRed()
+        {
+            return GetLimiteChargeRewardRed() || GetSevenDayLoginRed() || DailySignRed() || DailySupplyRed();
+        }
+        /// <summary>
+        ///福利大厅-限时累充可领奖励红点
+        /// </summary>
+        /// <returns></returns>
+        public bool GetLimiteChargeRewardRed()
+        {
+            if (ActivityDataManager.Instance.actLimitChargeId == 0) return false;
+            ActivityInfo _activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
+            if (_activityInfo == null) return false;
+            List<ActivityRechargeCfg> _rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(ActivityDataManager.Instance.actLimitChargeId);
+            for (int i = 0; i < _rechargeCfgs.Count; i++)
+            {
+                if (_activityInfo.CountValue >= _rechargeCfgs[i].value && _activityInfo.GetRewards.IndexOf(_rechargeCfgs[i].id) < 0)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+        /// <summary>
+        /// 福利大厅-七天登录
+        /// </summary>
+        /// <returns></returns>
+        public bool GetSevenDayLoginRed()
+        {
+            return ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.CAN_GET;
+        }
+        /// <summary>
+        /// 福利大厅-每日签到
+        /// </summary>
+        /// <returns></returns>
+        public bool DailySignRed()
+        {
+            int _signCount = MathHelper.CountOnes(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay));
+            List<DailySignCfg> signCfgs = DailySignCfgArray.Instance.GetCfgsBymonth(TimeUtil.GetCurMonth());
+            for (int i = 0; i < signCfgs.Count; i++)
+            {
+                bool isGot = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignReward), signCfgs[i].day);
+                if (_signCount >= signCfgs[i].day && !isGot) return true;
+            }
+            return !MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay), TimeUtil.GetCurDay());
+        }
+        /// <summary>
+        /// 福利大厅-每日补给
+        /// </summary>
+        /// <returns></returns>
+        public bool DailySupplyRed()
+        {
+            for (int i = 0; i < DailySupplyCfgArray.Instance.dataArray.Length; i++)
+            {
+                DailySupplyCfg supplyCfg = DailySupplyCfgArray.Instance.dataArray[i];
+                long openTime = TimeUtil.GetCurDayTime(TimeUtil.GetDateTime(supplyCfg.openTime).ToString("HH:mm:ss"));
+                long endTime = TimeUtil.GetCurDayTime(TimeUtil.GetDateTime(supplyCfg.endTime).ToString("HH:mm:ss"));
+
+                bool isGet = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.DailySupplyReward), supplyCfg.id);
 
+                long curTime = TimeHelper.ServerNow();
+                if (!isGet && curTime > openTime && curTime < endTime)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/ActivitySProxy.cs

@@ -47,7 +47,7 @@ namespace GFGGame
 
                     BonusController.TryShowBonusList(rewards);
 
-
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
                     return true;
                 }
             }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/DailyWelfareSProxy.cs

@@ -17,6 +17,7 @@ namespace GFGGame
                     // DailyWelfareManager.Instance.DailySignDatas.Add(DateTime.Now.Day);
                     List<ItemData> bonus = ItemUtil.CreateItemDataList(response.reward);
                     BonusController.TryShowBonusList(bonus);
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
                     return true;
                 }
             }
@@ -51,6 +52,7 @@ namespace GFGGame
                     // DailyWelfareManager.Instance.AccumulatedSignDatas.Add(day);
                     List<ItemData> bonus = ItemUtil.CreateItemDataList(response.reward);
                     BonusController.TryShowBonusList(bonus);
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
                     return true;
                 }
             }
@@ -68,6 +70,7 @@ namespace GFGGame
                     // DailyWelfareManager.Instance.SupplyRewardDatas.Add(id);
                     DailySupplyCfg supplyCfg = DailySupplyCfgArray.Instance.GetCfg(id);
                     BonusController.TryShowBonusList(supplyCfg.bonusArr);
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
                     return true;
                 }
             }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailyWelfareView.cs

@@ -129,6 +129,9 @@ namespace GFGGame
         private void UpdateRedDot()
         {
             RedDotController.Instance.SetComRedDot(_ui.m_comList.m_btnLimitChargeAddUp.target, RedDotDataManager.Instance.GetLimiteChargeRewardRed(), "", -40);
+            RedDotController.Instance.SetComRedDot(_ui.m_comList.m_btnSevenDayLogin.target, RedDotDataManager.Instance.GetSevenDayLoginRed(), "", -40);
+            RedDotController.Instance.SetComRedDot(_ui.m_comList.m_btnSign.target, RedDotDataManager.Instance.DailySignRed(), "", -40);
+            RedDotController.Instance.SetComRedDot(_ui.m_comList.m_btnSupply.target, RedDotDataManager.Instance.DailySupplyRed(), "", -40);
         }
     }
 }

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

@@ -1019,7 +1019,7 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_ui.m_headBar.target, RedDotDataManager.Instance.GetHeadRed() || RedDotDataManager.Instance.GetHeadBorderRed(), "", 5, 7);
             RedDotController.Instance.SetComRedDot(_ui.m_btnTravel.target, RedDotDataManager.Instance.GetTravelRed(), "", -38);
             RedDotController.Instance.SetComRedDot(_btnLeague, RedDotDataManager.Instance.GetLeagueMemberJoinRed() || LeagueDataManager.Instance.Type == LeagueJoinType.UnJoin || RedDotDataManager.Instance.GetLeagueGiftBoxRed());
-            RedDotController.Instance.SetComRedDot(_ui.m_btnDailyWelfare.target, RedDotDataManager.Instance.GetLimiteChargeRewardRed(), "", -10, 5);
+            RedDotController.Instance.SetComRedDot(_ui.m_btnDailyWelfare.target, RedDotDataManager.Instance.GetDailyWelfareRed(), "", -10, 5);
             RedDotController.Instance.SetComRedDot(_ui.m_btnActivityLuckyBox.target, RedDotDataManager.Instance.GetMeiRiTeHuiRed() || RedDotDataManager.Instance.GetActLuckyBoxRewardRed() || RedDotDataManager.Instance.GetActLuckyBoxTaskdRed() || RedDotDataManager.Instance.GetGiftBagRewardRed(), "", -10, 5);
             RedDotController.Instance.SetComRedDot(_btnBag, RedDotDataManager.Instance.GetMainBagGiftRed());
             RedDotController.Instance.SetComRedDot(_ui.m_btnActivityDay7.target, RedDotDataManager.Instance.GetActivityDay7Red());

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes