zhaoyang 2 năm trước cách đây
mục cha
commit
d435dacc76
29 tập tin đã thay đổi với 111 bổ sung63 xóa
  1. 1 0
      FGUIProject/assets/League/LeagueGiftUI.xml
  2. 1 1
      FGUIProject/assets/League/LeagueSkillUpUI.xml
  3. 2 3
      FGUIProject/assets/League/LeagueUI.xml
  4. 7 5
      FGUIProject/assets/League/components/ListSkillItem.xml
  5. 2 2
      FGUIProject/assets/League/components/ListSkillLayerItem.xml
  6. 5 5
      GameClient/Assets/Editor/Excel/Scanner/LeagueScanner.cs
  7. 1 0
      GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs
  8. 1 0
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  9. 6 22
      GameClient/Assets/Game/HotUpdate/Data/LeagueDataManager.cs
  10. 7 6
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/League/UI_LeagueUI.cs
  11. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/League/UI_ListSkillItem.cs
  12. 2 1
      GameClient/Assets/Game/HotUpdate/ServerProxy/SkillSProxy.cs
  13. 2 2
      GameClient/Assets/Game/HotUpdate/Utils/TimeUtil.cs
  14. 5 4
      GameClient/Assets/Game/HotUpdate/Views/League/LeagueGiftView.cs
  15. 33 8
      GameClient/Assets/Game/HotUpdate/Views/League/LeagueSkillUpView.cs
  16. 28 4
      GameClient/Assets/Game/HotUpdate/Views/League/LeagueSkillView.cs
  17. 5 0
      GameClient/Assets/Game/HotUpdate/Views/League/LeagueView.cs
  18. BIN
      GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes
  19. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0!a.png
  20. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0.png
  21. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0_1!a.png
  22. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0_1.png
  23. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0_2!a.png
  24. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0_2.png
  25. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0_3!a.png
  26. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0_3.png
  27. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0_4!a.png
  28. BIN
      GameClient/Assets/ResIn/UI/League/League_atlas0_4.png
  29. BIN
      GameClient/Assets/ResIn/UI/League/League_fui.bytes

+ 1 - 0
FGUIProject/assets/League/LeagueGiftUI.xml

@@ -17,6 +17,7 @@
       <Button icon="ui://tw70qm9do9gh4b"/>
     </component>
     <component id="n8_pvb4" name="btnGet" src="wm603x" fileName="components/Button111.xml" xy="375,819" group="n11_pvb4">
+      <gearDisplay controller="c1" pages="0"/>
       <Button title="一键领取"/>
     </component>
     <list id="n12_pvb4" name="listGet" xy="167,245" size="779,493" group="n11_pvb4" overflow="scroll" defaultItem="ui://tw70qm9dpvb44z" autoClearItems="true">

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

@@ -15,7 +15,7 @@
       <item/>
     </list>
     <component id="n9_pvb4" name="comSkillType" src="pvb45b" fileName="components/ListSkillTypeItem.xml" xy="0,387"/>
-    <list id="n13_pvb4" name="list" xy="66,860" size="947,1002" lineGap="17" defaultItem="ui://tw70qm9dpvb45f" align="center">
+    <list id="n13_pvb4" name="list" xy="66,860" size="947,1002" overflow="scroll" lineGap="35" defaultItem="ui://tw70qm9dpvb45f" align="center">
       <item/>
       <item/>
       <item/>

+ 2 - 3
FGUIProject/assets/League/LeagueUI.xml

@@ -20,7 +20,6 @@
     <text id="n30_gfx4" name="txtLowKeep" xy="775,160" pivot="1,0" size="257,42" fontSize="30" align="right" text="已连续低维护:1天"/>
     <text id="n10_u2u3" name="txtUnionName" xy="250,317" pivot="0.5,0" size="212,44" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#fff6dc" align="center" autoClearText="true" text="联盟名字7个字"/>
     <component id="n20_a0cf" name="comLeagueHead" src="a0cf30" fileName="components/ComLeagueHead.xml" xy="109,267"/>
-    <text id="n14_u2u3" name="txtLeaderName" xy="850,339" size="162,34" font="ui://eg2y0ldpa0cftkz" fontSize="24" color="#923c1a" autoClearText="true" text="会长名字7个字"/>
     <image id="n25_o9gh" name="n25" src="o9gh47" fileName="images/lm_zjm_gonggao.png" xy="599,308" size="444,136" group="n26_o9gh">
       <relation target="n15_u2u3" sidePair="height-height"/>
     </image>
@@ -31,13 +30,13 @@
       <relation target="n25_o9gh" sidePair="right-right,bottom-bottom"/>
       <Button icon="ui://tw70qm9dwm6034"/>
     </component>
-    <text id="n28_o9gh" name="txtName" xy="818,287" size="52,34" group="n26_o9gh" font="ui://eg2y0ldpa0cftkz" fontSize="24" color="#923c1a" leading="-4" autoClearText="true" text="联盟"/>
+    <text id="n14_u2u3" name="txtLeaderName" xy="815,287" size="162,34" group="n26_o9gh" font="ui://eg2y0ldpa0cftkz" fontSize="24" color="#923c1a" autoClearText="true" text="会长名字7个字"/>
     <text id="n15_u2u3" name="txtNotice" xy="617,339" size="396,69" group="n26_o9gh" font="ui://eg2y0ldpa0cftks" fontSize="28" color="#915e15" leading="-4" autoSize="height" autoClearText="true" text="联盟公告联盟公告联盟公盟公联盟联盟公告联盟公告联盟"/>
     <text id="n29_o9gh" name="n29" xy="819,260" size="39,26" group="n26_o9gh" font="ui://eg2y0ldpa0cftkz" fontSize="18" color="#fffbed" text="社长"/>
     <group id="n26_o9gh" name="n26" xy="599,246" size="444,230"/>
     <component id="n7_u2u3" name="btnPray" src="u2u314" fileName="components/ButtonModle6.xml" xy="70,446" group="n9_u2u3"/>
     <component id="n3_u2u3" name="btnSkill" src="u2u3u" fileName="components/ButtonModle2.xml" xy="343,669" group="n9_u2u3"/>
-    <component id="n4_u2u3" name="n4" src="u2u3y" fileName="components/ButtonModle3.xml" xy="755,894" group="n9_u2u3"/>
+    <component id="n4_u2u3" name="btnGift" src="u2u3y" fileName="components/ButtonModle3.xml" xy="755,894" group="n9_u2u3"/>
     <component id="n5_u2u3" name="btnAnswer" src="u2u310" fileName="components/ButtonModle4.xml" xy="663,1582" group="n9_u2u3"/>
     <component id="n6_u2u3" name="n6" src="u2u312" fileName="components/ButtonModle5.xml" xy="118,1486" group="n9_u2u3"/>
     <component id="n8_u2u3" name="n8" src="u2u316" fileName="components/ButtonModle7.xml" xy="615,1263" group="n9_u2u3"/>

+ 7 - 5
FGUIProject/assets/League/components/ListSkillItem.xml

@@ -1,9 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="85,91">
+<component size="175,123" overflow="hidden">
   <displayList>
-    <loader id="n10_pvb4" name="loaScore" xy="0,0" size="44,44" group="n13_pvb4" url="ui://eg2y0ldp842s6h" autoSize="true"/>
-    <text id="n11_pvb4" name="txtScore" xy="45,1" size="40,42" group="n13_pvb4" fontSize="30" text=""/>
-    <group id="n13_pvb4" name="n13" xy="0,0" size="85,44"/>
-    <component id="n12_pvb4" name="comCost" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="-22,45" pivot="0.5,0" scale="0.6,0.6" controller="c1,1"/>
+    <image id="n16_gfx4" name="n16" src="wm603a" fileName="images/lm_db_4.png" xy="-401,0" pivot="0.5,0" scale="0.3,0.3"/>
+    <loader id="n10_pvb4" name="loaScore" xy="45,33" size="44,44" group="n13_pvb4" url="ui://eg2y0ldp842s6h"/>
+    <text id="n11_pvb4" name="txtScore" xy="90,34" size="40,42" group="n13_pvb4" fontSize="30" text=""/>
+    <image id="n17_gfx4" name="imgLock" src="wm6037" fileName="images/lm_db_touxiang.png" xy="25,-9" group="n13_pvb4" scale="0.4,0.4"/>
+    <group id="n13_pvb4" name="n13" xy="25,-9" size="316,355"/>
+    <component id="n12_pvb4" name="comCost" src="n3xha1" fileName="components/ComCostCurrency.xml" pkg="eg2y0ldp" xy="23,77" pivot="0.5,0" scale="0.8,0.8" controller="c1,1"/>
   </displayList>
 </component>

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

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="506,82">
+<component size="740,123">
   <displayList>
-    <list id="n14_pvb4" name="listSkill" xy="0,0" size="506,82" layout="row" colGap="100" defaultItem="ui://tw70qm9dpvb45d" align="center">
+    <list id="n14_pvb4" name="listSkill" xy="0,0" size="740,123" layout="row" colGap="100" defaultItem="ui://tw70qm9dpvb45d" align="center">
       <relation target="" sidePair="center-center"/>
       <item/>
       <item/>

+ 5 - 5
GameClient/Assets/Editor/Excel/Scanner/LeagueScanner.cs

@@ -12,7 +12,7 @@ namespace GFGEditor
     {
         private static Dictionary<int, int> skilCountDic = new Dictionary<int, int>();
         private static Dictionary<int, int> layerCountDic = new Dictionary<int, int>();
-
+        private static string[] names = { "选茶", "备器", "择水", "取火", "候汤", "习茶" };
         public static void StartScan()
         {
             skilCountDic.Clear();
@@ -48,10 +48,10 @@ namespace GFGEditor
                     string type = key.ToString();
                     string layerCount = layerCountDic[key].ToString();
                     string skillCount = skilCountDic[key].ToString();
-
-                    var values = new string[] { type, layerCount, skillCount };
-                    // SQLiteHelper.Instance.UpdateValues(nameof(LeagueSkillCountCfgArray), names, values, "type", key.ToString());
-                    SQLiteHelper.Instance.InsertValues(nameof(LeagueSkillCountCfgArray), values);
+                    var names = new string[] { "layerCount", "skillCount" };
+                    var values = new string[] { layerCount, skillCount };
+                    SQLiteHelper.Instance.UpdateValues(nameof(LeagueSkillCountCfgArray), names, values, "type", key.ToString());
+                    // SQLiteHelper.Instance.InsertValues(nameof(LeagueSkillCountCfgArray), values);
                 }
             }
             catch (Exception e)

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -114,6 +114,7 @@ namespace GFGGame
         // public const string LEAGUE_ANSWER_STATE_CHANGE = "LEAGUE_ANSWER_STATE_CHANGE";//联盟答题状态更新
         public const string OTHER_ROLE_INFO_CHANGE = "OTHER_ROLE_INFO_CHANGE";//其他玩家信息变化
         public const string NOTICE_CHAT_MESSAGE = "NOTICE_CHAT_MESSAGE";//通知聊天信息
+        public const string ACTIVE_SKILL = "ACTIVE_SKILL";//技能激活
 
     }
 }

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

@@ -247,6 +247,7 @@ namespace GFGGame
             TravelSProxy.ReqTravelGuideInfo().Coroutine();
             PoemGallerySProxy.ReqGalleryTheme().Coroutine();
             ArenaDataManager.Instance.ReqArenaInfo();
+            SkillSProxy.ReqGetSkillList(SkillType.LeagueSkill).Coroutine();
 
             int storageAutoPlay = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY);
             FightDataManager.Instance.autoPlay = storageAutoPlay <= 0 ? false : true;

+ 6 - 22
GameClient/Assets/Game/HotUpdate/Data/LeagueDataManager.cs

@@ -12,8 +12,8 @@ namespace GFGGame
     public class LeagueDataManager : SingletonBase<LeagueDataManager>
     {
         public int Type = 2;// 1:已经加入军团 2:未加入军团
-        public int MaxFinishType { get { return GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueSkillMaxType); } }
-        public int MaxFinishLayer { get { return GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueSkillMaxLayer); } }
+        public int CurType { get { return Math.Max(GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueSkillMaxType), 1); } }
+        public int CurLayer { get { return Math.Max(GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueSkillMaxLayer), 1); } }
         public LeagueData LeagueData;//联盟信息
         public int HallLevel { get { return (int)GetNumeriValue(LeagueNumericType.HallLevel); } }
         public int HotelLevel { get { return (int)GetNumeriValue(LeagueNumericType.HotelLevel); } }
@@ -139,29 +139,13 @@ namespace GFGGame
         public double GetSkillProgressByType(int skillType)
         {
             LeagueSkillCountCfg skillCountCfg = LeagueSkillCountCfgArray.Instance.GetCfg(skillType);
-            // int maxFinishType = GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueSkillMaxType);
-            if (skillCountCfg.type - MaxFinishType <= 0) return 100;
-            if (skillCountCfg.type - MaxFinishType > 1) return 0;
-            // int layer = GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueSkillMaxLayer);
-            if (MaxFinishLayer == 0) return 0;
+            if (skillCountCfg.type - CurType < 0) return 100;
+            if (skillCountCfg.type - CurType > 0) return 0;
 
-            List<LeagueSkillCfg> firstSkillCfgs = LeagueSkillCfgArray.Instance.GetCfgsBytypeAndlayer(skillType, 1);
-            int startId = firstSkillCfgs[0].id;
-            List<LeagueSkillCfg> curSkillCfgs = LeagueSkillCfgArray.Instance.GetCfgsBytypeAndlayer(skillType, MaxFinishLayer + 1);
-            int curId = curSkillCfgs[0].id;
-
-            for (int i = 0; i < curSkillCfgs.Count; i++)
-            {
-                if (SkillDataManager.Instance.LeagueSkillDatas[skillType].IndexOf(curSkillCfgs[i].id) < 0)
-                {
-                    curId = curSkillCfgs[i].id;
-                    break;
-                }
-            }
-            float count = curId - startId;
+            float count = !SkillDataManager.Instance.LeagueSkillDatas.ContainsKey(skillType) ? 0 : SkillDataManager.Instance.LeagueSkillDatas[skillType].Count;
             float maxCount = skillCountCfg.skillCount;
 
-            return Math.Round(count / maxCount * 100, 1); ;
+            return Math.Round(count / maxCount * 100, 2); ;
         }
 
         //获取联盟礼包领取数据

+ 7 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/League/UI_LeagueUI.cs

@@ -15,13 +15,13 @@ namespace UI.League
         public GTextField m_txtLowKeep;
         public GTextField m_txtUnionName;
         public UI_ComLeagueHead m_comLeagueHead;
-        public GTextField m_txtLeaderName;
         public GComponent m_comHead;
         public GButton m_btnChangeNotice;
-        public GTextField m_txtName;
+        public GTextField m_txtLeaderName;
         public GTextField m_txtNotice;
         public UI_ButtonModle6 m_btnPray;
         public UI_ButtonModle2 m_btnSkill;
+        public UI_ButtonModle3 m_btnGift;
         public UI_ButtonModle4 m_btnAnswer;
         public const string URL = "ui://tw70qm9du2u32";
         public const string PACKAGE_NAME = "League";
@@ -78,13 +78,13 @@ namespace UI.League
             m_txtLowKeep = (GTextField)comp.GetChild("txtLowKeep");
             m_txtUnionName = (GTextField)comp.GetChild("txtUnionName");
             m_comLeagueHead = (UI_ComLeagueHead)UI_ComLeagueHead.Create(comp.GetChild("comLeagueHead"));
-            m_txtLeaderName = (GTextField)comp.GetChild("txtLeaderName");
             m_comHead = (GComponent)comp.GetChild("comHead");
             m_btnChangeNotice = (GButton)comp.GetChild("btnChangeNotice");
-            m_txtName = (GTextField)comp.GetChild("txtName");
+            m_txtLeaderName = (GTextField)comp.GetChild("txtLeaderName");
             m_txtNotice = (GTextField)comp.GetChild("txtNotice");
             m_btnPray = (UI_ButtonModle6)UI_ButtonModle6.Create(comp.GetChild("btnPray"));
             m_btnSkill = (UI_ButtonModle2)UI_ButtonModle2.Create(comp.GetChild("btnSkill"));
+            m_btnGift = (UI_ButtonModle3)UI_ButtonModle3.Create(comp.GetChild("btnGift"));
             m_btnAnswer = (UI_ButtonModle4)UI_ButtonModle4.Create(comp.GetChild("btnAnswer"));
         }
         public void Dispose(bool disposeTarget = false)
@@ -100,15 +100,16 @@ namespace UI.League
             m_txtUnionName = null;
             m_comLeagueHead.Dispose();
             m_comLeagueHead = null;
-            m_txtLeaderName = null;
             m_comHead = null;
             m_btnChangeNotice = null;
-            m_txtName = null;
+            m_txtLeaderName = null;
             m_txtNotice = null;
             m_btnPray.Dispose();
             m_btnPray = null;
             m_btnSkill.Dispose();
             m_btnSkill = null;
+            m_btnGift.Dispose();
+            m_btnGift = null;
             m_btnAnswer.Dispose();
             m_btnAnswer = null;
             if(disposeTarget && target != null)

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

@@ -9,6 +9,7 @@ namespace UI.League
         public GComponent target;
         public GLoader m_loaScore;
         public GTextField m_txtScore;
+        public GImage m_imgLock;
         public GComponent m_comCost;
         public const string URL = "ui://tw70qm9dpvb45d";
         public const string PACKAGE_NAME = "League";
@@ -59,12 +60,14 @@ namespace UI.League
         {
             m_loaScore = (GLoader)comp.GetChild("loaScore");
             m_txtScore = (GTextField)comp.GetChild("txtScore");
+            m_imgLock = (GImage)comp.GetChild("imgLock");
             m_comCost = (GComponent)comp.GetChild("comCost");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaScore = null;
             m_txtScore = null;
+            m_imgLock = null;
             m_comCost = null;
             if(disposeTarget && target != null)
             {

+ 2 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/SkillSProxy.cs

@@ -28,6 +28,7 @@ namespace ET
                         break;
                 }
             }
+            EventAgent.DispatchEvent(ConstMessage.ACTIVE_SKILL);
             await ETTask.CompletedTask;
         }
     }
@@ -81,7 +82,7 @@ namespace GFGGame
                     switch (skillType)
                     {
                         case SkillType.LeagueSkill:
-                            SkillDataManager.Instance.UpdateSkillDatas(SkillType.LeagueSkill, new List<int>(skillId));
+                            SkillDataManager.Instance.UpdateSkillDatas(SkillType.LeagueSkill, new List<int>() { skillId });
                             break;
                     }
                     return true;

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Utils/TimeUtil.cs

@@ -133,12 +133,12 @@ namespace GFGGame
         }
 
         /// <summary>
-        /// 输入一段时间(秒),将时间转换成HH:mm:ss格式
+        /// 输入一段时间(毫秒秒),将时间转换成HH:mm:ss格式
         /// </summary>
         /// <param name="timeMsec"></param>
         public static string FormattingTime5(int timeMsec)
         {
-            TimeSpan ts = new TimeSpan(0, 0, timeMsec);
+            TimeSpan ts = new TimeSpan(0, 0, timeMsec / 1000);
             string strH = ts.Hours.ToString().Length == 1 ? "0" + ts.Hours : ts.Hours.ToString();
             string strM = ts.Minutes.ToString().Length == 1 ? "0" + ts.Minutes : ts.Minutes.ToString();
             string strS = ts.Seconds.ToString().Length == 1 ? "0" + ts.Seconds : ts.Seconds.ToString();

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

@@ -57,7 +57,8 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
-
+            if (_ui.m_listBuy.numItems > 0) _ui.m_listBuy.ScrollToView(0);
+            if (_ui.m_listGet.numItems > 0) _ui.m_listGet.ScrollToView(0);
         }
 
         protected override void RemoveEventListener()
@@ -112,8 +113,8 @@ namespace GFGGame
             {
                 item.m_listGift.itemRenderer = RenderListRewardItem;
             }
-            item.m_listGift.data = _getDatas[index].GiftCfg.bonusArr;
-            item.m_listGift.numItems = _getDatas[index].GiftCfg.bonusArr.Length;
+            item.m_listGift.data = _buyDatas[index].GiftCfg.bonusArr;
+            item.m_listGift.numItems = _buyDatas[index].GiftCfg.bonusArr.Length;
 
             if (item.m_btnBuy.data == null)
             {
@@ -143,7 +144,7 @@ namespace GFGGame
 
             int myPos = LeagueDataManager.Instance.GetMyPos();
             bool isLeader = myPos == LeaguePos.Owner || myPos == LeaguePos.SubOwner;
-            if (isLeader!)
+            if (!isLeader!)
             {
                 PromptController.Instance.ShowFloatTextPrompt("权限不足");
                 return;

+ 33 - 8
GameClient/Assets/Game/HotUpdate/Views/League/LeagueSkillUpView.cs

@@ -39,6 +39,7 @@ namespace GFGGame
             _ui.m_btnBack.onClick.Add(OnBtnBackClick);
             _ui.m_listScore.itemRenderer = RenderListScoreItem;
             _ui.m_list.itemRenderer = RenderListItem;
+            _ui.m_list.SetVirtual();
 
             _valueBarController = new ValueBarController(_ui.m_comValue);
 
@@ -47,7 +48,6 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-
         }
         protected override void OnShown()
         {
@@ -55,10 +55,10 @@ namespace GFGGame
             _type = (int)this.viewData;
             _valueBarController.OnShown();
             _valueBarController.Controller(11);
-            _ui.m_list.numItems = LeagueSkillCountCfgArray.Instance.dataArray.Length;
-            if (_type > LeagueDataManager.Instance.MaxFinishType)
+            _ui.m_list.numItems = LeagueSkillCountCfgArray.Instance.GetCfg(_type).layerCount;
+            if (LeagueDataManager.Instance.GetSkillProgressByType(_type) < 100)
             {
-                _ui.m_list.ScrollToView(LeagueDataManager.Instance.MaxFinishLayer);
+                _ui.m_list.ScrollToView(LeagueDataManager.Instance.CurLayer);
             }
             UpdateView();
         }
@@ -77,13 +77,16 @@ namespace GFGGame
 
         private void OnBtnBackClick()
         {
-            ViewManager.GoBackFrom(typeof(LeagueSkillView).FullName);
+            ViewManager.GoBackFrom(typeof(LeagueSkillUpView).FullName);
         }
         private void UpdateView()
         {
             _ui.m_listScore.numItems = 4;
+            _ui.m_list.RefreshVirtualList();
+            _ui.m_comSkillType.m_txtTitle.text = "茶艺-" + LeagueSkillCountCfgArray.Instance.GetCfg(_type).name;
             UI_ListSkillTypeItem item = UI_ListSkillTypeItem.Proxy(_ui.m_comSkillType.target);
-            item.m_txtProgress.text = LeagueDataManager.Instance.GetSkillProgressByType(_type).ToString();
+            double progress = LeagueDataManager.Instance.GetSkillProgressByType(_type);
+            item.m_txtProgress.text = string.Format("进度{0}%", progress);
             UI_ListSkillTypeItem.ProxyEnd();
         }
         private void RenderListScoreItem(int index, GObject obj)
@@ -111,6 +114,8 @@ namespace GFGGame
             UI_ListSkillItem item = UI_ListSkillItem.Proxy(obj);
             item.m_loaScore.url = ResPathUtil.GetScorePath(skillCfgs[index].score);
             item.m_txtScore.text = skillCfgs[index].value.ToString();
+            bool isLock = !SkillDataManager.Instance.LeagueSkillDatas.ContainsKey(_type) || SkillDataManager.Instance.LeagueSkillDatas[_type].IndexOf(skillCfgs[index].id) < 0;
+            item.m_imgLock.visible = isLock;
             ItemUtil.UpdateItemNeedNum(item.m_comCost, skillCfgs[index].consumeArr[0], true);
             if (item.target.data == null)
             {
@@ -124,11 +129,31 @@ namespace GFGGame
         {
             GObject obj = context.sender as GObject;
             int skillId = (int)obj.data;
+            if (SkillDataManager.Instance.LeagueSkillDatas.ContainsKey(_type) && SkillDataManager.Instance.LeagueSkillDatas[_type].IndexOf(skillId) >= 0)
+            {
+                return;
+            }
+            LeagueSkillCfg skillCfg = LeagueSkillCfgArray.Instance.GetCfg(skillId);
+            List<LeagueSkillCfg> lastSkillCfgs = LeagueSkillCfgArray.Instance.GetCfgsBytypeAndlayer(_type, skillCfg.layer - 1);
+            for (int i = 0; i < lastSkillCfgs.Count; i++)
+            {
+                if (SkillDataManager.Instance.LeagueSkillDatas[_type].IndexOf(lastSkillCfgs[i].id) < 0)
+                {
+                    return;
+                }
+            }
+            long needCount = skillCfg.consumeArr[0][1];
+            long hasCount = ItemDataManager.GetItemNum(skillCfg.consumeArr[0][0]);
+            if (hasCount < needCount)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("消耗不足");
+                return;
+            }
+
             bool result = await SkillSProxy.ReqActiveSkill(SkillType.LeagueSkill, skillId);
             if (result)
             {
-                LeagueSkillCfg skillCfg = LeagueSkillCfgArray.Instance.GetCfg(skillId);
-
+                UpdateView();
             }
         }
     }

+ 28 - 4
GameClient/Assets/Game/HotUpdate/Views/League/LeagueSkillView.cs

@@ -46,7 +46,7 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-
+            // EventAgent.AddEventListener(ConstMessage.ACTIVE_SKILL,)
         }
         protected override void OnShown()
         {
@@ -55,6 +55,10 @@ namespace GFGGame
             _valueBarController.Controller(11);
             _ui.m_listScore.numItems = 4;
             _ui.m_list.numItems = LeagueSkillCountCfgArray.Instance.dataArray.Length;
+            if (LeagueDataManager.Instance.GetSkillProgressByType(_ui.m_list.numItems) < 100)
+            {
+                _ui.m_list.ScrollToView(LeagueDataManager.Instance.CurType - 1);
+            }
         }
 
         protected override void OnHide()
@@ -73,7 +77,10 @@ namespace GFGGame
         {
             ViewManager.GoBackFrom(typeof(LeagueSkillView).FullName);
         }
+        private void UpdateView()
+        {
 
+        }
         private void RenderListScoreItem(int index, GObject obj)
         {
             UI_ListScoreItem item = UI_ListScoreItem.Proxy(obj);
@@ -83,13 +90,25 @@ namespace GFGGame
         }
         private void RenderListItem(int index, GObject obj)
         {
-            LeagueSkillCountCfg skillCountCfg = LeagueSkillCountCfgArray.Instance.GetCfg(index);
+            LeagueSkillCountCfg skillCountCfg = LeagueSkillCountCfgArray.Instance.dataArray[index];
             UI_ListSkillTypeItem item = UI_ListSkillTypeItem.Proxy(obj);
-            item.m_txtProgress.text = LeagueDataManager.Instance.GetSkillProgressByType(skillCountCfg.type).ToString();
+            if (skillCountCfg.type <= LeagueDataManager.Instance.CurType)
+            {
+                item.m_txtTitle.text = string.Format("茶艺-{0}", skillCountCfg.name);
+            }
+            else
+            {
+                LeagueSkillCountCfg lastSkillCountCfg = LeagueSkillCountCfgArray.Instance.dataArray[index - 1];
+                item.m_txtTitle.text = string.Format("学习完茶艺-{0}后开启", lastSkillCountCfg.name);
+            }
+            double progress = LeagueDataManager.Instance.GetSkillProgressByType(skillCountCfg.type);
+            item.m_txtProgress.text = string.Format("进度{0}%", progress);
+            // item.m_txtProgress.text = LeagueDataManager.Instance.GetSkillProgressByType(skillCountCfg.type).ToString();
             if (item.target.data == null)
             {
                 item.target.onClick.Add(OnUpSkillClick);
             }
+            item.target.data = skillCountCfg.type;
             UI_ListSkillTypeItem.ProxyEnd();
         }
 
@@ -97,7 +116,12 @@ namespace GFGGame
         {
             GObject obj = context.sender as GObject;
             int type = (int)obj.data;
-            ViewManager.Show<LeagueSkillUpView>(type);
+            if (type > LeagueDataManager.Instance.CurType)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("学完前一类所有技能开启");
+                return;
+            }
+            ViewManager.Show<LeagueSkillUpView>(type, new object[] { typeof(LeagueSkillView).FullName });
         }
     }
 }

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

@@ -37,6 +37,7 @@ namespace GFGGame
             _ui.m_btnPray.target.onClick.Add(OnBtnPrayClick);
             _ui.m_btnSkill.target.onClick.Add(OnBtnSkillClick);
             _ui.m_btnAnswer.target.onClick.Add(OnBtnAnswerClick);
+            _ui.m_btnGift.target.onClick.Add(OnBtnGiftClick);
         }
         protected override void AddEventListener()
         {
@@ -97,6 +98,10 @@ namespace GFGGame
         {
             ViewManager.Show<LeagueAnswerView>(null, new object[] { typeof(LeagueView).FullName, null });
         }
+        private void OnBtnGiftClick()
+        {
+            ViewManager.Show<LeagueGiftView>(null, new object[] { typeof(LeagueView).FullName, null });
+        }
         private void UpdateView()
         {
             UpdateInfo();

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


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_4!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_4.png


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