Просмотр исходного кода

茶话会入口提示,角色提示,结束界面返回

huangxiaoyue 1 год назад
Родитель
Сommit
0f685006c7

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Data/LeagueDataManager.cs

@@ -32,7 +32,7 @@ namespace GFGGame
         public Dictionary<int, List<LeagueAnswerData>> ListAnswerRankDatas = new Dictionary<int, List<LeagueAnswerData>>();//答题排行榜数据,int:type//0:周排行 1:上周排行
         public Dictionary<int, List<LeagueAnswerData>> ListAnswerRankDatas = new Dictionary<int, List<LeagueAnswerData>>();//答题排行榜数据,int:type//0:周排行 1:上周排行
         public int TeaPartyId = 0; //茶会期数 --未开启则期数为0
         public int TeaPartyId = 0; //茶会期数 --未开启则期数为0
         public int TeaPartyStatus = 0; // 0未开启 1集结中 2已集结
         public int TeaPartyStatus = 0; // 0未开启 1集结中 2已集结
-        public RoleTeapartyInfoProto RoleTeapartyInfoProto = new RoleTeapartyInfoProto(); // 玩家本期茶话会参与信息
+        public RoleTeapartyInfoProto RoleTeapartyInfo = new RoleTeapartyInfoProto(); // 玩家本期茶话会参与信息
         public List<RoleContainerProto> RoleContainerList = new List<RoleContainerProto>(); // 茶会每个扮演角色坑位信息
         public List<RoleContainerProto> RoleContainerList = new List<RoleContainerProto>(); // 茶会每个扮演角色坑位信息
         public long TeaPartyCloseTime = 0; // 茶话会结束时间
         public long TeaPartyCloseTime = 0; // 茶话会结束时间
         public int ChooseTeaPartId = 0; // 选择的茶话会类型
         public int ChooseTeaPartId = 0; // 选择的茶话会类型
@@ -304,11 +304,11 @@ namespace GFGGame
         //茶话会个人奖励当前状态
         //茶话会个人奖励当前状态
         public int CheckTeaPartyPersonRewardStatu(int targetScore)
         public int CheckTeaPartyPersonRewardStatu(int targetScore)
         {
         {
-            var roleTeapartyInfoProto = LeagueDataManager.Instance.RoleTeapartyInfoProto;
+            var roleTeapartyInfo = LeagueDataManager.Instance.RoleTeapartyInfo;
             var teapartyRewardRoleCfg = TeapartyRewardRoleCfgArray.Instance.dataArray;
             var teapartyRewardRoleCfg = TeapartyRewardRoleCfgArray.Instance.dataArray;
             for (int i = 0; i < teapartyRewardRoleCfg.Length; i++) {
             for (int i = 0; i < teapartyRewardRoleCfg.Length; i++) {
                 if (teapartyRewardRoleCfg[i].targetScore == targetScore) {
                 if (teapartyRewardRoleCfg[i].targetScore == targetScore) {
-                    return roleTeapartyInfoProto.PerAwardStatusVs[i];
+                    return roleTeapartyInfo.PerAwardStatusVs[i];
                 }
                 }
             }
             }
             return 0;
             return 0;
@@ -324,13 +324,13 @@ namespace GFGGame
         //茶话会雅集奖励是否可以领取
         //茶话会雅集奖励是否可以领取
         public int CheckTeaPartyLeagueRewardStatu(int targetScore)
         public int CheckTeaPartyLeagueRewardStatu(int targetScore)
         {
         {
-            var roleTeapartyInfoProto = LeagueDataManager.Instance.RoleTeapartyInfoProto;
+            var roleTeapartyInfo = LeagueDataManager.Instance.RoleTeapartyInfo;
             var teapartyRewardLeagueCfgs = TeapartyRewardLeagueCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId); 
             var teapartyRewardLeagueCfgs = TeapartyRewardLeagueCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId); 
             for (int i = 0; i < teapartyRewardLeagueCfgs.Count; i++)
             for (int i = 0; i < teapartyRewardLeagueCfgs.Count; i++)
             {
             {
                 if (teapartyRewardLeagueCfgs[i].targetScore == targetScore)
                 if (teapartyRewardLeagueCfgs[i].targetScore == targetScore)
                 {
                 {
-                    return roleTeapartyInfoProto.LeagueAwardStatusVs[i];
+                    return roleTeapartyInfo.LeagueAwardStatusVs[i];
                 }
                 }
             }
             }
             return 0;
             return 0;

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

@@ -15,7 +15,7 @@ namespace UI.League
         public GTextField m_txtRule;
         public GTextField m_txtRule;
         public GTextField m_txtTime;
         public GTextField m_txtTime;
         public GButton m_btnAnswer;
         public GButton m_btnAnswer;
-        public GTextField m_txtRule_2;
+        public GTextField m_txtPlayRule;
         public const string URL = "ui://tw70qm9dpvb452";
         public const string URL = "ui://tw70qm9dpvb452";
         public const string PACKAGE_NAME = "League";
         public const string PACKAGE_NAME = "League";
         public const string RES_NAME = "LeagueAnswerUI";
         public const string RES_NAME = "LeagueAnswerUI";
@@ -71,7 +71,7 @@ namespace UI.League
             m_txtRule = (GTextField)comp.GetChild("txtRule");
             m_txtRule = (GTextField)comp.GetChild("txtRule");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_btnAnswer = (GButton)comp.GetChild("btnAnswer");
             m_btnAnswer = (GButton)comp.GetChild("btnAnswer");
-            m_txtRule_2 = (GTextField)comp.GetChild("txtRule");
+            m_txtPlayRule = (GTextField)comp.GetChild("txtPlayRule");
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
@@ -84,7 +84,7 @@ namespace UI.League
             m_txtRule = null;
             m_txtRule = null;
             m_txtTime = null;
             m_txtTime = null;
             m_btnAnswer = null;
             m_btnAnswer = null;
-            m_txtRule_2 = null;
+            m_txtPlayRule = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {
                 target.RemoveFromParent();
                 target.RemoveFromParent();

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/League/UI_TeaPartyItemTips.cs

@@ -8,6 +8,8 @@ namespace UI.League
     {
     {
         public GComponent target;
         public GComponent target;
         public GGraph m_touch;
         public GGraph m_touch;
+        public GTextField m_txtName;
+        public GTextField m_txtDesc;
         public GGroup m_window;
         public GGroup m_window;
         public const string URL = "ui://tw70qm9dchwotpu";
         public const string URL = "ui://tw70qm9dchwotpu";
         public const string PACKAGE_NAME = "League";
         public const string PACKAGE_NAME = "League";
@@ -57,11 +59,15 @@ namespace UI.League
         private void Init(GComponent comp)
         private void Init(GComponent comp)
         {
         {
             m_touch = (GGraph)comp.GetChild("touch");
             m_touch = (GGraph)comp.GetChild("touch");
+            m_txtName = (GTextField)comp.GetChild("txtName");
+            m_txtDesc = (GTextField)comp.GetChild("txtDesc");
             m_window = (GGroup)comp.GetChild("window");
             m_window = (GGroup)comp.GetChild("window");
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
             m_touch = null;
             m_touch = null;
+            m_txtName = null;
+            m_txtDesc = null;
             m_window = null;
             m_window = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {

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

@@ -30,7 +30,7 @@ namespace GFGGame
     {
     {
         protected override async ETTask Run(Session session, S2C_LeagueScore message)
         protected override async ETTask Run(Session session, S2C_LeagueScore message)
         {
         {
-            LeagueDataManager.Instance.RoleTeapartyInfoProto.LeagueScore = message.LeagueScore;
+            LeagueDataManager.Instance.RoleTeapartyInfo.LeagueScore = message.LeagueScore;
             await ETTask.CompletedTask;
             await ETTask.CompletedTask;
         }
         }
     }
     }
@@ -879,7 +879,7 @@ namespace GFGGame
             {
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 if (response.Error == ErrorCode.ERR_Success)
                 {
                 {
-                    LeagueDataManager.Instance.RoleTeapartyInfoProto = response.RoleTeapartyInfo;
+                    LeagueDataManager.Instance.RoleTeapartyInfo = response.RoleTeapartyInfo;
                     return true;
                     return true;
                 }
                 }
             }
             }
@@ -970,5 +970,22 @@ namespace GFGGame
             }
             }
             return false;
             return false;
         }
         }
+
+        //领取雅集评分奖励
+        public static async ETTask<bool> GetLeagueRatingAward(long roleId)
+        {
+            S2C_ReportTeapartyComplete response = null;
+
+            response = (S2C_ReportTeapartyComplete)await MessageHelper.SendToServer(new C2S_ReportTeapartyComplete() { RoleId = roleId });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    //LeagueDataManager.Instance.RoleContainerList = response.PerScore;
+                    return true;
+                }
+            }
+            return false;
+        }
     }
     }
 }
 }

+ 7 - 4
GameClient/Assets/Game/HotUpdate/Views/League/LeagueAnswerView.cs

@@ -47,14 +47,17 @@ namespace GFGGame
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            if (this.viewData != null) {
+            if (this.viewData != null)
+            {
                 var index = (int)this.viewData;
                 var index = (int)this.viewData;
                 _ui.m_c1.selectedIndex = index;
                 _ui.m_c1.selectedIndex = index;
+                var openCfg = TeapartyOpenCfgArray.Instance.GetCfg(LeagueDataManager.Instance.TeaPartyId);
+                _ui.m_txtPlayRule.text =  TextDescCfgArray.Instance.GetCfg(300023).text + openCfg.preview;
             }
             }
-            else
+            else {
                 _ui.m_c1.selectedIndex = 0;
                 _ui.m_c1.selectedIndex = 0;
-
-            UpdateView();
+                UpdateView();
+            }
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Views/League/LeagueTeaPartyOverView.cs

@@ -55,12 +55,22 @@ namespace GFGGame
 
 
             GetRoleContainerInfos();
             GetRoleContainerInfos();
             Timers.inst.Add(2, 1, UpdateTime);
             Timers.inst.Add(2, 1, UpdateTime);
+            GetLeagueRatingAward();
+        }
+
+        private async void GetLeagueRatingAward()
+        {
+            bool result = await LeagueSproxy.GetLeagueRatingAward(RoleDataManager.roleId);
+            if (result)
+            {
+            }
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()
         {
         {
             base.OnHide();
             base.OnHide();
             Timers.inst.Remove(UpdateTime);
             Timers.inst.Remove(UpdateTime);
+            ViewManager.Show<LeagueTeaPartyView>();
         }
         }
 
 
         protected override void RemoveEventListener()
         protected override void RemoveEventListener()

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

@@ -71,7 +71,7 @@ namespace GFGGame
             var pos = _ui.m_StartIndex.position;
             var pos = _ui.m_StartIndex.position;
             var endX = _ui.m_EndIndex.position.x;
             var endX = _ui.m_EndIndex.position.x;
             _ui.m_barPerson.max = maxScore;
             _ui.m_barPerson.max = maxScore;
-            _ui.m_barPerson.value = LeagueDataManager.Instance.RoleTeapartyInfoProto.PerScore;
+            _ui.m_barPerson.value = LeagueDataManager.Instance.RoleTeapartyInfo.PerScore;
             //Ñ­»·ÉèÖÃUI
             //Ñ­»·ÉèÖÃUI
             foreach (var cfg in teapartyRewardRoleCfg)
             foreach (var cfg in teapartyRewardRoleCfg)
             {
             {
@@ -136,7 +136,7 @@ namespace GFGGame
             var pos = _ui.m_StartLeagueIndex.position;
             var pos = _ui.m_StartLeagueIndex.position;
             var endX = _ui.m_EndLeagueIndex.position.x;
             var endX = _ui.m_EndLeagueIndex.position.x;
             _ui.m_barGroups.max = maxScore;
             _ui.m_barGroups.max = maxScore;
-            _ui.m_barGroups.value = LeagueDataManager.Instance.RoleTeapartyInfoProto.LeagueScore;
+            _ui.m_barGroups.value = LeagueDataManager.Instance.RoleTeapartyInfo.LeagueScore;
             //Ñ­»·ÉèÖÃUI
             //Ñ­»·ÉèÖÃUI
             foreach (var cfg in teapartyRewardLeagueCfgs)
             foreach (var cfg in teapartyRewardLeagueCfgs)
             {
             {

+ 7 - 5
GameClient/Assets/Game/HotUpdate/Views/League/LeagueTeaPartyView.cs

@@ -48,7 +48,7 @@ namespace GFGGame
         {
         {
             UI_comTeaPartyItem itemObj = UI_comTeaPartyItem.Proxy(obj);
             UI_comTeaPartyItem itemObj = UI_comTeaPartyItem.Proxy(obj);
             Vector2 localpos = obj.position;//.LocalToGlobal();
             Vector2 localpos = obj.position;//.LocalToGlobal();
-            itemObj.m_btnDetail.data = localpos;
+            itemObj.m_btnDetail.data = index;
             itemObj.m_btnDetail.onClick.Add(OnBtnDetailClick);
             itemObj.m_btnDetail.onClick.Add(OnBtnDetailClick);
             itemObj.m_iconRole.data = index;
             itemObj.m_iconRole.data = index;
             itemObj.m_iconRole.onClick.Add(OnBtnIconRoleClick);
             itemObj.m_iconRole.onClick.Add(OnBtnIconRoleClick);
@@ -60,9 +60,9 @@ namespace GFGGame
                 itemObj.m_txtNumber.text = roleContainerList[index].PerNum.ToString();
                 itemObj.m_txtNumber.text = roleContainerList[index].PerNum.ToString();
                 itemObj.m_txtMaxName.text = roleContainerList[index].MaxScoreRoleName;
                 itemObj.m_txtMaxName.text = roleContainerList[index].MaxScoreRoleName;
             }
             }
-            var roleTeapartyInfoProto = LeagueDataManager.Instance.RoleTeapartyInfoProto;
-            if (roleTeapartyInfoProto != null)
-                itemObj.m_imgChoose.visible = index == (roleTeapartyInfoProto.TeapartyRoleId - 1);
+            var roleTeapartyInfo = LeagueDataManager.Instance.RoleTeapartyInfo;
+            if (roleTeapartyInfo != null)
+                itemObj.m_imgChoose.visible = index == (roleTeapartyInfo.TeapartyRoleId - 1);
             UI_comTeaPartyItem.ProxyEnd();
             UI_comTeaPartyItem.ProxyEnd();
         }
         }
 
 
@@ -155,11 +155,13 @@ namespace GFGGame
         private void OnBtnDetailClick(EventContext context)
         private void OnBtnDetailClick(EventContext context)
         {
         {
             GObject obj = context.sender as GObject;
             GObject obj = context.sender as GObject;
-            var pos = (Vector2)obj.data;
+            int index = (int)obj.data;
 
 
             //_ui.m_teaPartyItemTips.m_window.position = pos;
             //_ui.m_teaPartyItemTips.m_window.position = pos;
 
 
             _ui.m_teaPartyItemTips.target.visible = true;
             _ui.m_teaPartyItemTips.target.visible = true;
+            _ui.m_teaPartyItemTips.m_txtName.text = teapartyRoleCfg[index].name;
+            _ui.m_teaPartyItemTips.m_txtDesc.text = teapartyRoleCfg[index].hint;
         }
         }
 
 
         private void OnTeaPartyItemTipsClick()
         private void OnTeaPartyItemTipsClick()

+ 5 - 4
GameClient/Assets/Game/HotUpdate/Views/League/LeagueView.cs

@@ -116,11 +116,12 @@ namespace GFGGame
         }
         }
         private void OnBtnPartyClick()
         private void OnBtnPartyClick()
         {
         {
-            if (LeagueDataManager.Instance.TeaPartyStatus == 0) {
+            if (LeagueDataManager.Instance.TeaPartyStatus == 0)
                 ViewManager.Show<LeagueAnswerView>(1);
                 ViewManager.Show<LeagueAnswerView>(1);
-                return;
-            }
-            ViewManager.Show<LeagueTeaPartyView>();
+            else if (LeagueDataManager.Instance.TeaPartyStatus == 2 && !LeagueDataManager.Instance.RoleTeapartyInfo.IsComplete)
+                ViewManager.Show<LeagueTeaPartyShowView>();
+            else
+                ViewManager.Show<LeagueTeaPartyView>();
         }
         }
         private void OnBtnShopClick()
         private void OnBtnShopClick()
         {
         {

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