guodong 2 жил өмнө
parent
commit
b867f90d5d

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Data/FriendDataManager.cs

@@ -23,6 +23,15 @@ namespace GFGGame
             }
         }
 
+        //可领取体力的上限值
+        public int maxGetPowerCount
+        {
+            get
+            {
+                return GlobalCfgArray.globalCfg.maxGetPowerCount + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.MonthCardFriendPowerAdd);
+            }
+        }
+
         private Dictionary<long, FriendInfoData> _friendDic = new Dictionary<long, FriendInfoData>();//好友列表
         private List<FriendInfoData> _list = new List<FriendInfoData>();
         public List<FriendInfoData> FriendDatas

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -115,7 +115,7 @@ namespace GFGGame
         /// <returns></returns>
         public bool GetFriendGiftRed()
         {
-            if (FriendDataManager.Instance.Count >= GlobalCfgArray.globalCfg.maxGetPowerCount) return false;
+            if (FriendDataManager.Instance.Count >= FriendDataManager.Instance.maxGetPowerCount) return false;
 
             List<FriendInfoData> friendInfos = FriendDataManager.Instance.FriendDatas;
             for (int i = 0; i < friendInfos.Count; i++)

+ 9 - 1
GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs

@@ -44,6 +44,14 @@ namespace GFGGame
             }
         }
 
+        public static int powerLimit
+        {
+            get
+            {
+                return GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit) + GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardPowerLimitAdd);
+            }
+        }
+
         public static long gold
         {
             get
@@ -186,7 +194,7 @@ namespace GFGGame
 
         public static bool CheckPowerFull()
         {
-            return RoleDataManager.power >= GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit);
+            return RoleDataManager.power >= powerLimit;
         }
 
         public static void InitServerData()

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

@@ -249,7 +249,7 @@ namespace GFGGame
                     {
                         FriendDataManager.Instance.ChangeGiveTakeGiftStates(response.FriendIds[i], response.GiveGiftStates[i], response.TakeGiftStates[i]);
                     }
-                    if (FriendDataManager.Instance.Count >= GlobalCfgArray.globalCfg.maxGetPowerCount)
+                    if (FriendDataManager.Instance.Count >= FriendDataManager.Instance.maxGetPowerCount)
                     {
                         PromptController.Instance.ShowFloatTextPrompt("今日体力已全部领取");
                     }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -102,7 +102,7 @@ namespace GFGGame
         }
         private void UpdateNumeric()
         {
-            _valueBar.m_btnPower.target.text = string.Format("{0}/{1}", RoleDataManager.power, GameGlobal.myNumericComponent.GetAsInt(NumericType.PowerLimit));
+            _valueBar.m_btnPower.target.text = string.Format("{0}/{1}", RoleDataManager.power, RoleDataManager.powerLimit);
         }
 
         //ժ�ǣ��齱���һ�

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -190,7 +190,7 @@ namespace GFGGame
 
         private void OnBtnSendAllClick()
         {
-            if (RedDotDataManager.Instance.GetFriendGiftRed() && FriendDataManager.Instance.Count < GlobalCfgArray.globalCfg.maxGetPowerCount)
+            if (RedDotDataManager.Instance.GetFriendGiftRed() && FriendDataManager.Instance.Count < FriendDataManager.Instance.maxGetPowerCount)
             {
                 FriendSProxy.ReqTakeGiftFromAllFriend().Coroutine();
             }