zhaoyang 2 лет назад
Родитель
Сommit
60351d7aec

+ 7 - 0
FGUIProject/assets/League/LeagueApplyUI.xml

@@ -1,6 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
   <displayList>
+    <loader id="n7_wm60" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
+      <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
+    </loader>
+    <component id="n6_wm60" name="btnback" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80">
+      <relation target="" sidePair="left-left,top-top"/>
+      <Button icon="ui://tw70qm9du2u3b"/>
+    </component>
     <component id="n0_rv09" name="btnRule" src="psphtkg" fileName="components/BtnRule.xml" pkg="eg2y0ldp" xy="742,224" size="29,29">
       <Button icon="ui://eg2y0ldpjcej2k"/>
     </component>

+ 9 - 2
FGUIProject/assets/League/LeagueMemberLogUI.xml

@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
   <displayList>
-    <list id="n6_rv09" name="list" xy="54,101" size="972,1575" overflow="scroll" defaultItem="ui://tw70qm9drv0923">
+    <loader id="n8_wm60" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
+      <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
+    </loader>
+    <component id="n7_wm60" name="btnback" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="91,125">
+      <relation target="" sidePair="left-left,top-top"/>
+      <Button icon="ui://tw70qm9du2u3b"/>
+    </component>
+    <list id="n6_rv09" name="list" xy="54,364" size="972,1312" overflow="scroll" defaultItem="ui://tw70qm9drv0923">
       <relation target="" sidePair="bottomext-bottom"/>
       <item/>
       <item/>
@@ -9,6 +16,6 @@
       <item/>
       <item/>
     </list>
-    <text id="n5_rv09" name="n5" xy="392,1792" pivot="0.5,0" size="329,42" fontSize="30" align="center" autoClearText="true" text="联盟信息只保留最近50条"/>
+    <text id="n5_rv09" name="n5" xy="390,1792" pivot="0.5,0" size="333,41" fontSize="30" align="center" autoClearText="true" text="联盟信息只保留最近50条"/>
   </displayList>
 </component>

+ 1 - 1
FGUIProject/assets/League/LeagueUI.xml

@@ -4,7 +4,7 @@
     <loader id="n0_u2u3" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
     </loader>
-    <component id="n1_u2u3" name="btnback" src="uyuxtj5" fileName="components/ButtonBack.xml" pkg="eg2y0ldp" xy="35,80">
+    <component id="n1_u2u3" name="btnback" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80">
       <relation target="" sidePair="left-left,top-top"/>
       <Button icon="ui://tw70qm9du2u3b"/>
     </component>

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

@@ -4,7 +4,7 @@ namespace GFGGame
 {
     public class LeagueDataManager : SingletonBase<LeagueDataManager>
     {
-        public int Type = 0;// 1:已经加入军团 2:未加入军团
+        public int Type = 2;// 1:已经加入军团 2:未加入军团
         public LeagueData LeagueData;//联盟信息
         public Dictionary<long, LeagueListData> ListDatas = new Dictionary<long, LeagueListData>();//联盟列表
         public Dictionary<long, OtherRoleInfoData> ListApplyDatas = new Dictionary<long, OtherRoleInfoData>();//联盟申请列表
@@ -13,7 +13,7 @@ namespace GFGGame
 
         public void Clear()
         {
-            Type = 0;
+            Type = 2;
             ListDatas.Clear();
             LeagueData = null;
             ListApplyDatas.Clear();

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

@@ -7,6 +7,8 @@ namespace UI.League
     public partial class UI_LeagueApplyUI
     {
         public GComponent target;
+        public GLoader m_loaBg;
+        public GButton m_btnback;
         public GButton m_btnRule;
         public GList m_list;
         public GButton m_btnNoCheck;
@@ -57,12 +59,16 @@ namespace UI.League
 
         private void Init(GComponent comp)
         {
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_btnback = (GButton)comp.GetChild("btnback");
             m_btnRule = (GButton)comp.GetChild("btnRule");
             m_list = (GList)comp.GetChild("list");
             m_btnNoCheck = (GButton)comp.GetChild("btnNoCheck");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_loaBg = null;
+            m_btnback = null;
             m_btnRule = null;
             m_list = null;
             m_btnNoCheck = null;

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

@@ -7,6 +7,8 @@ namespace UI.League
     public partial class UI_LeagueMemberLogUI
     {
         public GComponent target;
+        public GLoader m_loaBg;
+        public GButton m_btnback;
         public GList m_list;
         public const string URL = "ui://tw70qm9du2u38";
         public const string PACKAGE_NAME = "League";
@@ -55,10 +57,14 @@ namespace UI.League
 
         private void Init(GComponent comp)
         {
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_btnback = (GButton)comp.GetChild("btnback");
             m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_loaBg = null;
+            m_btnback = null;
             m_list = null;
             if(disposeTarget && target != null)
             {

+ 18 - 4
GameClient/Assets/Game/HotUpdate/ServerProxy/LeagueSproxy.cs

@@ -96,8 +96,19 @@ namespace GFGGame
     {
         protected override async ETTask Run(Session session, L2C_NoticeJoinLeague message)
         {
-            LeagueMemberData memberData = LeagueSproxy.GetLeagueMemberData(message.RoleInfo);
-            LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[memberData.RoleInfo.roleId] = memberData;
+            if (LeagueDataManager.Instance.Type == 2)
+            {
+                bool result = await LeagueSproxy.ReqGetLeagueInfo();
+                if (result && ViewManager.isViewOpen(typeof(LeagueJoinView).FullName))
+                {
+                    ViewManager.Show<LeagueView>(null, new object[] { typeof(MainUIView).FullName, null }, true);
+                }
+            }
+            else
+            {
+                LeagueMemberData memberData = LeagueSproxy.GetLeagueMemberData(message.RoleInfo);
+                LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[memberData.RoleInfo.roleId] = memberData;
+            }
             EventAgent.DispatchEvent(ConstMessage.LEAGUE_MEMBER_CHANGE);
             await ETTask.CompletedTask;
         }
@@ -330,9 +341,12 @@ namespace GFGGame
                 if (response.Error == ErrorCode.ERR_Success)
                 {
                     LeagueDataManager.Instance.ListApplyDatas.Remove(targetRoleId);
-
-                    return true;
                 }
+                else if (response.Error == ErrorCode.ERR_LeagueRoleHad)
+                {
+                    LeagueDataManager.Instance.ListApplyDatas.Remove(targetRoleId);
+                }
+                return true;
             }
             return false;
         }

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

@@ -32,9 +32,10 @@ namespace GFGGame
             isfullScreen = true;
 
             // _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gzs_bjbj");
-
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zjm_2_2");
             _ui.m_btnNoCheck.onClick.Add(OnBtnNoCheckClick);
             _ui.m_btnRule.onClick.Add(OnBtnRuleClick);
+            _ui.m_btnback.onClick.Add(OnBtnBackClick);
 
             _ui.m_list.itemRenderer = RenderListItem;
 
@@ -62,6 +63,10 @@ namespace GFGGame
             base.RemoveEventListener();
 
         }
+        private void OnBtnBackClick()
+        {
+            ViewManager.GoBackFrom(typeof(LeagueApplyView).FullName);
+        }
         private void OnBtnRuleClick()
         {
             ViewManager.Show<RuleView>();
@@ -89,7 +94,7 @@ namespace GFGGame
             item.m_btnAgree.data = roleInfoData.roleId;
             if (item.m_btnRefuse.data == null)
             {
-                item.m_btnAgree.onClick.Add(OnBtnRefuseClick);
+                item.m_btnRefuse.onClick.Add(OnBtnRefuseClick);
             }
             item.m_btnRefuse.data = roleInfoData.roleId;
             UI_ListApplyItem.ProxyEnd();

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

@@ -28,8 +28,9 @@ namespace GFGGame
             this.viewCom = _ui.target;
             isfullScreen = true;
 
-            // _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gzs_bjbj");
+            _ui.m_btnback.onClick.Add(OnBtnBackClick);
             _ui.m_list.itemRenderer = RenderListItem;
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("lm_beijing");
         }
         protected override void AddEventListener()
         {
@@ -53,7 +54,10 @@ namespace GFGGame
             base.RemoveEventListener();
 
         }
-
+        private void OnBtnBackClick()
+        {
+            ViewManager.GoBackFrom(typeof(LeagueMemberLogView).FullName);
+        }
         private void RenderListItem(int index, GObject obj)
         {
             LeagueLogData logData = LeagueDataManager.Instance.ListLogDatas[index];

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

@@ -510,11 +510,11 @@ namespace GFGGame
         {
             // LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 1);
             if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(LeagueView).Name)) return;
-            if (LeagueDataManager.Instance.Type == 0)
-            {
-                PromptController.Instance.ShowFloatTextPrompt("数据来的有点慢,稍后再试下吧");
-                return;
-            }
+            // if (LeagueDataManager.Instance.Type == 0)
+            // {
+            //     PromptController.Instance.ShowFloatTextPrompt("数据来的有点慢,稍后再试下吧");
+            //     return;
+            // }
             if (LeagueDataManager.Instance.Type == 1)//已加入联盟
             {
                 ViewManager.Show<LeagueView>();

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes


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