huangxiaoyue преди 1 година
родител
ревизия
cb92dddd72

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

@@ -294,5 +294,44 @@ namespace GFGGame
 
             return matchedValue;
         }
+
+
+        //茶话会个人奖励是否可以领取
+        public bool CheckTeaPartyPersonRewardCanGet(int targetScore)
+        {
+            var roleTeapartyInfoProto = LeagueDataManager.Instance.RoleTeapartyInfoProto;
+
+            ET.Log.Debug("打印测试----------infoinfo-------" + roleTeapartyInfoProto.PerAwardStatusVs.Count);
+
+            foreach (var info in roleTeapartyInfoProto.PerAwardStatusVs) {
+
+
+                //if (targetScore) { 
+                    
+
+                    
+                //}
+
+
+            }
+            return false;
+        }
+
+        //茶话会个人奖励是否可以领取
+        public bool CheckTeaPartyRewardCanGet(int targetScore)
+        {
+            var roleTeapartyInfoProto = LeagueDataManager.Instance.RoleTeapartyInfoProto;
+
+            foreach (var info in roleTeapartyInfoProto.LeagueAwardStatusVs)
+            {
+                ET.Log.Debug("打印测试----------infoinfo-------" + info);
+                //if (targetScore) { 
+
+
+
+                //}
+            }
+            return false;
+        }
     }
 }

+ 33 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/LeagueSproxy.cs

@@ -911,5 +911,38 @@ namespace GFGGame
             return false;
         }
 
+        //领取个人评分奖励
+        public static async ETTask<bool> GetPerRatingAward(int score)
+        {
+            S2C_GetPerRatingAward response = null;
+
+            response = (S2C_GetPerRatingAward)await MessageHelper.SendToServer(new C2S_GetPerRatingAward() { Score = score });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    //LeagueDataManager.Instance.RoleContainerList = response.PerScore;
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //领取雅集评分奖励
+        public static async ETTask<bool> GetLeagueRatingAward(int score)
+        {
+            S2C_GetLeagueRatingAward response = null;
+
+            response = (S2C_GetLeagueRatingAward)await MessageHelper.SendToServer(new C2S_GetLeagueRatingAward() { Score = score });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    //LeagueDataManager.Instance.RoleContainerList = response.PerScore;
+                    return true;
+                }
+            }
+            return false;
+        }
     }
 }

+ 13 - 11
GameClient/Assets/Game/HotUpdate/Views/League/LeagueTeaPartyRewardView.cs

@@ -71,6 +71,7 @@ namespace GFGGame
             var pos = _ui.m_StartIndex.position;
             var endX = _ui.m_EndIndex.position.x;
             _ui.m_barPerson.max = maxScore;
+            _ui.m_barPerson.value = LeagueDataManager.Instance.RoleTeapartyInfoProto.PerScore;
             //Ñ­»·ÉèÖÃUI
             foreach (var cfg in teapartyRewardRoleCfg)
             {
@@ -113,14 +114,14 @@ namespace GFGGame
         private async void OnClickReward(EventContext context)
         {
             if (!(context.sender is GObject btnGet)) return;
-            var activity7DaysCfg = (Activity7DaysCfg)btnGet.data;
-            var id = activity7DaysCfg.id;
-            if (!ActivityDay7DataManager.Instance.CheckActivityDay7RewardCanGet(id))
+            int[][] stageReward = (int[][])btnGet.data;
+            int id = stageReward[0][0];
+            if (!LeagueDataManager.Instance.CheckTeaPartyPersonRewardCanGet(id))
             {
-                GoodsItemTipsController.ShowItemTips(activity7DaysCfg.bonusArr[0][0]);
+                GoodsItemTipsController.ShowItemTips(id);
                 return;
             }
-            var result = await ActivityDay7SProxy.ReqGetActivityDay7Reward(activity7DaysCfg);
+            var result = await LeagueSproxy.GetPerRatingAward(id);
             if (!result) return;
             FreshGetStatus();
         }
@@ -134,7 +135,8 @@ namespace GFGGame
             var maxScore = maxCfg.targetScore;
             var pos = _ui.m_StartLeagueIndex.position;
             var endX = _ui.m_EndLeagueIndex.position.x;
-            _ui.m_barPerson.max = maxScore;
+            _ui.m_barGroups.max = maxScore;
+            _ui.m_barGroups.value = LeagueDataManager.Instance.RoleTeapartyInfoProto.LeagueScore;
             //Ñ­»·ÉèÖÃUI
             foreach (var cfg in teapartyRewardLeagueCfgs)
             {
@@ -177,14 +179,14 @@ namespace GFGGame
         private async void OnClickLeagueReward(EventContext context)
         {
             if (!(context.sender is GObject btnGet)) return;
-            var activity7DaysCfg = (Activity7DaysCfg)btnGet.data;
-            var id = activity7DaysCfg.id;
-            if (!ActivityDay7DataManager.Instance.CheckActivityDay7RewardCanGet(id))
+            int[][] stageReward = (int[][])btnGet.data;
+            int id = stageReward[0][0];
+            if (!LeagueDataManager.Instance.CheckTeaPartyPersonRewardCanGet(id))
             {
-                GoodsItemTipsController.ShowItemTips(activity7DaysCfg.bonusArr[0][0]);
+                GoodsItemTipsController.ShowItemTips(id);
                 return;
             }
-            var result = await ActivityDay7SProxy.ReqGetActivityDay7Reward(activity7DaysCfg);
+            var result = await LeagueSproxy.GetPerRatingAward(id);
             if (!result) return;
             FreshGetStatus();
         }