浏览代码

雅集发放福利时增加主界面Icon和雅集界面雅集福利提示红点

zhaoyang 2 年之前
父节点
当前提交
6f2da084fb

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

@@ -79,6 +79,10 @@ namespace GFGGame
         }
         public int GetMyPos()
         {
+            if (LeagueDataManager.Instance.LeagueData == null)
+            {
+                return LeaguePos.Member;
+            }
             if (LeagueDataManager.Instance.LeagueData.LeagueMemberDatas.TryGetValue(RoleDataManager.roleId, out LeagueMemberData memberData))
             {
                 return memberData.Pos;

+ 16 - 2
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -404,9 +404,23 @@ namespace GFGGame
         public bool GetLeagueMemberJoinRed()
         {
             LeagueHotelCfg hotelCfg = LeagueHotelCfgArray.Instance.GetCfg(LeagueDataManager.Instance.HotelLevel);
-            return LeagueDataManager.Instance.ListApplyDatas.Count > 0 && LeagueDataManager.Instance.LeagueData.Num < hotelCfg.limit;
+            int myPos = LeagueDataManager.Instance.GetMyPos();
+            return LeagueDataManager.Instance.Type == LeagueJoinType.Join && (myPos == LeaguePos.Owner || myPos == LeaguePos.SubOwner) && LeagueDataManager.Instance.ListApplyDatas.Count > 0 && LeagueDataManager.Instance.LeagueData.Num < hotelCfg.limit;
+        }
+        /// <summary>
+        /// 联盟-雅集福利
+        /// </summary>
+        /// <returns></returns>
+        public bool GetLeagueGiftBoxRed()
+        {
+            if (LeagueDataManager.Instance.Type == LeagueJoinType.UnJoin) return false;
+            List<LeagueGiftGetData> _getDatas = LeagueDataManager.Instance.GetGiftGetDatas();
+            for (int i = 0; i < _getDatas.Count; i++)
+            {
+                if (!_getDatas[i].IsGet) return true;
+            }
+            return false;
         }
-
         /// <summary>
         /// 限时累充可领奖励红点
         /// </summary>

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/League/LeagueView.cs

@@ -122,6 +122,7 @@ namespace GFGGame
             UpdateInfo();
             UpdateValue();
             UpdateButton();
+            UpdateRedDot();
         }
         private void UpdateInfo()
         {
@@ -170,6 +171,7 @@ namespace GFGGame
         private void UpdateRedDot()
         {
             RedDotController.Instance.SetComRedDot(_ui.m_btnMember.target, RedDotDataManager.Instance.GetLeagueMemberJoinRed());
+            RedDotController.Instance.SetComRedDot(_ui.m_btnGift.target, RedDotDataManager.Instance.GetLeagueGiftBoxRed(), "", -120, 100);
         }
     }
 }

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

@@ -1018,7 +1018,7 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_ui.m_btnStudio.target, RedDotDataManager.Instance.GetStudioFilingRed(), "", -38);
             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);
+            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_btnActivityLuckyBox.target, RedDotDataManager.Instance.GetActLuckyBoxRewardRed(), "", -10, 5);
             RedDotController.Instance.SetComRedDot(_btnBag, RedDotDataManager.Instance.GetMainBagGiftRed());