Переглянути джерело

雅集头像显示最高分的头像

huangxiaoyue 1 рік тому
батько
коміт
649e99933e

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/League/UI_comTeaPartyItem.cs

@@ -7,6 +7,7 @@ namespace UI.League
     public partial class UI_comTeaPartyItem
     {
         public GComponent target;
+        public GLoader m_iconRoleBg;
         public GLoader m_iconRole;
         public GTextField m_txtRoleName;
         public GTextField m_txtMaxValue;
@@ -61,6 +62,7 @@ namespace UI.League
 
         private void Init(GComponent comp)
         {
+            m_iconRoleBg = (GLoader)comp.GetChild("iconRoleBg");
             m_iconRole = (GLoader)comp.GetChild("iconRole");
             m_txtRoleName = (GTextField)comp.GetChild("txtRoleName");
             m_txtMaxValue = (GTextField)comp.GetChild("txtMaxValue");
@@ -71,6 +73,7 @@ namespace UI.League
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_iconRoleBg = null;
             m_iconRole = null;
             m_txtRoleName = null;
             m_txtMaxValue = null;

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/League/UI_comTeaPartyOverItem.cs

@@ -7,6 +7,7 @@ namespace UI.League
     public partial class UI_comTeaPartyOverItem
     {
         public GComponent target;
+        public GLoader m_iconRoleBg;
         public GLoader m_iconRole;
         public GTextField m_txtRoleName;
         public GTextField m_txtGuildName;
@@ -57,12 +58,14 @@ namespace UI.League
 
         private void Init(GComponent comp)
         {
+            m_iconRoleBg = (GLoader)comp.GetChild("iconRoleBg");
             m_iconRole = (GLoader)comp.GetChild("iconRole");
             m_txtRoleName = (GTextField)comp.GetChild("txtRoleName");
             m_txtGuildName = (GTextField)comp.GetChild("txtGuildName");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_iconRoleBg = null;
             m_iconRole = null;
             m_txtRoleName = null;
             m_txtGuildName = null;

+ 2 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/LeagueSproxy.cs

@@ -944,11 +944,11 @@ namespace GFGGame
         }
 
         //领取个人评分奖励
-        public static async ETTask<bool> GetPerRatingAward(int score)
+        public static async ETTask<bool> GetPerRatingAward(int score, long roleId)
         {
             S2C_GetPerRatingAward response = null;
 
-            response = (S2C_GetPerRatingAward)await MessageHelper.SendToServer(new C2S_GetPerRatingAward() { Score = score });
+            response = (S2C_GetPerRatingAward)await MessageHelper.SendToServer(new C2S_GetPerRatingAward() { Score = score , RoleId = roleId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)

+ 18 - 2
GameClient/Assets/Game/HotUpdate/Views/League/LeagueTeaPartyOverView.cs

@@ -87,8 +87,24 @@ namespace GFGGame
                 var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
                 for (int index = 0; index < teaPartyOverItemList.Count; index++)
                 {
-                    teaPartyOverItemList[index].m_txtRoleName.text = teapartyRoleCfg[index].name;
-                    teaPartyOverItemList[index].m_txtGuildName.text = roleContainerList[index].MaxScoreRoleName;
+                    var itemObj = teaPartyOverItemList[index];
+                    itemObj.m_txtRoleName.text = teapartyRoleCfg[index].name;
+                    itemObj.m_txtGuildName.text = roleContainerList[index].MaxScoreRoleName;
+                    var headItemId = roleContainerList[index].HeadItemId;
+                    ItemCfg itemHeadCfg = ItemCfgArray.Instance.GetCfg(5000001);
+                    if (headItemId > 0)
+                    {
+                        itemHeadCfg = ItemCfgArray.Instance.GetCfg(headItemId);
+                    }
+                    itemObj.m_iconRole.url = ResPathUtil.GetHeadPath(itemHeadCfg.res);
+
+                    var headBorderItemId = roleContainerList[index].HeadBorderItemId;
+                    ItemCfg itemBorderCfg = ItemCfgArray.Instance.GetCfg(5005001);
+                    if (headBorderItemId > 0)
+                    {
+                        itemBorderCfg = ItemCfgArray.Instance.GetCfg(headBorderItemId);
+                    }
+                    itemObj.m_iconRoleBg.url = ResPathUtil.GetHeadBorderPath(itemBorderCfg.res);
                 }
             }
         }

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

@@ -121,7 +121,7 @@ namespace GFGGame
                 GoodsItemTipsController.ShowItemTips(id);
                 return;
             }
-            var result = await LeagueSproxy.GetPerRatingAward(cfg.targetScore);
+            var result = await LeagueSproxy.GetPerRatingAward(cfg.targetScore, RoleDataManager.roleId);
             if (!result) return;
             FreshGetStatus();
         }

+ 18 - 2
GameClient/Assets/Game/HotUpdate/Views/League/LeagueTeaPartyShowView.cs

@@ -80,8 +80,24 @@ namespace GFGGame
                 var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
                 for (int index = 0; index < teaPartyOverItemList.Count; index++)
                 {
-                    teaPartyOverItemList[index].m_txtRoleName.text = teapartyRoleCfg[index].name;
-                    teaPartyOverItemList[index].m_txtGuildName.text = roleContainerList[index].MaxScoreRoleName;
+                    var itemObj = teaPartyOverItemList[index];
+                    itemObj.m_txtRoleName.text = teapartyRoleCfg[index].name;
+                    itemObj.m_txtGuildName.text = roleContainerList[index].MaxScoreRoleName;
+                    var headItemId = roleContainerList[index].HeadItemId;
+                    ItemCfg itemHeadCfg = ItemCfgArray.Instance.GetCfg(5000001);
+                    if (headItemId > 0)
+                    {
+                        itemHeadCfg = ItemCfgArray.Instance.GetCfg(headItemId);
+                    }
+                    itemObj.m_iconRole.url = ResPathUtil.GetHeadPath(itemHeadCfg.res);
+
+                    var headBorderItemId = roleContainerList[index].HeadBorderItemId;
+                    ItemCfg itemBorderCfg = ItemCfgArray.Instance.GetCfg(5005001);
+                    if (headBorderItemId > 0)
+                    {
+                        itemBorderCfg = ItemCfgArray.Instance.GetCfg(headBorderItemId);
+                    }
+                    itemObj.m_iconRoleBg.url = ResPathUtil.GetHeadBorderPath(itemBorderCfg.res);
                 }
             }
         }

+ 16 - 1
GameClient/Assets/Game/HotUpdate/Views/League/LeagueTeaPartyView.cs

@@ -53,15 +53,30 @@ namespace GFGGame
             UI_comTeaPartyItem itemObj = UI_comTeaPartyItem.Proxy(obj);
             itemObj.m_btnDetail.data = index;
             itemObj.m_btnDetail.onClick.Add(OnBtnDetailClick);
+            var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
             itemObj.m_iconRole.data = index;
             itemObj.m_iconRole.onClick.Add(OnBtnIconRoleClick);
             itemObj.m_txtRoleName.text = teapartyRoleCfg[index].name;
-            var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
             if (roleContainerList != null && roleContainerList.Count > 0)
             {
                 itemObj.m_txtMaxValue.text = roleContainerList[index].MaxScore.ToString();
                 itemObj.m_txtNumber.text = roleContainerList[index].PerNum.ToString();
                 itemObj.m_txtMaxName.text = roleContainerList[index].MaxScoreRoleName;
+                var headItemId = roleContainerList[index].HeadItemId;
+                ItemCfg itemHeadCfg = ItemCfgArray.Instance.GetCfg(5000001);
+                if (headItemId > 0)
+                {
+                    itemHeadCfg = ItemCfgArray.Instance.GetCfg(headItemId);
+                }
+                itemObj.m_iconRole.url = ResPathUtil.GetHeadPath(itemHeadCfg.res);
+
+                var headBorderItemId = roleContainerList[index].HeadBorderItemId;
+                ItemCfg itemBorderCfg = ItemCfgArray.Instance.GetCfg(5005001);
+                if (headBorderItemId > 0)
+                {
+                    itemBorderCfg = ItemCfgArray.Instance.GetCfg(headBorderItemId);
+                }
+                itemObj.m_iconRoleBg.url = ResPathUtil.GetHeadBorderPath(itemBorderCfg.res);
             }
             var roleTeapartyInfo = LeagueDataManager.Instance.RoleTeapartyInfo;
             if (roleTeapartyInfo != null)

BIN
GameClient/Assets/ResIn/UI/League/League_fui.bytes