zouweichen 4 giorni fa
parent
commit
a073a7c29c
45 ha cambiato i file con 465 aggiunte e 207 eliminazioni
  1. 7 1
      Assets/AssetConfigs/Addressable/CustomSearch.txt
  2. 24 0
      Assets/AssetConfigs/Addressable/ProductAssetManifest.asset
  3. BIN
      Assets/Res/Addressable/FGUI/Common/Common_atlas0.png
  4. BIN
      Assets/Res/Addressable/FGUI/Common/Common_fui.bytes
  5. BIN
      Assets/Res/Addressable/FGUI/Partner/Partner_fui.bytes
  6. 1 2
      Assets/Scripts/Business/Runtime/Data/Items/ItemData.cs
  7. 35 3
      Assets/Scripts/Business/Runtime/Data/Partners/PartnersData.cs
  8. 29 1
      Assets/Scripts/Business/Runtime/Data/Partners/PartnersService.cs
  9. 4 4
      Assets/Scripts/Business/Runtime/Event/EventDefine.cs
  10. 0 2
      Assets/Scripts/Business/Runtime/FGUI/Common/ItemBase/CommonItemBaseVM.Gen.cs
  11. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/MainPanel/PartnerMainPanelCtrl.cs
  12. 1 5
      Assets/Scripts/Business/Runtime/FGUI/Partner/PartnerBookListItem/PartnerPartnerBookListItemCtrl.cs
  13. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/PartnerUpListItem/PartnerPartnerUpListItemCtrl.cs
  14. 1 1
      Assets/Scripts/Business/Runtime/FGUI/Partner/ReplacePartnerListItem/PartnerReplacePartnerListItemCtrl.cs
  15. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/ReplacePartnerPanel/PartnerReplacePartnerPanelCtrl.cs
  16. 2 1
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbBagListItem/PartnerSbBagListItemCtrl.cs
  17. 34 35
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbBaseItem/PartnerSbBaseItemCtrl.cs
  18. 8 22
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbDetailNested/PartnerSbDetailNestedCtrl.cs
  19. 3 3
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbDetailNested/PartnerSbDetailNestedVM.Gen.cs
  20. 1 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbDetailNoIconNested/PartnerSbDetailNoIconNestedCtrl.cs
  21. 3 11
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbItem/PartnerSbItemCtrl.cs
  22. 2 0
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbLevelUpBtn/PartnerSbLevelUpBtnCtrl.cs
  23. 88 40
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbMainPanel/PartnerSbMainPanelCtrl.cs
  24. 18 5
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbReplacePanel/PartnerSbReplacePanelCtrl.cs
  25. 3 1
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbStarUpBtn/PartnerSbStarUpBtnCtrl.cs
  26. 85 20
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbStrengthPanel/PartnerSbStrengthPanelCtrl.cs
  27. 4 0
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbStrengthPanel/PartnerSbStrengthPanelVM.Gen.cs
  28. 7 1
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbUpLineListItem/PartnerSbUpLineListItemCtrl.cs
  29. 23 19
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbUpListItem/PartnerSbUpListItemCtrl.cs
  30. 21 7
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbUpPanel/PartnerSbUpPanelCtrl.cs
  31. 7 0
      Assets/Scripts/Business/Runtime/Network/Controllers/ActShengBingPushCtrl.cs
  32. 13 0
      Assets/Scripts/Business/Runtime/Network/Controllers/ActShengbingShangzhenPushCtrl.cs
  33. 3 0
      Assets/Scripts/Business/Runtime/Network/Controllers/ShengbingNewUnfixResponseCtrl.cs
  34. 4 0
      Assets/Scripts/Business/Runtime/Network/Controllers/ShengbingNewWearResponseCtrl.cs
  35. 1 0
      Assets/Scripts/Business/Runtime/Network/Controllers/ShengbingWearAllResponseCtrl.cs
  36. 4 1
      Assets/Scripts/Business/Runtime/Nodes/Login/TableComponent.cs
  37. 1 1
      fl-fgui-project/assets/Partner/Book/item/PartnerBookGroupListItem.xml
  38. 3 3
      fl-fgui-project/assets/Partner/Book/item/PartnerBookListItem.xml
  39. 4 4
      fl-fgui-project/assets/Partner/NewPartner/SbMainPanel.xml
  40. 9 0
      fl-fgui-project/assets/Partner/NewPartner/SbStrengthPanel.xml
  41. 0 0
      fl-fgui-project/assets/Partner/NewPartner/design/img/partner_icon_20121.png
  42. 2 2
      fl-fgui-project/assets/Partner/NewPartner/item/SbDetailNested.xml
  43. 1 1
      fl-fgui-project/assets/Partner/NewPartner/item/SbLevelUpBtn.xml
  44. 2 2
      fl-fgui-project/assets/Partner/NewPartner/item/SbUpLineListItem.xml
  45. 1 1
      fl-fgui-project/assets/Partner/package.xml

+ 7 - 1
Assets/AssetConfigs/Addressable/CustomSearch.txt

@@ -1,4 +1,4 @@
-574
+580
 Assets/Res/Addressable/Tables/achieveRewardTable.bytes
 Assets/Res/Addressable/Fonts/ALIMAMA_SDF.asset
 Assets/Res/Addressable/Fonts/ALIMAMA_SDF_outline.mat
@@ -6,6 +6,11 @@ Assets/Res/Addressable/Fonts/ALIMAMA_SHUHEITI_BOLD_0.TTF
 Assets/Res/Addressable/Tables/arena_jqrTable.bytes
 Assets/Res/Addressable/Tables/arena_phbTable.bytes
 Assets/Res/Addressable/Tables/arenaTable.bytes
+Assets/Res/Addressable/Tables/artifactBaseTable.bytes
+Assets/Res/Addressable/Tables/artifactBuweiTable.bytes
+Assets/Res/Addressable/Tables/artifactInfoTable.bytes
+Assets/Res/Addressable/Tables/artifactProbTable.bytes
+Assets/Res/Addressable/Tables/artifactStarTable.bytes
 Assets/Res/Addressable/Map/Effects/atk_007.prefab
 Assets/Res/Addressable/Tables/AttrDescTable.bytes
 Assets/Res/Addressable/FGUI/Bag/Bag_atlas0.png
@@ -307,6 +312,7 @@ Assets/Res/Addressable/Map/monster_1001101.prefab
 Assets/Res/Addressable/Map/monster_1001102.prefab
 Assets/Res/Addressable/UI/Prefabs/MainMap/MonsterBattleInfo.prefab
 Assets/Res/Addressable/Tables/MonsterTable.bytes
+Assets/Res/Addressable/FGUI/Mount/Mount_atlas0.png
 Assets/Res/Addressable/FGUI/Mount/Mount_fui.bytes
 Assets/Res/Addressable/Map/Partners/partner_20111.prefab
 Assets/Res/Addressable/Map/Partners/partner_20121.prefab

+ 24 - 0
Assets/AssetConfigs/Addressable/ProductAssetManifest.asset

@@ -41,6 +41,26 @@ MonoBehaviour:
     addressableName: arenatable
     assetGUID: 2e6cb36f5453fe443a69036c1b2752ce
     relativePath: 
+  - addressableId: 305600460
+    addressableName: artifactbasetable
+    assetGUID: 0916fadbc1101ac43a0ba2cd60545f7f
+    relativePath: 
+  - addressableId: 1135962656
+    addressableName: artifactbuweitable
+    assetGUID: 780196a323a11f94ba203c043845dda4
+    relativePath: 
+  - addressableId: 442132775
+    addressableName: artifactinfotable
+    assetGUID: d7a8740993c61c0479d382b3b753be47
+    relativePath: 
+  - addressableId: 2435798908
+    addressableName: artifactprobtable
+    assetGUID: 368fa31ed8f94a64e8210538385ab845
+    relativePath: 
+  - addressableId: 2059057615
+    addressableName: artifactstartable
+    assetGUID: 0a312c9c4cc2cea4eb679d7dda8fd4f2
+    relativePath: 
   - addressableId: 876827239
     addressableName: atk_007
     assetGUID: 8c3c4f45ebedff142800eb1570dee241
@@ -1245,6 +1265,10 @@ MonoBehaviour:
     addressableName: monstertable
     assetGUID: a8d28a3bbd6a9894b8bad1e0f9c1bb06
     relativePath: 
+  - addressableId: 1145831894
+    addressableName: mount_atlas0
+    assetGUID: 84a09099833b4184d96aa9437337e6f7
+    relativePath: 
   - addressableId: 3081535030
     addressableName: mount_fui
     assetGUID: a23db4976f0259245a8bd8defc9ad821

BIN
Assets/Res/Addressable/FGUI/Common/Common_atlas0.png


BIN
Assets/Res/Addressable/FGUI/Common/Common_fui.bytes


BIN
Assets/Res/Addressable/FGUI/Partner/Partner_fui.bytes


+ 1 - 2
Assets/Scripts/Business/Runtime/Data/Items/ItemData.cs

@@ -26,7 +26,7 @@ namespace FL.Data
         {
             if (_bagItemDataDic.ContainsKey(tableId))
             {
-                _bagItemDataDic[tableId].num += count;
+                _bagItemDataDic[tableId].num = count;
                 if (_bagItemDataDic[tableId].num == 0)
                 {
                     // 移除
@@ -34,7 +34,6 @@ namespace FL.Data
                 }
                 return;
             }
-
             _bagItemDataDic.Add(tableId, new BagItemData()
             {
                 tableId = tableId,

+ 35 - 3
Assets/Scripts/Business/Runtime/Data/Partners/PartnersData.cs

@@ -1,5 +1,4 @@
-
-using System;
+using System;
 using System.Collections.Generic;
 using UnityEngine;
 using XGame;
@@ -52,7 +51,37 @@ namespace FL.Data
             new Vector3(-2.5f, -0.3f, 0),
         };
 
-        #region 圣兵方案
+        #region 圣兵上阵 新
+        /// <summary>
+        /// 已上阵的随从->位置
+        /// key:随从的tableId
+        /// value:位置索引(0-5)
+        /// 没有上阵为-1
+        /// </summary>
+        public Dictionary<int, int> UpSbPosMap { get; private set; } = new();
+        public Dictionary<long, int> UpSbUIDPosMap { get; private set; } = new();
+        public Dictionary<int, int> UpSbMap { get; private set; } = new();
+        public void ClearSbUpMap()
+        {
+            UpSbMap.Clear();
+
+        }
+        public void UpdateUpSbPosMap()
+        {
+            UpSbUIDPosMap.Clear();
+            UpSbPosMap.Clear();
+            foreach (var pair in UpSbMap)
+            {
+                if (pair.Value > 0)
+                {
+                    var attr = GetPartnerAttrByTableId(pair.Value);
+                    UpSbPosMap.Add(attr.TableId, pair.Key);
+                    UpSbUIDPosMap.Add(attr.UID, pair.Key);
+                }
+            }
+        }
+        #endregion
+        #region 圣兵方案 待废弃
         /// <summary>
         /// 使用方案id
         /// </summary>
@@ -270,15 +299,18 @@ namespace FL.Data
         #endregion
         #region 羁绊
         private Dictionary<int, bool> _map = new Dictionary<int, bool>();
+
         public void ClearJibanRwd()
         {
             _map.Clear();
         }
+
         public void SetJibanRwdState(int jibanId, int level)
         {
             var id = 100000 + jibanId * 1000 + level;
             _map.Add(id, true);
         }
+
         public bool GetJibanRwdIsGot(int jibanId, int level)
         {
             var id = 100000 + jibanId * 1000 + level;

+ 29 - 1
Assets/Scripts/Business/Runtime/Data/Partners/PartnersService.cs

@@ -107,6 +107,21 @@ namespace FL.Data
         }
 
         /// <summary>
+        /// 圣兵上阵
+        /// </summary>
+        /// <param name="posId">槽位id 0开始</param>
+        /// <param name="id">圣兵id</param>
+        public void RequestPartnerUpNew(int posId, int id)
+        {
+            var sbAttr = PartnersData.Instance.GetPartnerAttrByTableId(id);
+            if (sbAttr == null)
+                return;
+            var param = new ShengbingNewWearRequest() { caoId = posId, sbId = id };
+            (param as IMessage).Context = sbAttr.UID;
+            NetModule.Request(param);
+        }
+
+        /// <summary>
         /// 下阵圣兵
         /// </summary>
         /// <param name="sbId"></param>
@@ -119,6 +134,19 @@ namespace FL.Data
             NetModule.Request(param);
         }
 
+        /// <summary>
+        /// 下阵圣兵
+        /// </summary>
+        /// <param name="sbId"></param>
+        public void RequestPartnerDownNew(int sbId)
+        {
+            var sbAttr = PartnersData.Instance.GetPartnerAttrByTableId(sbId);
+            var pos = PartnersData.Instance.UpSbPosMap.GetValueOrDefault(sbId, -1);
+            var param = new ShengbingNewUnfixRequest() { caoId = pos };
+            (param as IMessage).Context = sbAttr.UID;
+            NetModule.Request(param);
+        }
+
         public void RequestStarUp(int sbId)
         {
             var param = new ShengbingUpStarRequest() { sbId = sbId };
@@ -131,7 +159,7 @@ namespace FL.Data
             NetModule.Request(param);
         }
 
-        private void OpenUpPartnerMode(int id)
+        public void OpenUpPartnerMode(int id)
         {
             PartnersData.Instance.UpModeSelect = id;
             EventSingle.Instance.Notify(EventDefine.PartnerOpenUpMode, id);

+ 4 - 4
Assets/Scripts/Business/Runtime/Event/EventDefine.cs

@@ -175,13 +175,13 @@
         /// </summary>
         PartnerFinishUpMode,
         /// <summary>
-        /// 圣兵上阵模式选择
+        /// 圣兵主界面选择
         /// </summary>
-        PartnerUpModeSelect,
+        PartnerMainSelect,
         /// <summary>
-        /// 选择替换的圣兵
+        /// 上阵界面的圣兵选择
         /// </summary>
-        PartnerSelectReplace,
+        PartnerUpSelect,
         #endregion
         #region Toasts Tips 3400 - 3499
         ShowTips = 3400,

+ 0 - 2
Assets/Scripts/Business/Runtime/FGUI/Common/ItemBase/CommonItemBaseVM.Gen.cs

@@ -23,7 +23,6 @@ namespace FL.FGUI
         public GTextField CountLabel { get; private set; }
         public GTextField LvLabel { get; private set; }
         public GButton ItemBtn { get; private set; }
-        public GImage MaskImg { get; private set; }
 
         protected override void BindComponents(GComponent panel, IUIViewAdapter adapter)
         {
@@ -32,7 +31,6 @@ namespace FL.FGUI
             CountLabel = panel.GetChild("CountLabel") as GTextField;
             LvLabel = panel.GetChild("LvLabel") as GTextField;
             ItemBtn = panel.GetChild("ItemBtn") as GButton;
-            MaskImg = panel.GetChild("MaskImg") as GImage;
 
         }
     }

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Partner/MainPanel/PartnerMainPanelCtrl.cs

@@ -122,7 +122,7 @@ namespace FL.FGUI
             EventSingle.Instance.AddListener(EventDefine.PartnerFinishUpMode, OnFinishUpMode);
             EventSingle.Instance.AddListener(EventDefine.PartnerOpenUpMode, OnOpenUpMode);
             EventSingle.Instance.AddListener(
-                EventDefine.PartnerUpModeSelect,
+                EventDefine.PartnerMainSelect,
                 OnPartnerUpModeSelect
             );
             EventSingle.Instance.AddListener(EventDefine.EpigraphFinishUpMode, OnFinishUpMode);
@@ -144,7 +144,7 @@ namespace FL.FGUI
             EventSingle.Instance.RemoveListener(EventDefine.PartnerFinishUpMode, OnFinishUpMode);
             EventSingle.Instance.RemoveListener(EventDefine.PartnerOpenUpMode, OnOpenUpMode);
             EventSingle.Instance.RemoveListener(
-                EventDefine.PartnerUpModeSelect,
+                EventDefine.PartnerMainSelect,
                 OnPartnerUpModeSelect
             );
             EventSingle.Instance.RemoveListener(EventDefine.EpigraphFinishUpMode, OnFinishUpMode);

+ 1 - 5
Assets/Scripts/Business/Runtime/FGUI/Partner/PartnerBookListItem/PartnerPartnerBookListItemCtrl.cs

@@ -37,11 +37,7 @@ namespace FL.FGUI
         public void OnRefresh(int index, int id)
         {
             var table = PartnerTableRepo.Get(id);
-            if (table == null)
-            {
-                Log.Error($"圣兵表不存在,id:{id}");
-                return;
-            }
+            XGame.Framework.Assert.IsNotNull(table, $"圣兵表不存在,id:{id}");
             VM.SbLoader.icon = table.Icon;
             VM.NameLabel.text = table.Name;
             if (!PartnersData.Instance.TryGetPartnerAttrByTableId(id, out var attr))

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Partner/PartnerUpListItem/PartnerPartnerUpListItemCtrl.cs

@@ -46,7 +46,7 @@ namespace FL.FGUI
         {
             if (PartnersData.Instance.UpModeSelect > 0)
             {
-                EventSingle.Instance.Notify(EventDefine.PartnerUpModeSelect, _slotId);
+                EventSingle.Instance.Notify(EventDefine.PartnerMainSelect, _slotId);
             }
             else
             {
@@ -72,7 +72,7 @@ namespace FL.FGUI
         {
             if (PartnersData.Instance.UpModeSelect > 0)
             {
-                EventSingle.Instance.Notify(EventDefine.PartnerUpModeSelect, _slotId);
+                EventSingle.Instance.Notify(EventDefine.PartnerMainSelect, _slotId);
             }
             else if (_sbId > 0)
             {

+ 1 - 1
Assets/Scripts/Business/Runtime/FGUI/Partner/ReplacePartnerListItem/PartnerReplacePartnerListItemCtrl.cs

@@ -61,7 +61,7 @@ namespace FL.FGUI
 
         private void OnClickClickBtn(EventContext context)
         {
-            EventSingle.Instance.Notify(EventDefine.PartnerSelectReplace, _partnerId);
+            EventSingle.Instance.Notify(EventDefine.PartnerUpSelect, _partnerId);
         }
         #endregion
 

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Partner/ReplacePartnerPanel/PartnerReplacePartnerPanelCtrl.cs

@@ -94,7 +94,7 @@ namespace FL.FGUI
         private void AddEventListener()
         {
             EventSingle.Instance.AddListener(
-                EventDefine.PartnerSelectReplace,
+                EventDefine.PartnerUpSelect,
                 SelectReplacePartner
             );
             EventSingle.Instance.AddListener(EventDefine.PartnerBinding, OnInfoUpdate);
@@ -106,7 +106,7 @@ namespace FL.FGUI
         private void RemoveEventListener()
         {
             EventSingle.Instance.RemoveListener(
-                EventDefine.PartnerSelectReplace,
+                EventDefine.PartnerUpSelect,
                 SelectReplacePartner
             );
             EventSingle.Instance.RemoveListener(EventDefine.PartnerBinding, OnInfoUpdate);

+ 2 - 1
Assets/Scripts/Business/Runtime/FGUI/Partner/SbBagListItem/PartnerSbBagListItemCtrl.cs

@@ -4,6 +4,7 @@
 /// 该脚本由模板创建
 /// created by cb 2024
 
+using System.Collections.Generic;
 using FairyGUI;
 using FL.Data;
 using XGame;
@@ -57,7 +58,7 @@ namespace FL.FGUI
             }
             VM.NameLabel.text = table.Name;
             VM.SbItem.Ctrl.ShowUI(_id);
-            var pos = PartnersData.Instance.GetPartnerUpPosById(_id);
+            var pos = PartnersData.Instance.UpSbPosMap.GetValueOrDefault(_id, -1);
             VM.IsUP.selectedIndex = pos < 0 ? 0 : 1;
         }
     }

+ 34 - 35
Assets/Scripts/Business/Runtime/FGUI/Partner/SbBaseItem/PartnerSbBaseItemCtrl.cs

@@ -41,54 +41,53 @@ namespace FL.FGUI
         {
             if (sbId <= 0)
             {
-                VM.PartnerImg.visible = false;
                 VM.QualityImg.icon = AddressableDefine.SbEmptyDi();
-                VM.ShowOther.selectedIndex = 1;
+                VM.ShowOther.selectedIndex = 1;
+                VM.PartnerImg.visible = false;
                 VM.LevelTxt.visible = false;
-                return;
-            }
-            var table = PartnerTableRepo.Get(sbId);
-            if (table == null)
-            {
-                Log.Error($"圣兵表不存在id:{sbId}");
+                VM.ElementLoader.visible = false;
                 return;
             }
             VM.PartnerImg.visible = true;
+            VM.LevelTxt.visible = true;
+            VM.ElementLoader.visible = true;
+            var table = PartnerTableRepo.Get(sbId);
+            XGame.Framework.Assert.IsNotNull(table, $"圣兵表不存在id:{sbId}");
             VM.ElementLoader.url = AddressableDefine.SbElementTypeRhombus((int)table.Element);
             VM.QualityImg.icon = AddressableDefine.SbPzDi((int)table.Quality);
-            VM.PartnerImg.icon = table.Icon;
+            VM.PartnerImg.icon = table.Icon;
             VM.ShowOther.selectedIndex = showOther ? 0 : 1;
             var partnerData = PartnersData.Instance.GetPartnerAttrByTableId(sbId);
             VM.Have.selectedIndex = partnerData != null ? 0 : 1;
-            if(partnerData != null)
-            {
+            if (partnerData != null)
+            {
                 var level = partnerData?.Level ?? 1;
-                VM.LevelTxt.text = $"LV.{level}";
-                if (showOther)
-                {
-                    var starLv = partnerData?.RisingStarLv == null ? 1 : partnerData.RisingStarLv;
-                    ShowStar(starLv);
-                    var starTable = partnerStarUpTableRepo.GetPartnerStarTable(sbId, starLv);
-                    if (starTable == null)
-                    {
-                        Log.Error($"圣兵升星表不存在,id:{sbId},starLv:{starLv}");
-                        return;
-                    }
-                    VM.SpPbar.max = starTable.StarUpCost;
-                    VM.SpPbar.value = ItemData.Instance.GetItemNum(starTable.PetId);
-                }
+                VM.LevelTxt.text = $"LV.{level}";
+                if (showOther)
+                {
+                    var starLv = partnerData?.RisingStarLv == null ? 1 : partnerData.RisingStarLv;
+                    ShowStar(starLv);
+                    var starTable = partnerStarUpTableRepo.GetPartnerStarTable(sbId, starLv);
+                    XGame.Framework.Assert.IsNotNull(
+                        starTable,
+                        $"圣兵升星表不存在,id:{sbId},starLv:{starLv}"
+                    );
+                    VM.SpPbar.max = starTable.StarUpCost;
+                    VM.SpPbar.value = ItemData.Instance.GetItemNum(starTable.PetId);
+                }
             }
         }
-        private void ShowStar(int starLv)
-        {
-            var curNum = PartnersService.Instance.GetStarLv(starLv);
-            var curStep = PartnersService.Instance.GetStarStep(starLv);
-            var list = new List<int>();
-            for (int i = 0; i < curNum; i++)
-            {
-                list.Add(curStep);
-            }
-            VM.StarList.BindDatas(list);
+
+        private void ShowStar(int starLv)
+        {
+            var curNum = PartnersService.Instance.GetStarLv(starLv);
+            var curStep = PartnersService.Instance.GetStarStep(starLv);
+            var list = new List<int>();
+            for (int i = 0; i < curNum; i++)
+            {
+                list.Add(curStep);
+            }
+            VM.StarList.BindDatas(list);
         }
     }
 }

+ 8 - 22
Assets/Scripts/Business/Runtime/FGUI/Partner/SbDetailNested/PartnerSbDetailNestedCtrl.cs

@@ -52,22 +52,16 @@ namespace FL.FGUI
                 VM.IsEmpty.selectedIndex = 0;
             }
             var table = PartnerTableRepo.Get(_sbId);
-            if (table == null)
-            {
-                Log.Error($"圣兵表不存在,id:{_sbId}");
-                return;
-            }
+            XGame.Framework.Assert.IsNotNull(table, $"圣兵表不存在,id:{_sbId}");
             VM.NameLabel.text = table.Name;
             var attr = PartnersData.Instance.GetPartnerAttrByTableId(_sbId);
             var level = attr?.Level ?? 1;
             var star = attr?.RisingStarLv ?? 1;
             var upLevelTable = partnerStarUpTableRepo.GetPartnerStarTable(_sbId, star);
-            if (upLevelTable == null)
-            {
-                Log.Error($"圣兵升星表不存在,id:{_sbId},level:{level}");
-                return;
-            }
-            //
+            XGame.Framework.Assert.IsNotNull(
+                upLevelTable,
+                $"圣兵升星表不存在,id:{_sbId},level:{level}"
+            );
             VM.SpPbar.max = upLevelTable.StarUpCost;
             VM.SpPbar.value = ItemData.Instance.GetItemNum(upLevelTable.PetId);
             //
@@ -80,7 +74,7 @@ namespace FL.FGUI
             VM.ElementLoader.url = AddressableDefine.SbElementType(((int)table.Element));
             VM.TypeLoader.url = AddressableDefine.SbTypeIcon(table.Type);
             //
-            VM.AttrLabel.text = $"+{table.Own_attr[1]/100f}%";
+            VM.AttrLabel.text = $"+{table.Own_attr[1] / 100f}%";
             var item = new ItemBase();
             //item.Init(table, table.Id);
             //VM.ItemBase.Ctrl.ShowUI()
@@ -101,11 +95,7 @@ namespace FL.FGUI
         private void ShowAttr(int level)
         {
             var lvTable = partnerLvUpTableRepo.GetPartnerLvUpTable(_sbId, level);
-            if (lvTable == null)
-            {
-                Log.Error($"圣兵等级不存在,id:{_sbId},level:{level}");
-                return;
-            }
+            XGame.Framework.Assert.IsNotNull(lvTable, $"圣兵等级不存在,id:{_sbId},level:{level}");
             var atkVal = lvTable.LvAttr[1];
             //var attributeInfo = AttrDescTableRepo.Get(attrType);
             string descAtk = atkVal > 0 ? TableUtils.ToRealDouble(atkVal).ToString("F1") : "0";
@@ -124,11 +114,7 @@ namespace FL.FGUI
         private void ShowSkillBaseInfo(int skillId)
         {
             var skillInfo = SkillTableRepo.Get(skillId);
-            if (skillInfo == null)
-            {
-                Log.Error($"技能表不存在,id{skillId}");
-                return;
-            }
+            XGame.Framework.Assert.IsNotNull(skillInfo, $"技能表不存在,id{skillId}");
             VM.DescLabel.text = skillInfo.Desc;
         }
     }

+ 3 - 3
Assets/Scripts/Business/Runtime/FGUI/Partner/SbDetailNested/PartnerSbDetailNestedVM.Gen.cs

@@ -19,7 +19,6 @@ namespace FL.FGUI
     public partial class PartnerSbDetailNestedVM : FguiViewModel
     {
         public Controller IsEmpty { get; private set; }
-        public CommonItemBaseView ItemBase { get; private set; }
         public GTextField AtkValLabel { get; private set; }
         public GTextField SpeedValLabel { get; private set; }
         public GTextField AttrLabel { get; private set; }
@@ -30,12 +29,11 @@ namespace FL.FGUI
         public GLoader TypeLoader { get; private set; }
         public GProgressBar SpPbar { get; private set; }
         public GGroup SpGroup { get; private set; }
+        public CommonItemBaseView ItemBase { get; private set; }
 
         protected override void BindComponents(GComponent panel, IUIViewAdapter adapter)
         {
             IsEmpty = panel.GetController("IsEmpty");
-            ItemBase = adapter.CreateNested<CommonItemBaseView>(new FguiNested(panel.GetChild("ItemBase").asCom), true);
-            AddChild(ItemBase);
             AtkValLabel = panel.GetChild("AtkValLabel") as GTextField;
             SpeedValLabel = panel.GetChild("SpeedValLabel") as GTextField;
             AttrLabel = panel.GetChild("AttrLabel") as GTextField;
@@ -47,6 +45,8 @@ namespace FL.FGUI
             TypeLoader = panel.GetChild("TypeLoader") as GLoader;
             SpPbar = panel.GetChild("SpPbar") as GProgressBar;
             SpGroup = panel.GetChild("SpGroup") as GGroup;
+            ItemBase = adapter.CreateNested<CommonItemBaseView>(new FguiNested(panel.GetChild("ItemBase").asCom), true);
+            AddChild(ItemBase);
 
         }
     }

+ 1 - 2
Assets/Scripts/Business/Runtime/FGUI/Partner/SbDetailNoIconNested/PartnerSbDetailNoIconNestedCtrl.cs

@@ -7,7 +7,6 @@
 using System.Collections.Generic;
 using FairyGUI;
 using FL.Data;
-using log4net.Core;
 using XGame;
 using XGame.Database;
 using XGame.Framework.UI;
@@ -61,7 +60,7 @@ namespace FL.FGUI
             VM.TypeLoader.url = AddressableDefine.SbTypeIcon(table.Type);
             ShowBuff(star);
             //
-            var pos = PartnersData.Instance.GetPartnerUpPosById(_sbId);
+            var pos = PartnersData.Instance.UpSbPosMap.GetValueOrDefault(_sbId, -1);
             VM.IsUp.selectedIndex = pos < 0 ? 0 : 1;
         }
 

+ 3 - 11
Assets/Scripts/Business/Runtime/FGUI/Partner/SbItem/PartnerSbItemCtrl.cs

@@ -33,7 +33,7 @@ namespace FL.FGUI
 
         #endregion
 
-        public void ShowUI(int id, int planId = -1, int slotId = -1)
+        public void ShowUI(int id)
         {
             VM.PartnerBase.Ctrl.ShowUI(id, true);
             bool isEmpty = id <= 0;
@@ -44,16 +44,8 @@ namespace FL.FGUI
                 return;
             }
             VM.EpiSetBase.Enable(null);
-            if (planId >= 0 && slotId >= 0)
-            {
-                var slot = PartnersData.Instance.GetPlanSlot(planId, slotId);
-                VM.EpiSetBase.Ctrl.SetData(slot?.MwId ?? 0, id, false);
-            }
-            else
-            {
-                var info = PartnersData.Instance.GetPartnerAttrByTableId(id);
-                VM.EpiSetBase.Ctrl.SetData(info?.EpigraphId ?? 0, id, false);
-            }
+            var info = PartnersData.Instance.GetPartnerAttrByTableId(id);
+            VM.EpiSetBase.Ctrl.SetData(info?.EpigraphId ?? 0, id, false);
         }
     }
 }

+ 2 - 0
Assets/Scripts/Business/Runtime/FGUI/Partner/SbLevelUpBtn/PartnerSbLevelUpBtnCtrl.cs

@@ -46,6 +46,8 @@ namespace FL.FGUI
                 return;
             }
             VM.CostLabel.Ctrl.SetData(upLevelTable.LevelUpCost[0], upLevelTable.LevelUpCost[1]);
+            var num = ItemData.Instance.GetItemNum(upLevelTable.LevelUpCost[0]);
+            VM.Grayed.selectedIndex = num >= upLevelTable.LevelUpCost[1] ? 0 : 1;
         }
     }
 }

+ 88 - 40
Assets/Scripts/Business/Runtime/FGUI/Partner/SbMainPanel/PartnerSbMainPanelCtrl.cs

@@ -8,6 +8,7 @@ using System.Collections.Generic;
 using FairyGUI;
 using FL.Data;
 using XGame;
+using XGame.Database;
 using XGame.Framework.UI;
 
 namespace FL.FGUI
@@ -43,10 +44,12 @@ namespace FL.FGUI
             VM.CancelBtn.onClick.Add(OnClickCancelBtn);
             EventSingle.Instance.AddListener(EventDefine.PartnerFinishUpMode, OnFinishUpMode);
             EventSingle.Instance.AddListener(EventDefine.PartnerOpenUpMode, OnOpenUpMode);
-            EventSingle.Instance.AddListener(
-                EventDefine.PartnerUpModeSelect,
-                OnPartnerUpModeSelect
-            );
+            EventSingle.Instance.AddListener(EventDefine.PartnerMainSelect, OnPartnerUpModeSelect);
+            EventSingle.Instance.AddListener(EventDefine.PartnerUpLevel, OnUpLevel);
+            EventSingle.Instance.AddListener(EventDefine.PartnerUpStar, OnUpStar);
+            EventSingle.Instance.AddListener(EventDefine.PartnerDown, OnSbUp);
+            EventSingle.Instance.AddListener(EventDefine.PartnerUp, OnSbUp);
+            EventSingle.Instance.AddListener(EventDefine.PartnerWearAll, OnSbUp);
         }
 
         private void RemoveUIListenres()
@@ -62,44 +65,78 @@ namespace FL.FGUI
             EventSingle.Instance.RemoveListener(EventDefine.PartnerFinishUpMode, OnFinishUpMode);
             EventSingle.Instance.RemoveListener(EventDefine.PartnerOpenUpMode, OnOpenUpMode);
             EventSingle.Instance.RemoveListener(
-                EventDefine.PartnerUpModeSelect,
+                EventDefine.PartnerMainSelect,
                 OnPartnerUpModeSelect
             );
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpLevel, OnUpLevel);
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpStar, OnUpStar);
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerDown, OnSbUp);
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerUp, OnSbUp);
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerWearAll, OnSbUp);
         }
 
-        private void OnClickReplaceBtn(EventContext context) {
-            Context.UI.OpenAsync(UIKeys.PartnerSbReplacePanel, _sbId);
+        private void OnSbUp(int eventId, object args)
+        {
+            RefreshGoneUpPartners(false);
+            UpdateDetail();
+        }
+        private void OnUpLevel(int eventId, object args)
+        {
+            RefreshGoneUpPartners(false);
+            UpdateDetail();
+        }
+
+        private void OnUpStar(int eventId, object args)
+        {
+            RefreshGoneUpPartners(false);
+            UpdateDetail();
+        }
+
+        private void OnClickReplaceBtn(EventContext context)
+        {
+            Context.UI.OpenAsync(UIKeys.PartnerSbReplacePanel, _curSelectPos);
         }
 
         private void OnClickStrengthBtn(EventContext context)
         {
-            var slot = PartnersData.Instance.GetPlanSlot(
-                PartnersData.Instance.UsePlanId,
-                _curSelectPos
-            );
-            if (slot == null || slot.SbId == 0)
+            var sbId = PartnersData.Instance.UpSbMap.GetValueOrDefault(_curSelectPos, 0);
+            if (sbId <= 0)
             {
                 Context.ShowTips(StringDefine.PartnerEmptyTips);
                 return;
             }
-            Context.UI.OpenAsync(UIKeys.PartnerSbStrengthPanel, slot.SbId);
+            Context.UI.OpenAsync(UIKeys.PartnerSbStrengthPanel, sbId);
         }
 
-        private void OnClickOneUpBtn(EventContext context) { }
+        private void OnClickOneUpBtn(EventContext context)
+        {
+            PartnersService.Instance.RequestPartnerOneKeyUp();
+        }
 
-        private void OnClickRecommendBtn(EventContext context) {
+        private void OnClickRecommendBtn(EventContext context)
+        {
             Context.UI.OpenAsync(UIKeys.PartnerSbRecommendPanel);
         }
 
-        private void OnClickBagBtn(EventContext context) {
+        private void OnClickBagBtn(EventContext context)
+        {
             Context.UI.OpenAsync(UIKeys.PartnerSbBagPanel);
         }
 
         private void OnClickMaskBtn(EventContext context) { }
 
-        private void OnClickConfirmBtn(EventContext context) { }
+        private void OnClickConfirmBtn(EventContext context)
+        {
+            PartnersService.Instance.RequestPartnerUpNew(
+                _curSelectPos,
+                PartnersData.Instance.UpModeSelect
+            );
+        }
 
-        private void OnClickCancelBtn(EventContext context) { }
+        private void OnClickCancelBtn(EventContext context)
+        {
+            PartnersService.Instance.FinishUpPartnerMode();
+        }
 
         /// <summary>
         /// 圣兵上阵打开事件
@@ -119,9 +156,18 @@ namespace FL.FGUI
         private void OnPartnerUpModeSelect(int eventId, object args)
         {
             var pos = (int)args;
+            if (PartnersData.Instance.UpModeSelect <= 0)
+            {
+                var sbId = PartnersData.Instance.UpSbMap.GetValueOrDefault(pos, 0);
+                if (sbId == 0)
+                {
+                    Context.UI.OpenAsync(UIKeys.PartnerSbUpPanel, pos);
+                }
+            }
             if (pos == _curSelectPos)
                 return;
             _curSelectPos = pos;
+            RefreshGoneUpPartners(false);
             UpdateDetail();
         }
         #endregion
@@ -143,6 +189,7 @@ namespace FL.FGUI
         {
             RefreshGoneUpPartners(true);
             UpdateDetail();
+            UpdateAttr();
         }
 
         private void ShowUpMode()
@@ -151,10 +198,6 @@ namespace FL.FGUI
             {
                 VM.UpPartner.selectedIndex = 1;
             }
-            else if (EpigraphData.Instance.UpModeSelect > 0)
-            {
-                VM.UpPartner.selectedIndex = 1;
-            }
             else
             {
                 VM.UpPartner.selectedIndex = 0;
@@ -163,19 +206,13 @@ namespace FL.FGUI
 
         private void RefreshGoneUpPartners(bool chooseFirstSb)
         {
-            var plan = PartnersData.Instance.CurUsePlan;
-            if (plan == null)
-            {
-                Log.Error($"圣兵上阵方案不存在,id:{PartnersData.Instance.CurUsePlan}");
-                return;
-            }
             if (chooseFirstSb)
             {
                 _curSelectPos = 0;
                 for (int i = 0; i < PartnersData.GoneUpLimit; i++)
                 {
-                    var slot = plan.GetSlot(i);
-                    if (slot?.SbId > 0)
+                    var sbId = PartnersData.Instance.UpSbMap.GetValueOrDefault(i, 0);
+                    if (sbId > 0)
                     {
                         _curSelectPos = i;
                         break;
@@ -197,16 +234,9 @@ namespace FL.FGUI
 
         private void UpdateDetail()
         {
-            var plan = PartnersData.Instance.CurUsePlan;
-            if (plan == null)
-            {
-                Log.Error($"圣兵上阵方案不存在,id:{PartnersData.Instance.CurUsePlan}");
-                return;
-            }
-            var slot = plan.GetSlot(_curSelectPos);
-            _sbId = slot?.SbId ?? 0;
-            VM.SbDetailNested.Ctrl.ShowUI(slot?.SbId ?? 0);
-            if (slot == null || slot.SbId == 0)
+            var sbId = PartnersData.Instance.UpSbMap.GetValueOrDefault(_curSelectPos, 0);
+            VM.SbDetailNested.Ctrl.ShowUI(sbId);
+            if (sbId == 0)
             {
                 VM.IsEmpty.selectedIndex = 1;
             }
@@ -214,6 +244,24 @@ namespace FL.FGUI
             {
                 VM.IsEmpty.selectedIndex = 0;
             }
+            var gObj = VM.SbList.GetChildAt(_curSelectPos);
+            var localPos = gObj.position + VM.SbList.position;
+            localPos.x += gObj.width / 2;
+            VM.DownArr.x = localPos.x;
+            VM.ChangeArr.position = VM.DownArr.position;
+        }
+
+        private void UpdateAttr()
+        {
+            var sbList = PartnersData.Instance.PartnerList;
+            int val = 0;
+            foreach (var sb in sbList)
+            {
+                var table = PartnerTableRepo.Get(sb.TableId);
+                XGame.Framework.Assert.IsNotNull($"圣兵表不存在,id:{sb.TableId}");
+                val += table.Own_attr[1];
+            }
+            VM.AttrLabel.SetVar("val", (val / 100).ToString()).FlushVars();
         }
         #endregion
     }

+ 18 - 5
Assets/Scripts/Business/Runtime/FGUI/Partner/SbReplacePanel/PartnerSbReplacePanelCtrl.cs

@@ -19,7 +19,8 @@ namespace FL.FGUI
     {
         protected override void OnEnable(object intent)
         {
-            _id = (int)intent;
+            _pos = (int)intent;
+            _id = PartnersData.Instance.UpSbMap.GetValueOrDefault(_pos, 0);
             AddUIListenres();
             InitView();
             ShowUI();
@@ -31,12 +32,25 @@ namespace FL.FGUI
         }
 
         #region UI事件
-        private void AddUIListenres() { }
+        private void AddUIListenres()
+        {
+            EventSingle.Instance.AddListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
+        }
 
-        private void RemoveUIListenres() { }
+        private void RemoveUIListenres()
+        {
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
+        }
 
+        private void OnSelectUpSb(int eventId, object args)
+        {
+            var id = (int)args;
+            PartnersService.Instance.RequestPartnerUpNew(_pos, id);
+            Context.ClosePanel();
+        }
         #endregion
         private int _id;
+        private int _pos;
         private bool _initView;
 
         private void InitView()
@@ -55,8 +69,7 @@ namespace FL.FGUI
             var dataList = new List<int>();
             foreach (var item in list)
             {
-                if (item.TableId == _id)
-                    continue;
+                if (item.Status > 0) continue;
                 dataList.Add(item.TableId);
             }
             VM.List.BindDatas(dataList);

+ 3 - 1
Assets/Scripts/Business/Runtime/FGUI/Partner/SbStarUpBtn/PartnerSbStarUpBtnCtrl.cs

@@ -44,8 +44,10 @@ namespace FL.FGUI
                 Log.Error($"圣兵升星表不存在,id:{sbId},starlv:{star}");
                 return;
             }
+            var num = ItemData.Instance.GetItemNum(starUpTable.PetId);
             VM.SpPbar.max = starUpTable.StarUpCost;
-            VM.SpPbar.value = ItemData.Instance.GetItemNum(starUpTable.PetId);
+            VM.SpPbar.value = num;
+            VM.Grayed.selectedIndex = num >= starUpTable.StarUpCost ? 0 : 1;
         }
     }
 }

+ 85 - 20
Assets/Scripts/Business/Runtime/FGUI/Partner/SbStrengthPanel/PartnerSbStrengthPanelCtrl.cs

@@ -5,7 +5,6 @@
 /// created by cb 2024
 
 using System.Collections.Generic;
-using Codice.CM.Common;
 using FairyGUI;
 using FL.Data;
 using XGame;
@@ -40,6 +39,11 @@ namespace FL.FGUI
             VM.LeftBtn.onClick.Add(OnClickLeftBtn);
             VM.RightBtn.onClick.Add(OnClickRightBtn);
             //VM.MwSet.onClick.Add(OnClickMwSet);
+            VM.StarUpBtn.VM.PanelEvent.Add(OnClickStarUp);
+            VM.LevelUpBtn.VM.PanelEvent.Add(OnClickLevelUp);
+            VM.DownBtn.onClick.Add(OnClickDownBtn);
+            EventSingle.Instance.AddListener(EventDefine.PartnerUpLevel, OnUpLevel);
+            EventSingle.Instance.AddListener(EventDefine.PartnerUpStar, OnUpStar);
         }
 
         private void RemoveUIListenres()
@@ -48,9 +52,71 @@ namespace FL.FGUI
             VM.LeftBtn.onClick.Remove(OnClickLeftBtn);
             VM.RightBtn.onClick.Remove(OnClickRightBtn);
             //VM.MwSet.onClick.Remove(OnClickMwSet);
+            VM.StarUpBtn.VM.PanelEvent.Remove(OnClickStarUp);
+            VM.LevelUpBtn.VM.PanelEvent.Remove(OnClickLevelUp);
+            VM.DownBtn.onClick.Remove(OnClickDownBtn);
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpLevel, OnUpLevel);
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpStar, OnUpStar);
         }
 
-        private void OnClickUpBtn(EventContext context) { }
+        private void OnClickDownBtn(EventContext eventContext)
+        {
+            PartnersService.Instance.RequestPartnerDownNew(_curSelectId);
+            Context.ClosePanel();
+        }
+
+        private void OnUpStar(int eventId, object args)
+        {
+            ShowInfo();
+        }
+
+        private void OnUpLevel(int eventId, object args)
+        {
+            ShowInfo();
+        }
+
+        private void OnClickLevelUp()
+        {
+            var attr = PartnersData.Instance.GetPartnerAttrByTableId(_curSelectId);
+            var level = attr?.Level ?? 1;
+            var upLevelTable = partnerLvUpTableRepo.GetPartnerLvUpTable(_curSelectId, level);
+            XGame.Framework.Assert.IsNotNull(
+                upLevelTable,
+                $"圣兵升级表不存在,id:{_curSelectId},level:{level}"
+            );
+            if (
+                ItemService.Instance.IsEnough(
+                    upLevelTable.LevelUpCost[0],
+                    upLevelTable.LevelUpCost[1],
+                    true
+                )
+            )
+            {
+                PartnersService.Instance.RequestLvUp(_curSelectId);
+            }
+        }
+
+        private void OnClickStarUp(EventContext context)
+        {
+            var attr = PartnersData.Instance.GetPartnerAttrByTableId(_curSelectId);
+            var star = attr?.RisingStarLv ?? 1;
+            var starUpTable = partnerStarUpTableRepo.GetPartnerStarTable(_curSelectId, star);
+            XGame.Framework.Assert.IsNotNull(
+                starUpTable,
+                $"圣兵升星表不存在,id:{_curSelectId},starlv:{star}"
+            );
+            if (ItemService.Instance.IsEnough(starUpTable.PetId, starUpTable.StarUpCost, true))
+            {
+                PartnersService.Instance.RequestStarUp(_curSelectId);
+            }
+        }
+
+        private void OnClickUpBtn(EventContext context)
+        {
+            PartnersService.Instance.OpenUpPartnerMode(_curSelectId);
+            Context.UI.Close(UIKeys.PartnerSbBagPanel);
+            Context.ClosePanel();
+        }
 
         private void OnClickLeftBtn(EventContext context)
         {
@@ -90,25 +156,22 @@ namespace FL.FGUI
         private void ShowInfo()
         {
             var table = PartnerTableRepo.Get(_curSelectId);
-            if (table == null)
-            {
-                Log.Error($"圣兵表不存在,id:{_curSelectId}");
-                return;
-            }
+            XGame.Framework.Assert.IsNotNull(table, $"圣兵表不存在,id:{_curSelectId}");
             VM.NameLabel.text = table.Name;
             var attr = PartnersData.Instance.GetPartnerAttrByTableId(table.Id);
-            
-            if(attr == null)
-            {
-                VM.StarUpBtn.Disable();
-                VM.LevelUpBtn.Disable();
-                VM.Have.selectedIndex = 1;
-            }
-            else
-            {
-                VM.StarUpBtn.Enable(null);
-                VM.LevelUpBtn.Enable(null);
-                VM.Have.selectedIndex = 0;
+            if (attr == null)
+            {
+                VM.StarUpBtn.Disable();
+                VM.LevelUpBtn.Disable();
+                VM.Have.selectedIndex = 1;
+            }
+            else
+            {
+                VM.StarUpBtn.Enable(null);
+                VM.LevelUpBtn.Enable(null);
+                VM.Have.selectedIndex = 0;
+                var pos = PartnersData.Instance.UpSbPosMap.GetValueOrDefault(_curSelectId, -1);
+                VM.IsUp.selectedIndex = pos < 0 ? 0 : 1;
             }
             var level = attr == null ? 1 : attr.Level;
             var star = attr == null ? 1 : attr.RisingStarLv;
@@ -119,7 +182,8 @@ namespace FL.FGUI
             {
                 ShowUpBtn(attr.TableId);
             }
-        }
+        }
+
         private void ShowStar(int starLv)
         {
             var curNum = PartnersService.Instance.GetStarLv(starLv);
@@ -131,6 +195,7 @@ namespace FL.FGUI
             }
             VM.StarList.BindDatas(list);
         }
+
         private void ShowEpi()
         {
             var info = PartnersData.Instance.GetPartnerAttrByTableId(_curSelectId);

+ 4 - 0
Assets/Scripts/Business/Runtime/FGUI/Partner/SbStrengthPanel/PartnerSbStrengthPanelVM.Gen.cs

@@ -19,6 +19,7 @@ namespace FL.FGUI
     public partial class PartnerSbStrengthPanelVM : FguiViewModel
     {
         public Controller Have { get; private set; }
+        public Controller IsUp { get; private set; }
         public GLoader3D Spine { get; private set; }
         public GTextField NameLabel { get; private set; }
         public GTextField LvLabel { get; private set; }
@@ -30,11 +31,13 @@ namespace FL.FGUI
         public PartnerMwSetBtnView MwSet { get; private set; }
         public GButton UpBtn { get; private set; }
         public GImage UpArrImg { get; private set; }
+        public GButton DownBtn { get; private set; }
         public GList StarList { get; private set; }
 
         protected override void BindComponents(GComponent panel, IUIViewAdapter adapter)
         {
             Have = panel.GetController("Have");
+            IsUp = panel.GetController("IsUp");
             Spine = panel.GetChild("Spine") as GLoader3D;
             NameLabel = panel.GetChild("NameLabel") as GTextField;
             LvLabel = panel.GetChild("LvLabel") as GTextField;
@@ -50,6 +53,7 @@ namespace FL.FGUI
             AddChild(MwSet);
             UpBtn = panel.GetChild("UpBtn") as GButton;
             UpArrImg = panel.GetChild("UpArrImg") as GImage;
+            DownBtn = panel.GetChild("DownBtn") as GButton;
             StarList = panel.GetChild("StarList") as GList;
             StarList.Init(typeof(PartnerSbStarListItemView), adapter.CreateListItem);
 

+ 7 - 1
Assets/Scripts/Business/Runtime/FGUI/Partner/SbUpLineListItem/PartnerSbUpLineListItemCtrl.cs

@@ -39,11 +39,17 @@ namespace FL.FGUI
             VM.UpBtn.onClick.Remove(OnClickUpBtn);
         }
 
-        private void OnClickUpBtn(EventContext context) { }
+        private void OnClickUpBtn(EventContext context)
+        {
+            EventSingle.Instance.Notify(EventDefine.PartnerUpSelect, _id);
+        }
 
         #endregion
+        private int _id;
+
         public void OnRefresh(int index, int id)
         {
+            _id = id;
             VM.DetailNested.VM.SpGroup.visible = false;
             VM.DetailNested.Ctrl.ShowUI(id);
         }

+ 23 - 19
Assets/Scripts/Business/Runtime/FGUI/Partner/SbUpListItem/PartnerSbUpListItemCtrl.cs

@@ -4,6 +4,7 @@
 /// 该脚本由模板创建
 /// created by cb 2024
 
+using System.Collections.Generic;
 using FairyGUI;
 using FL.Data;
 using XGame.Framework.UI;
@@ -20,32 +21,35 @@ namespace FL.FGUI
         {
             AddUIListenres();
         }
+
         protected override void OnDisable()
         {
             RemoveUIListenres();
         }
-        #region UI事件
-        private void AddUIListenres()
-        {
 
+        #region UI事件
+        private void AddUIListenres() {
+            VM.PanelEvent.Add(OnClickSbItem);
         }
-        private void RemoveUIListenres()
-        {
 
-        }
-
-        #endregion
-        #region 属性
-        private int _slotId;
-        private int _sbId;
-        #endregion
-        public void OnRefresh(int index, PartnerSbUpListItemParam param)
+        private void RemoveUIListenres() {
+            VM.PanelEvent.Remove(OnClickSbItem);
+        }
+        private void OnClickSbItem(EventContext eventContext)
         {
-            _slotId = param.PosId;
-            var slotData = PartnersData.Instance.CurUsePlan.GetSlot(_slotId);
-            _sbId = slotData?.SbId ?? 0;
-            VM.IsSelect.selectedIndex = param.PosId == param.CurSelectPos ? 0 : 1;
-            VM.SbItem.Ctrl.ShowUI(_sbId);
+            EventSingle.Instance.Notify(EventDefine.PartnerMainSelect, _posId);
+        }
+        #endregion
+        #region 属性
+        private int _posId;
+        private int _sbId;
+        #endregion
+        public void OnRefresh(int index, PartnerSbUpListItemParam param)
+        {
+            _posId = param.PosId;
+            _sbId = PartnersData.Instance.UpSbMap.GetValueOrDefault(_posId, 0);
+            VM.IsSelect.selectedIndex = param.PosId == param.CurSelectPos ? 0 : 1;
+            VM.SbItem.Ctrl.ShowUI(_sbId);
         }
     }
-}
+}

+ 21 - 7
Assets/Scripts/Business/Runtime/FGUI/Partner/SbUpPanel/PartnerSbUpPanelCtrl.cs

@@ -20,6 +20,8 @@ namespace FL.FGUI
         protected override void OnEnable(object intent)
         {
             AddUIListenres();
+            _pos = (int)intent;
+            ShowUI();
         }
 
         protected override void OnDisable()
@@ -28,12 +30,25 @@ namespace FL.FGUI
         }
 
         #region UI事件
-        private void AddUIListenres() { }
+        private void AddUIListenres()
+        {
+            EventSingle.Instance.AddListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
+        }
 
-        private void RemoveUIListenres() { }
+        private void RemoveUIListenres()
+        {
+            EventSingle.Instance.RemoveListener(EventDefine.PartnerUpSelect, OnSelectUpSb);
+        }
 
+        private void OnSelectUpSb(int eventId, object args)
+        {
+            var id = (int)args;
+            PartnersService.Instance.RequestPartnerUpNew(_pos, id);
+            Context.ClosePanel();
+        }
         #endregion
         private bool _init = false;
+        private int _pos;
 
         public void Init()
         {
@@ -46,14 +61,13 @@ namespace FL.FGUI
         public void ShowUI()
         {
             var list = PartnersData.Instance.PartnerList;
+            var sbId = PartnersData.Instance.UpSbMap.GetValueOrDefault(_pos, 0);
             var dataList = new List<int>();
             foreach (var item in list)
             {
-                var pos = PartnersData.Instance.GetPartnerUpPosById(item.TableId);
-                if (pos < 0)
-                {
-                    dataList.Add(item.TableId);
-                }
+                if (item.Status > 0)
+                    continue;
+                dataList.Add(item.TableId);
             }
             VM.List.BindDatas(dataList);
         }

+ 7 - 0
Assets/Scripts/Business/Runtime/Network/Controllers/ActShengBingPushCtrl.cs

@@ -16,6 +16,13 @@ namespace FL.Network
             PartnersService.Instance.InitPartnerMap(message.shengbing);
             PartnersService.Instance.InitPlanMap(message.suit);
             PartnersService.Instance.UpdateCurUpPartnerMap();
+            //
+            PartnersData.Instance.ClearSbUpMap();
+            foreach (var cao in message.shangzhen)
+            {
+                PartnersData.Instance.UpSbMap.Add(cao.caoId, cao.sbId);
+            }
+            PartnersData.Instance.UpdateUpSbPosMap();
         }
     }
 }

+ 13 - 0
Assets/Scripts/Business/Runtime/Network/Controllers/ActShengbingShangzhenPushCtrl.cs

@@ -1,3 +1,4 @@
+using FL.Data;
 using XGame.Framework.Network;
 
 namespace FL.Network
@@ -6,6 +7,18 @@ namespace FL.Network
     {
         protected override void OnProcess(ActShengbingShangzhenPush message, object context)
         {
+            foreach (var cao in message.shangzhen)
+            {
+                if (PartnersData.Instance.UpSbMap.TryGetValue(cao.caoId, out var id))
+                {
+                    PartnersData.Instance.UpSbMap.Remove(cao.caoId);
+                    PartnersData.Instance.UpSbMap.Add(cao.caoId, cao.sbId);
+                }
+                else
+                {
+                    PartnersData.Instance.UpSbMap.Add(cao.caoId, cao.sbId);
+                }
+            }
         }
     }
 }

+ 3 - 0
Assets/Scripts/Business/Runtime/Network/Controllers/ShengbingNewUnfixResponseCtrl.cs

@@ -1,3 +1,4 @@
+using FL.Data;
 using XGame.Framework.Network;
 
 namespace FL.Network
@@ -6,6 +7,8 @@ namespace FL.Network
     {
         protected override void OnProcess(ShengbingNewUnfixResponse message, object context)
         {
+            PartnersData.Instance.UpdateUpSbPosMap();
+            EventSingle.Instance.Notify(EventDefine.PartnerDown, context);
         }
     }
 }

+ 4 - 0
Assets/Scripts/Business/Runtime/Network/Controllers/ShengbingNewWearResponseCtrl.cs

@@ -1,3 +1,4 @@
+using FL.Data;
 using XGame.Framework.Network;
 
 namespace FL.Network
@@ -6,6 +7,9 @@ namespace FL.Network
     {
         protected override void OnProcess(ShengbingNewWearResponse message, object context)
         {
+            PartnersData.Instance.UpdateUpSbPosMap();
+            EventSingle.Instance.Notify(EventDefine.PartnerUp, context);
+            PartnersService.Instance.FinishUpPartnerMode();
         }
     }
 }

+ 1 - 0
Assets/Scripts/Business/Runtime/Network/Controllers/ShengbingWearAllResponseCtrl.cs

@@ -8,6 +8,7 @@ namespace FL.Network
         protected override void OnProcess(ShengbingWearAllResponse message, object context)
         {
             PartnersService.Instance.UpdateCurUpPartnerMap();
+            PartnersData.Instance.UpdateUpSbPosMap();
             EventSingle.Instance.Notify(EventDefine.PartnerWearAll);
         }
     }

+ 4 - 1
Assets/Scripts/Business/Runtime/Nodes/Login/TableComponent.cs

@@ -1,4 +1,5 @@
-using XGame.Database;
+
+using XGame.Database;
 using XGame.Framework.Asyncs;
 using XGame.Framework.Loadable;
 using XGame.Framework.Nodes;
@@ -46,6 +47,8 @@ namespace FL.Nodes.Login
             rune_levelTableRepo.LoadAsync().Join(group);
             rune_expTableRepo.LoadAsync().Join(group);
             JumpTableRepo.LoadAsync().Join(group);
+            collectTableRepo.LoadAsync().Join(group);
+            collect_rewardTableRepo.LoadAsync().Join(group);
         }
 
         void ILoadAsyncHandle.OnUnloadAsync(IAsyncGroup group)

+ 1 - 1
fl-fgui-project/assets/Partner/Book/item/PartnerBookGroupListItem.xml

@@ -2,7 +2,7 @@
 <component size="696,341">
   <displayList>
     <image id="n36_kzs9" name="n36" src="kzs94k" fileName="Book/img/background01.png" xy="0,0" size="696,341"/>
-    <text id="n37_kzs9" name="NameLabel" xy="24,10" size="256,42" fontSize="30" color="#011548" ubb="true" text="圣兵组合名[color=#c55f1c](99/99)[/color]"/>
+    <text id="n37_kzs9" name="NameLabel" xy="24,10" size="256,42" fontSize="30" color="#011548" ubb="true" autoClearText="true" text="圣兵组合名[color=#c55f1c](99/99)[/color]"/>
     <list id="n42_kzs9" name="List" xy="47,62" size="600,255" layout="row" colGap="48" defaultItem="ui://2981jnh7kzs94s" align="center" autoClearItems="true">
       <item/>
       <item/>

+ 3 - 3
fl-fgui-project/assets/Partner/Book/item/PartnerBookListItem.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="159,253">
+<component size="159,253" designImage="ui://2981jnh7kzs94r" designImageOffsetX="-117" designImageOffsetY="-179" designImageLayer="1">
   <displayList>
     <image id="n38_kzs9" name="n38" src="kzs94j" fileName="Book/img/shengbingdi.png" xy="0,0" pivot="0.5,0.5"/>
-    <loader id="n39_kzs9" name="SbLoader" xy="29,8" size="107,184" align="center" vAlign="middle" fill="scaleFree" clearOnPublish="true"/>
-    <component id="n40_kzs9" name="StarRating" src="z7d1m" fileName="Partner/Components/StarRating.xml" xy="19,164" pivot="0.5,0.5" scale="1.2,1.2" controller="StarNumCtrl,5"/>
+    <loader id="n39_kzs9" name="SbLoader" xy="29,8" size="109,285" url="ui://2981jnh7q0v65y" align="center" vAlign="middle" fill="scaleFree" autoSize="true" clearOnPublish="true"/>
+    <component id="n40_kzs9" name="StarRating" src="z7d1m" fileName="Partner/item/StarCenterItem.xml" xy="19,164" pivot="0.5,0.5" scale="1.2,1.2"/>
     <text id="n41_kzs9" name="NameLabel" xy="33,197" pivot="0.5,0.5" size="100,34" fontSize="24" color="#5f84c6" autoClearText="true" text="圣兵名称"/>
   </displayList>
   <scriptData genuitypekzs94s="2" gencodekzs94s="1"/>

+ 4 - 4
fl-fgui-project/assets/Partner/NewPartner/SbMainPanel.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="756,1344" designImage="ui://2981jnh7ifoa5f" designImageAlpha="100">
-  <controller name="UpPartner" pages="0,,1," selected="0">
+<component size="756,1344" designImage="ui://2981jnh7ifoa5f" designImageAlpha="0" designImageLayer="1">
+  <controller name="UpPartner" pages="0,,1," selected="1">
     <remark page="0" value="正常界面状态"/>
     <remark page="1" value="处于圣兵上阵选择状态"/>
   </controller>
@@ -40,7 +40,7 @@
     <component id="n53_q0v6" name="BagBtn" src="q0v66p" fileName="NewPartner/components/DiaBtn.xml" xy="655,1114" group="n88_q0v6">
       <Button title="圣兵列表" icon="ui://2981jnh7q0v66q"/>
     </component>
-    <image id="n83_q0v6" name="DownArr" src="q0v66z" fileName="NewPartner/img/Stretch.png" xy="69,688" pivot="0.5,0.5" group="n88_q0v6" scale="1,-1">
+    <image id="n83_q0v6" name="DownArr" src="q0v66z" fileName="NewPartner/img/Stretch.png" xy="85,700" pivot="0.5,0.5" anchor="true" group="n88_q0v6" scale="1,-1">
       <gearDisplay controller="UpPartner" pages="0"/>
     </image>
     <image id="n84_q0v6" name="n84" src="q0v671" fileName="NewPartner/img/weikong.png" xy="235,847" group="n85_q0v6"/>
@@ -74,7 +74,7 @@
       <gearDisplay controller="UpPartner" pages="1"/>
       <relation target="" sidePair="bottom-bottom"/>
     </group>
-    <image id="n93_q0v6" name="ChangeArr" src="q0v67r" fileName="NewPartner/img/switch.png" xy="69,693">
+    <image id="n93_q0v6" name="ChangeArr" src="q0v67r" fileName="NewPartner/img/switch.png" xy="87,711" pivot="0.5,0.5" anchor="true">
       <gearDisplay controller="UpPartner" pages="1"/>
       <relation target="" sidePair="bottom-bottom"/>
     </image>

+ 9 - 0
fl-fgui-project/assets/Partner/NewPartner/SbStrengthPanel.xml

@@ -4,6 +4,10 @@
     <remark page="0" value="拥有"/>
     <remark page="1" value="未拥有"/>
   </controller>
+  <controller name="IsUp" pages="0,,1," selected="0">
+    <remark page="0" value="未上阵"/>
+    <remark page="1" value="已上阵"/>
+  </controller>
   <displayList>
     <image id="n113_q0v6" name="n113" src="q0v67t" fileName="NewPartner/bg/imagesbqh.jpg" xy="0,0"/>
     <loader3D id="n130_uai3" name="Spine" xy="356,329" pivot="0.5,0.5" size="0,12" animation="" skin="" loop="true"/>
@@ -21,9 +25,14 @@
     <component id="n126_q0v6" name="RightBtn" src="z7d1g" fileName="NewPartner/components/ArrowBtn.xml" xy="624,517" group="n133_jmnf" scale="-1,1"/>
     <component id="n129_scnr" name="MwSet" src="scnr85" fileName="NewEpigraph/item/MwSetBtn.xml" xy="615,416" group="n133_jmnf"/>
     <component id="n122_q0v6" name="UpBtn" src="q0v66p" fileName="NewPartner/components/DiaBtn.xml" xy="653,1114" group="n135_en8u">
+      <gearDisplay controller="IsUp" pages="0"/>
       <Button title="上阵" icon="ui://2981jnh7q0v67f"/>
     </component>
     <image id="n131_uai3" name="UpArrImg" src="q0v672" fileName="NewPartner/img/Upgradable.png" xy="331,1108" group="n135_en8u" visible="false"/>
+    <component id="n136_x2tq" name="DownBtn" src="q0v66p" fileName="NewPartner/components/DiaBtn.xml" xy="653,1114" group="n135_en8u">
+      <gearDisplay controller="IsUp" pages="1"/>
+      <Button title="下阵" icon="ui://2981jnh7q0v67f"/>
+    </component>
     <group id="n135_en8u" name="n135" xy="331,1108" size="406,85" group="n133_jmnf" advanced="true">
       <gearDisplay controller="Have" pages="0"/>
     </group>

+ 0 - 0
fl-fgui-project/assets/Partner/Epigraph/Images/mwpinzhi/partner_icon_20121.png → fl-fgui-project/assets/Partner/NewPartner/design/img/partner_icon_20121.png


+ 2 - 2
fl-fgui-project/assets/Partner/NewPartner/item/SbDetailNested.xml

@@ -8,7 +8,6 @@
     <image id="n42_q0v6" name="n42" src="q0v66k" fileName="NewPartner/img/banping2bg.png" xy="0,0" size="714,394">
       <relation target="" sidePair="bottomext-bottom"/>
     </image>
-    <component id="n80_q0v6" name="ItemBase" src="me3q0" fileName="ItemBase.xml" pkg="gt6q23qw" xy="22,23" group="n81_q0v6" scale="0.8,0.8"/>
     <image id="n57_q0v6" name="n57" src="q0v66u" fileName="NewPartner/img/Textbg.png" xy="167,118" size="248,32" group="n60_q0v6"/>
     <image id="n56_q0v6" name="n56" src="q0v66s" fileName="NewPartner/img/gongsutubiao.png" xy="169,120" group="n60_q0v6"/>
     <text id="n58_q0v6" name="n58" xy="196,118" size="92,32" group="n60_q0v6" fontSize="22" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" strokeSize="2" text="伤害系数"/>
@@ -43,9 +42,10 @@
     </component>
     <image id="n79_q0v6" name="n79" src="q0v66g" fileName="NewPartner/img/suipian.png" xy="25,146" group="n85_lkie" scale="1.4,1.4"/>
     <group id="n85_lkie" name="SpGroup" xy="25,145" size="110,30" group="n81_q0v6" advanced="true"/>
-    <group id="n81_q0v6" name="n81" xy="22,23" size="667,253" advanced="true">
+    <group id="n81_q0v6" name="n81" xy="25,25" size="664,251" advanced="true">
       <gearDisplay controller="IsEmpty" pages="0"/>
     </group>
+    <component id="n80_q0v6" name="ItemBase" src="me3q0" fileName="ItemBase.xml" pkg="gt6q23qw" xy="22,23" scale="0.8,0.8"/>
   </displayList>
   <scriptData genuitypeq0v670="1" gencodeq0v670="1"/>
 </component>

+ 1 - 1
fl-fgui-project/assets/Partner/NewPartner/item/SbLevelUpBtn.xml

@@ -8,7 +8,7 @@
     <image id="n116_q0v6" name="n116" src="q0v65l" fileName="NewPartner/img/Button1.png" xy="0,4">
       <gearDisplay controller="grayed" pages="0"/>
     </image>
-    <text id="n117_q0v6" name="n117" xy="100,31" size="52,34" fontSize="24" color="#ffffff" align="center" strokeColor="#000000" strokeSize="2" text="升"/>
+    <text id="n117_q0v6" name="n117" xy="100,31" size="52,34" fontSize="24" color="#ffffff" align="center" strokeColor="#000000" strokeSize="2" text="升"/>
     <component id="n120_q0v6" name="CostLabel" src="q0v681" fileName="NewPartner/item/CostLabel.xml" xy="35,0" pivot="0.5,0.5"/>
   </displayList>
   <Button downEffect="scale" downEffectValue=".9"/>

+ 2 - 2
fl-fgui-project/assets/Partner/NewPartner/item/SbUpLineListItem.xml

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="714,406" designImage="ui://2981jnh7q0v67p" designImageOffsetX="-22" designImageOffsetY="-480" designImageLayer="1">
+<component size="714,406" designImage="ui://2981jnh7q0v67p" designImageOffsetX="-22" designImageOffsetY="-480" designImageAlpha="25" designImageLayer="1">
   <displayList>
     <component id="n110_q0v6" name="DetailNested" src="q0v670" fileName="NewPartner/item/SbDetailNested.xml" xy="0,6" size="714,394"/>
     <component id="n111_q0v6" name="UpBtn" src="q0v66l" fileName="NewPartner/components/BlueBtn.xml" xy="282,317">
       <Button title="上阵"/>
     </component>
-    <image id="n112_uai3" name="UpArrImg" src="q0v672" fileName="NewPartner/img/Upgradable.png" xy="118,29"/>
+    <image id="n112_uai3" name="UpArrImg" src="q0v672" fileName="NewPartner/img/Upgradable.png" xy="118,29" visible="false"/>
   </displayList>
   <scriptData genuitypeq0v67n="2" gencodeq0v67n="1"/>
 </component>

+ 1 - 1
fl-fgui-project/assets/Partner/package.xml

@@ -206,7 +206,7 @@
     <component id="uai38d" name="SbRecommendListSbItem.xml" path="/NewPartner/item/"/>
     <component id="uai38f" name="SbRecommendListItem.xml" path="/NewPartner/item/"/>
     <image id="uai38g" name="partner_icon2_20111.png" path="/Epigraph/Images/mwpinzhi/"/>
-    <image id="uai38i" name="partner_icon_20121.png" path="/Epigraph/Images/mwpinzhi/"/>
+    <image id="uai38i" name="partner_icon_20121.png" path="/NewPartner/design/img/"/>
     <component id="lkie8j" name="SbBagListTitleItem.xml" path="/NewPartner/item/" exported="true"/>
   </resources>
   <publish name="" genCode="true" excluded="uai38g,v4ke16,v4ke11,pu684a,drii42,v4ke1z,v4ke1a,v4ke1q,v4ke2m"/>