zhaoyang před 2 roky
rodič
revize
9dea8d4507

+ 14 - 11
FGUIProject/assets/League/LeagueJoinUI.xml

@@ -4,18 +4,18 @@
     <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>
-    <image id="n7_a0cf" name="n7" src="a0cf2q" fileName="images/lm_db_chang.png" xy="0,220"/>
-    <image id="n8_a0cf" name="n8" src="a0cf2n" fileName="images/lm_sousuok2.png" xy="103,193"/>
-    <image id="n9_a0cf" name="n9" src="a0cf2x" fileName="images/biaotizi_2.png" xy="236,340"/>
-    <component id="n1_u2u3" name="btnback" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80">
+    <image id="n7_a0cf" name="n7" src="a0cf2q" fileName="images/lm_db_chang.png" xy="0,220" group="n16_a0cf"/>
+    <image id="n8_a0cf" name="n8" src="a0cf2n" fileName="images/lm_sousuok2.png" xy="103,193" group="n16_a0cf"/>
+    <image id="n9_a0cf" name="n9" src="a0cf2x" fileName="images/biaotizi_2.png" xy="236,340" group="n16_a0cf"/>
+    <component id="n1_u2u3" name="btnback" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80" group="n16_a0cf">
       <relation target="" sidePair="left-left,top-top"/>
       <Button icon="ui://tw70qm9du2u3b"/>
     </component>
-    <text id="n2_u2u3" name="txtSearch" xy="133,201" size="509,42" font="ui://eg2y0ldpa0cftks" fontSize="30" color="#5d3d21" autoSize="none" text="" input="true" prompt="[color=#736451]输入联盟名字,支持模糊搜索[/color]" maxLength="7"/>
-    <component id="n3_u2u3" name="btnSearch" src="u2u31c" fileName="components/Button4.xml" xy="635,192">
+    <text id="n2_u2u3" name="txtSearch" xy="133,201" size="509,42" group="n16_a0cf" font="ui://eg2y0ldpa0cftks" fontSize="30" color="#5d3d21" autoSize="none" text="" input="true" prompt="[color=#736451]输入雅集名字,支持模糊搜索[/color]" maxLength="7"/>
+    <component id="n3_u2u3" name="btnSearch" src="u2u31c" fileName="components/Button4.xml" xy="635,192" group="n16_a0cf">
       <Button title="搜索雅集"/>
     </component>
-    <component id="n4_u2u3" name="btnCreat" src="a0cf2y" fileName="components/Button41.xml" xy="867,192">
+    <component id="n4_u2u3" name="btnCreat" src="a0cf2y" fileName="components/Button41.xml" xy="867,192" group="n16_a0cf">
       <Button title="创建雅集"/>
     </component>
     <image id="n10_a0cf" name="n10" src="a0cf2r" fileName="images/lm_kuang_1.png" xy="0,420" group="n15_a0cf"/>
@@ -23,9 +23,9 @@
     <text id="n12_a0cf" name="n12" xy="463,422" pivot="0.5,0" size="60,39" group="n15_a0cf" font="ui://eg2y0ldpa0cftks" fontSize="28" color="#553c1d" align="center" text="成员"/>
     <text id="n13_a0cf" name="n13" xy="608,422" pivot="0.5,0" size="116,39" group="n15_a0cf" font="ui://eg2y0ldpa0cftks" fontSize="28" color="#553c1d" align="center" text="是否审核"/>
     <text id="n14_a0cf" name="n14" xy="857,422" pivot="0.5,0" size="60,39" group="n15_a0cf" font="ui://eg2y0ldpa0cftks" fontSize="28" color="#553c1d" align="center" text="操作"/>
-    <group id="n15_a0cf" name="n15" xy="0,420" size="1080,41"/>
-    <list id="n5_u2u3" name="list" xy="70,484" size="936,968" lineGap="17" defaultItem="ui://tw70qm9drv091f">
-      <relation target="" sidePair="bottom-bottom"/>
+    <group id="n15_a0cf" name="n15" xy="0,420" size="1080,41" group="n16_a0cf"/>
+    <list id="n5_u2u3" name="list" xy="70,484" size="936,968" group="n16_a0cf" lineGap="17" defaultItem="ui://tw70qm9drv091f">
+      <relation target="" sidePair=""/>
       <item/>
       <item/>
       <item/>
@@ -33,8 +33,11 @@
       <item/>
       <item/>
     </list>
-    <component id="n6_u2u3" name="btnChange" src="a0cf2z" fileName="components/Button42.xml" xy="375,1510">
+    <component id="n6_u2u3" name="btnChange" src="a0cf2z" fileName="components/Button42.xml" xy="375,1510" group="n16_a0cf">
       <Button title="换一批"/>
     </component>
+    <group id="n16_a0cf" name="n16" xy="0,80" size="1080,1677" advanced="true">
+      <relation target="" sidePair="center-center,top-top"/>
+    </group>
   </displayList>
 </component>

+ 2 - 2
FGUIProject/assets/League/components/ListJoinItem.xml

@@ -2,8 +2,8 @@
 <component size="935,137">
   <displayList>
     <text id="n7_u2u3" name="txtLeagueName" xy="150,23" size="188,39" font="ui://eg2y0ldpa0cftkz" fontSize="28" color="#923c1a" autoClearText="true" text="联盟名字7个字"/>
-    <text id="n11_u2u3" name="txtMemberCount" xy="401,49" pivot="0.5,0" size="55,38" fontSize="27" color="#66512c" align="center" vars="true" text="{value=0}/{maxValue=70}"/>
-    <text id="n12_rv09" name="txtCheck" xy="584,49" pivot="0.5,0" size="30,38" fontSize="27" color="#66512c" align="center" text="是"/>
+    <text id="n11_u2u3" name="txtMemberCount" xy="401,49" pivot="0.5,0" size="55,37" fontSize="27" color="#66512c" align="center" vars="true" text="{value=0}/{maxValue=70}"/>
+    <text id="n12_rv09" name="txtCheck" xy="584,49" pivot="0.5,0" size="30,38" font="ui://eg2y0ldpa0cftks" fontSize="27" color="#66512c" align="center" text="是"/>
     <component id="n14_rv09" name="btnJoin" src="rv091e" fileName="components/Button5.xml" xy="704,43">
       <Button title="申请"/>
     </component>

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -101,6 +101,7 @@ namespace GFGGame
             GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("CommonGame"));
             GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("Main"));
 
+            LeagueSproxy.ReqGetLeagueInfo().Coroutine();
             await ItemProxy.GetItemInfos();
             await InstanceZonesSProxy.GetInstanceZonesInfos();
             await StorageSProxy.ReqGetClientValues();
@@ -245,7 +246,6 @@ namespace GFGGame
             TravelSProxy.ReqTravelGuideInfo().Coroutine();
             PoemGallerySProxy.ReqGalleryTheme().Coroutine();
             ArenaDataManager.Instance.ReqArenaInfo();
-            LeagueSproxy.ReqGetLeagueInfo().Coroutine();
 
             int storageAutoPlay = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY);
             FightDataManager.Instance.autoPlay = storageAutoPlay <= 0 ? false : true;

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

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

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/LeagueData.cs

@@ -35,6 +35,7 @@ namespace GFGGame
     public class LeagueListData
     {
         public long LeagueId;//联盟id
+        public long Level;//联盟等级
         public string Name;//联盟名字
         public string Icon;//联盟徽章(资源名)
         public int Num;//联盟人数

+ 16 - 11
GameClient/Assets/Game/HotUpdate/ServerProxy/LeagueSproxy.cs

@@ -12,7 +12,7 @@ namespace GFGGame
         {
             if (message.LeagueId == LeagueDataManager.Instance.LeagueData.LeagueId)
             {
-                LeagueDataManager.Instance.UpdateNumeric(message.NumericType, message.NewValue);
+                LeagueDataManager.Instance.UpdateNumeric(LeagueDataManager.Instance.LeagueData, message.NumericType, message.NewValue);
                 EventAgent.DispatchEvent(ConstMessage.LEAGUE_NUMBERIC_CHANGE);
             }
             await ETTask.CompletedTask;
@@ -186,9 +186,17 @@ namespace GFGGame
                 if (response.Error == ErrorCode.ERR_Success)
                 {
                     LeagueDataManager.Instance.Type = response.Type;
-                    LeagueDataManager.Instance.LeagueData = GetLeagueData(response.LeagueDetailInfo);
-
-                    if (response.Type == 2)
+                    if (response.Type == 1)//1:已经加入军团
+                    {
+                        LeagueDataManager.Instance.LeagueData = GetLeagueData(response.LeagueDetailInfo);
+                        int myPos = LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[RoleDataManager.roleId].Pos;
+                        if (myPos == LeaguePos.Owner || myPos == LeaguePos.SubOwner)
+                        {
+                            // ReqGetApplyJoinLeagueList().Coroutine();
+                            // ReqLeagueJoinQuitLog().Coroutine();
+                        }
+                    }
+                    else if (response.Type == 2)//2:未加入军团
                     {
                         LeagueDataManager.Instance.ListDatas.Clear();
                         for (int i = 0; i < response.list.Count; i++)
@@ -198,12 +206,7 @@ namespace GFGGame
                         }
                     }
 
-                    int myPos = LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[RoleDataManager.roleId].Pos;
-                    if (response.Type == 1 && (myPos == LeaguePos.Owner || myPos == LeaguePos.SubOwner))
-                    {
-                        ReqGetApplyJoinLeagueList().Coroutine();
-                        ReqLeagueJoinQuitLog().Coroutine();
-                    }
+
                     return true;
                 }
             }
@@ -487,7 +490,7 @@ namespace GFGGame
             }
             for (int i = 0; i < leagueDetailInfo.NumberKeys.Count; i++)
             {
-                LeagueDataManager.Instance.UpdateNumeric(leagueDetailInfo.NumberKeys[i], leagueDetailInfo.Values[i]);
+                LeagueDataManager.Instance.UpdateNumeric(leagueData, leagueDetailInfo.NumberKeys[i], leagueDetailInfo.Values[i]);
             }
             return leagueData;
         }
@@ -508,6 +511,7 @@ namespace GFGGame
             LeagueListData listData = new LeagueListData();
 
             listData.LeagueId = listInfoProto.LeagueId;
+            listData.Level = listInfoProto.Level;
             listData.Name = listInfoProto.Name;
             listData.Icon = listInfoProto.Icon;
             listData.Num = listInfoProto.Num;
@@ -529,6 +533,7 @@ namespace GFGGame
         public static OtherRoleInfoData GetOtherRoleInfoData(OtherRoleInfoProto otherRoleInfo)
         {
             OtherRoleInfoData otherRoleInfoData = new OtherRoleInfoData();
+            otherRoleInfoData.roleId = otherRoleInfo.RoleId;
             otherRoleInfoData.headId = otherRoleInfo.HeadItemId;
             otherRoleInfoData.headBorderId = otherRoleInfo.HeadBorderItemId;
             otherRoleInfoData.roleName = otherRoleInfo.RoleName;

+ 23 - 3
GameClient/Assets/Game/HotUpdate/Views/League/LeagueChangeNameView.cs

@@ -1,3 +1,4 @@
+using System.Text.RegularExpressions;
 using ET;
 using FairyGUI;
 using UI.League;
@@ -92,7 +93,7 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt("权限不足");
                 return;
             }
-            if (_ui.m_c1.selectedIndex == 0)
+            if (_ui.m_c1.selectedIndex == 0)//改徽章
             {
                 int needCount = GlobalCfgArray.globalCfg.consumeChangeBadgeArr[0][1];
                 long hasCount = ItemDataManager.GetItemNum(GlobalCfgArray.globalCfg.consumeChangeBadgeArr[0][0]);
@@ -103,8 +104,27 @@ namespace GFGGame
                 }
                 LeagueSproxy.ReqChangeLeagueNameOrIcon(2, GlobalCfgArray.globalCfg.badgeResArr[_ui.m_listIcon.selectedIndex]).Coroutine();
             }
-            else
+            else//改联盟名称
             {
+                string leagueName = _ui.m_txtName.text;
+                if (string.IsNullOrEmpty(leagueName))
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("雅集名字不能为空");
+                    return;
+                }
+
+                if (leagueName.Length > GFGGame.GlobalConst.MaxNameLen)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("雅集名字最多七个字");
+                    return;
+                }
+
+                if (!Regex.IsMatch(leagueName, @"^[\u4e00-\u9fa5_0-9]+$"))//角色起名仅允许汉字、数字、底划线
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("雅集名字仅允许汉字、数字、下划线");
+                    return;
+                }
+
                 int needCount = GlobalCfgArray.globalCfg.consumeChangeNameArr[0][1];
                 long hasCount = ItemDataManager.GetItemNum(GlobalCfgArray.globalCfg.consumeChangeNameArr[0][0]);
                 if (needCount > hasCount)
@@ -112,7 +132,7 @@ namespace GFGGame
                     PromptController.Instance.ShowFloatTextPrompt("消耗不足");
                     return;
                 }
-                LeagueSproxy.ReqChangeLeagueNameOrIcon(1, _ui.m_txtName.text).Coroutine();
+                LeagueSproxy.ReqChangeLeagueNameOrIcon(1, leagueName).Coroutine();
             }
         }
     }

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

@@ -47,6 +47,7 @@ namespace GFGGame
             base.OnShown();
             _ui.m_listIcon.numItems = GlobalCfgArray.globalCfg.badgeResArr.Length;
             _ui.m_listIcon.selectedIndex = 0;
+            _ui.m_txtName.text = "";
             ItemUtil.UpdateItemNeedNum(_ui.m_comCost, GlobalCfgArray.globalCfg.consumeCreateArr[0][0], GlobalCfgArray.globalCfg.consumeCreateArr[0][1]);
         }
 

+ 13 - 10
GameClient/Assets/Game/HotUpdate/Views/League/LeagueJoinView.cs

@@ -1,3 +1,4 @@
+using System.Collections.Generic;
 using ET;
 using FairyGUI;
 using UI.League;
@@ -9,6 +10,7 @@ namespace GFGGame
     public class LeagueJoinView : BaseWindow
     {
         private UI_LeagueJoinUI _ui;
+        private List<long> _leagueIds;
 
         public override void Dispose()
         {
@@ -45,7 +47,8 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            _ui.m_list.numItems = LeagueDataManager.Instance.ListDatas.Count;
+            _leagueIds = new List<long>(LeagueDataManager.Instance.ListDatas.Keys);
+            _ui.m_list.numItems = _leagueIds.Count;
         }
 
         protected override void OnHide()
@@ -86,15 +89,16 @@ namespace GFGGame
             bool result = await LeagueSproxy.ReqSearchLeagueInfo(leagueName);
             if (result)
             {
-                _ui.m_list.numItems = LeagueDataManager.Instance.ListDatas.Count;
+                _leagueIds = new List<long>(LeagueDataManager.Instance.ListDatas.Keys);
+                _ui.m_list.numItems = _leagueIds.Count;
             }
         }
         private void RenderListItem(int index, GObject obj)
         {
-            LeagueListData leagueListData = LeagueDataManager.Instance.ListDatas[index];
+            LeagueListData leagueListData = LeagueDataManager.Instance.ListDatas[_leagueIds[index]];
             UI_ListJoinItem item = UI_ListJoinItem.Proxy(obj);
             item.m_comLeagueHead.m_loaUnionIcon.url = ResPathUtil.GetLeagueIconPath(leagueListData.Icon);
-            item.m_comLeagueHead.m_txtUnionLv.text = "建筑等级";
+            item.m_comLeagueHead.m_txtUnionLv.text = leagueListData.Level.ToString();
             item.m_txtLeagueName.text = leagueListData.Name;
             item.m_imgAd.visible = leagueListData.IsAd;
             item.m_txtMemberCount.SetVar("value", leagueListData.Num.ToString()).FlushVars();
@@ -105,22 +109,21 @@ namespace GFGGame
             {
                 item.m_btnJoin.onClick.Add(OnBtnJoinClick);
             }
-            item.m_btnJoin.data = index;
+            item.m_btnJoin.data = leagueListData.LeagueId;
 
             UI_ListJoinItem.ProxyEnd();
         }
         private async void OnBtnJoinClick(EventContext context)
         {
             GButton obj = context.sender as GButton;
-            long index = (int)obj.data;
-            LeagueListData leagueListData = LeagueDataManager.Instance.ListDatas[index];
-            if (leagueListData.NeedAudit)
+            long leagueId = (int)obj.data;
+            if (LeagueDataManager.Instance.ListDatas[leagueId].NeedAudit)
             {
                 AlertUI.Show("该雅集需要审批同意后才可加入,是否仍需要申请?").
                 SetLeftButton(true, "取消").
                  SetRightButton(true, "申请", async (object param) =>
                  {
-                     bool result = await LeagueSproxy.ReqJoinLeague(leagueListData.LeagueId);
+                     bool result = await LeagueSproxy.ReqJoinLeague(leagueId);
                      if (result)
                      {
                          obj.title = "已申请";
@@ -129,7 +132,7 @@ namespace GFGGame
             }
             else
             {
-                bool result = await LeagueSproxy.ReqJoinLeague(leagueListData.LeagueId);
+                bool result = await LeagueSproxy.ReqJoinLeague(leagueId);
                 if (result)
                 {
                     OnBtnBackClick();

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

@@ -28,7 +28,7 @@ namespace GFGGame
             this.viewCom = _ui.target;
             isfullScreen = true;
 
-            // _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gzs_bjbj");
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zjm_11");
             _ui.m_btnback.onClick.Add(OnBtnBackClick);
             _ui.m_btnMember.target.onClick.Add(OnBtnMemberClick);
             _ui.m_btnConstruct.target.onClick.Add(OnBtnConstructClick);

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

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

+ 2 - 2
GameClient/Assets/Game/Launcher/LauncherConfig.cs

@@ -78,8 +78,8 @@ namespace GFGGame
         public static void InitPlatform(string json)
         {
             var result = JsonMapper.ToObject<Result>(json);
-            // LauncherConfig.CDN_ROOT = result.cdnRoot;
-            CDN_ROOT = "http://10.108.64.105/";
+            LauncherConfig.CDN_ROOT = result.cdnRoot;
+            // CDN_ROOT = "http://10.108.64.143/";
             LauncherConfig.logApiRootUrl = result.logApiUrl;
             //LauncherConfig.logApiRootUrl = "http://10.108.64.106:8080/api/Log/";
             LauncherConfig.logApiReportLauncherUrl = LauncherConfig.logApiRootUrl + "ReportNode";

binární
GameClient/Assets/ResIn/UI/League/League_fui.bytes


+ 1 - 1
GameClient/Assets/StreamingAssets/Bundles/Manifest

@@ -1 +1 @@
-{"version":4,"appVersion":"1.6","bundles":[{"id":0,"name":"privacypolicy","assets":["Assets/ResIn/Txt/privacyPolicy.txt"],"size":15559,"crc":766635756,"nameWithAppendHash":"privacypolicy_ed19a0cca9d07246eb1d85aa4bd69bbe","dependencies":[]},{"id":1,"name":"privacypolicychildren","assets":["Assets/ResIn/Txt/privacyPolicyChildren.txt"],"size":6444,"crc":2835290838,"nameWithAppendHash":"privacypolicychildren_679f2f31989b3002daf503519fd771c5","dependencies":[]},{"id":2,"name":"serviceprotocal","assets":["Assets/ResIn/Txt/serviceProtocal.txt"],"size":15467,"crc":1335140532,"nameWithAppendHash":"serviceprotocal_4a2a3eefdbec744df05fd8a503579d37","dependencies":[]}]}
+{"version":1,"appVersion":"1.6","bundles":[{"id":0,"name":"privacypolicy","assets":["Assets/ResIn/Txt/privacyPolicy.txt"],"size":15559,"crc":766635756,"nameWithAppendHash":"privacypolicy_ed19a0cca9d07246eb1d85aa4bd69bbe","dependencies":[]},{"id":1,"name":"privacypolicychildren","assets":["Assets/ResIn/Txt/privacyPolicyChildren.txt"],"size":6444,"crc":2835290838,"nameWithAppendHash":"privacypolicychildren_679f2f31989b3002daf503519fd771c5","dependencies":[]},{"id":2,"name":"serviceprotocal","assets":["Assets/ResIn/Txt/serviceProtocal.txt"],"size":15467,"crc":1335140532,"nameWithAppendHash":"serviceprotocal_4a2a3eefdbec744df05fd8a503579d37","dependencies":[]}]}

+ 1 - 1
GameClient/Assets/StreamingAssets/Bundles/Manifest.version

@@ -1 +1 @@
-{"crc":301456539,"size":666,"version":4,"appVersion":"1.6"}
+{"crc":2591188714,"size":666,"version":1,"appVersion":"1.6"}