zhenglijun 1 день назад
Родитель
Сommit
0113c2b35f
28 измененных файлов с 198 добавлено и 135 удалено
  1. BIN
      Assets/Res/Addressable/FGUI/Mount/Mount_fui.bytes
  2. BIN
      Assets/Res/Addressable/Tables/ItemTable.bytes
  3. BIN
      Assets/Res/Addressable/Tables/zuoqiStarTable.bytes
  4. 2 2
      Assets/Scripts/Business/Domain/Database/DatabaseVersion.cs
  5. 63 13
      Assets/Scripts/Business/Runtime/Data/Mount/MountData.cs
  6. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Equip/AttrItemNested/EquipAttrItemNestedCtrl.cs
  7. 15 11
      Assets/Scripts/Business/Runtime/FGUI/Mount/AdvancedNested/MountAdvancedNestedCtrl.cs
  8. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Mount/AttrItemList/MountAttrItemListCtrl.cs
  9. 6 29
      Assets/Scripts/Business/Runtime/FGUI/Mount/MainPanel/MountMainPanelCtrl.cs
  10. 1 1
      Assets/Scripts/Business/Runtime/FGUI/Mount/MountListItem/MountMountListItemCtrl.cs
  11. 3 3
      Assets/Scripts/Business/Runtime/FGUI/Mount/TrainNested/MountTrainNestedCtrl.cs
  12. 1 2
      Assets/Scripts/Business/Runtime/FGUI/Mount/TrainingAreaNested/MountTrainingAreaNestedCtrl.cs
  13. 4 2
      Assets/Scripts/Business/Runtime/FGUI/Mount/UpgradeAttrListItem/MountUpgradeAttrListItemCtrl.cs
  14. 45 33
      Assets/Scripts/Business/Runtime/FGUI/Mount/UpgradeNested/MountUpgradeNestedCtrl.cs
  15. 18 6
      Assets/Scripts/Business/Runtime/FGUI/Mount/UpgradePreviewPanel/MountUpgradePreviewPanelCtrl.cs
  16. 10 2
      Assets/Scripts/Business/Runtime/FGUI/Mount/UpgradeSuccessfulPanel/MountUpgradeSuccessfulPanelCtrl.cs
  17. 3 3
      Assets/Scripts/Business/Runtime/FGUI/Partner/EpiDetailInfo/PartnerEpiDetailInfoCtrl.cs
  18. 3 3
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbDetailNested/PartnerSbDetailNestedCtrl.cs
  19. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Partner/SbDetailNoIconNested/PartnerSbDetailNoIconNestedCtrl.cs
  20. 3 3
      Assets/Scripts/Business/Runtime/FGUI/Player/AttributeItem/PlayerAttributeItemCtrl.cs
  21. 2 2
      Assets/Scripts/Business/Runtime/FGUI/Player/AwakePanel/PlayerAwakePanelCtrl.cs
  22. 1 1
      Assets/Scripts/Business/Runtime/FGUI/Player/JokSkillNested/PlayerJokSkillNestedCtrl.cs
  23. 2 2
      Assets/Scripts/Business/Runtime/Network/Controllers/ActMountExpPushCtrl.cs
  24. 5 5
      Assets/Scripts/Business/Runtime/Network/Controllers/ActMountPushCtrl.cs
  25. 2 2
      Assets/Scripts/Business/Runtime/Network/Controllers/ActMountUsePushCtrl.cs
  26. 2 2
      fl-fgui-project/assets/Mount/AdvancedNested.xml
  27. 0 1
      fl-fgui-project/assets/Mount/TrainNested.xml
  28. 1 1
      fl-fgui-project/assets/Mount/UpgradeNested.xml

BIN
Assets/Res/Addressable/FGUI/Mount/Mount_fui.bytes


BIN
Assets/Res/Addressable/Tables/ItemTable.bytes


BIN
Assets/Res/Addressable/Tables/zuoqiStarTable.bytes


+ 2 - 2
Assets/Scripts/Business/Domain/Database/DatabaseVersion.cs

@@ -5,7 +5,7 @@ namespace XGame.Database
 {
     public static class DatabaseVersion
     {
-        // version 1732340989
+        // version 1732345437
         static long _version = -1;
 
         public static long Version
@@ -14,7 +14,7 @@ namespace XGame.Database
             {
                 if (_version == -1)
                 {
-                    _version = 1732340989;
+                    _version = 1732345437;
                 }
                 return _version;
             }

+ 63 - 13
Assets/Scripts/Business/Runtime/Data/Mount/MountData.cs

@@ -1,32 +1,55 @@
 using System;
 using System.Collections.Generic;
+using XGame.Database;
 using XGame.Framework.Data;
 
 namespace FL
 {
     public class MountData : DataSingleton<MountData>, IDisposable
     {
+        /// <summary>
         /// 每个星级(黄|紫|红)最多拥有5个星星数量
         /// </summary>
-        public int MaxStarNum = 5;
+        public const int MaxStarNum = 5;
 
-        public int universalId { get; set; } // 通用坐骑的星阶对应的zuoqiInfo表的id
+        #region 通用坐骑数据
 
-        public int exp { set; get; }        // 通用坐骑升星进度条
-        public int mountModelId { set; get; } // 当前使用的坐骑外观模型id(通用坐骑用的是zuoqiInfo表格,高级坐骑对应的是zuoqiBase表格)
-        public int useSkillMountId { set; get; } // 启用的高级坐骑的技能的坐骑id
-        public int mountPartExp{  set; get; }// 坐骑部位驯养经验条
+        /// <summary>
+        /// 通用坐骑的星阶对应的zuoqiInfo表的id
+        /// </summary>
+        public int UniversalId { get; set; }
 
-        private Dictionary<int, int> _advancedMountsMap; // 已解锁的坐骑星级数据
-        public Dictionary<int, int> AdvancedMountsMap => _advancedMountsMap ??= new Dictionary<int, int>();
+        /// <summary>
+        /// 通用坐骑升星进度条
+        /// </summary>
+        public int UniversalExp { set; get; }
 
-        private Dictionary<int, int> _mountsPartsMap; // 通用坐骑部位驯养等级数据
+        /// <summary>
+        ///  坐骑部位驯养经验条
+        /// </summary>
+        public int MountPartExp { set; get; }
+
+        /// <summary>
+        /// 通用坐骑部位驯养等级数据
+        /// </summary>
+        private Dictionary<int, int> _mountsPartsMap; 
         public Dictionary<int, int> MountsPartsMap => _mountsPartsMap ??= new Dictionary<int, int>();
+        #endregion
 
-        void IDisposable.Dispose()
-        {
+        #region 高级坐骑数据
 
-        }
+        /// <summary>
+        /// 启用的高级坐骑的技能的坐骑id
+        /// </summary>
+        public int UseSkillMountId { set; get; }
+
+        /// <summary>
+        /// 已解锁的坐骑星级数据
+        /// key:zuoqiBase.id
+        /// value:star(星级)
+        /// </summary>
+        private Dictionary<int, int> _advancedMountsMap;
+        public Dictionary<int, int> AdvancedMountsMap => _advancedMountsMap ??= new Dictionary<int, int>();
 
 
         /// <summary>
@@ -41,13 +64,40 @@ namespace FL
 
 
         /// <summary>
-        /// 获取高级坐骑的
+        /// 获取高级坐骑的
         /// </summary>
         /// <param name="mountId"></param>
         public int GetAdvancedMountLv(int mountId)
         {
             return _advancedMountsMap.ContainsKey(mountId) ? _advancedMountsMap[mountId] : 0;
         }
+        #endregion
+
+
+        public int MountModelId { set; get; } // 当前使用的坐骑外观模型id(通用坐骑用的是zuoqiInfo表格,高级坐骑对应的是zuoqiBase表格)
+
+        
+        /// <summary>
+        /// 获取当前骑乘的坐骑外观
+        /// </summary>
+        /// <returns></returns>
+        public string GetRidingAppearance()
+        {
+            if (MountModelId == 0) return string.Empty;
+
+            var mountBaseInfo = zuoqiBaseTableRepo.Get(MountModelId);
+            if (mountBaseInfo != null) return mountBaseInfo.Spine;
+
+            var mountInfo = zuoqiInfoTableRepo.Get(MountModelId);
+            return mountInfo == null ? string.Empty : mountInfo.Spine;
+        }
+
+
+        void IDisposable.Dispose()
+        {
+
+        }
+
 
     }
 }

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Equip/AttrItemNested/EquipAttrItemNestedCtrl.cs

@@ -63,8 +63,8 @@ namespace FL.FGUI
 
         private string GetAttributeDesc(AttrDescTable attributeInfo, long attrVal, bool bAtkSpeed)
         {
-            string desc = attributeInfo.Num_type == 1 ? TableUtils.ToRealDouble(attrVal).ToString("F3") + "%" :
-                            (bAtkSpeed ? TableUtils.ToRealDouble(attrVal).ToString("F1") : attrVal.ToString());
+            string desc = attributeInfo.Num_type == 1 ? attrVal.ToRealDouble().ToString("P3") :
+                            (bAtkSpeed ? attrVal.ToRealDouble().ToString("P1") : attrVal.ToString());
             return $"{attributeInfo.ShowName} {desc}";
 
         }

+ 15 - 11
Assets/Scripts/Business/Runtime/FGUI/Mount/AdvancedNested/MountAdvancedNestedCtrl.cs

@@ -74,7 +74,7 @@ namespace FL.FGUI
                 XGame.Framework.Assert.IsNotNull(mountId);
             }
 
-            if (mountId == MountData.Instance.mountModelId)
+            if (mountId == MountData.Instance.MountModelId)
             {
                 MountService.Instance.SendToRideDown();
             }
@@ -269,8 +269,8 @@ namespace FL.FGUI
                 int lv = MountData.Instance.GetAdvancedMountLv(advancedMountInfo.Id);
                 ShowMountSpine(advancedMountInfo.Spine);
                 ShowAttrUI(lv, advancedMountInfo.Id, bUnlock);
-                ShowRideUI(bUnlock, advancedMountInfo.Id == MountData.Instance.mountModelId);
-                ShowEnableSkillBtn(bUnlock, advancedMountInfo.Id == MountData.Instance.useSkillMountId);
+                ShowRideUI(bUnlock, advancedMountInfo.Id == MountData.Instance.MountModelId);
+                ShowEnableSkillBtn(bUnlock, advancedMountInfo.Id == MountData.Instance.UseSkillMountId);
 
                 VM.MountStar.visible = lv > 0;
                 ShowAdvanceMountStarUI(lv);
@@ -341,7 +341,11 @@ namespace FL.FGUI
 
             //10000*坐骑id+等级
             var mountStarInfo = zuoqiStarTableRepo.Get(mountId * 10000 + curLv);
-            XGame.Framework.Assert.IsNotNull(mountStarInfo, $"坐骑表zuoqiStar中不存在id:{mountId * 10000 + curLv}");
+            if (mountStarInfo == null) 
+            {
+                XGame.Log.Error($"坐骑表zuoqiStar中不存在id:{mountId * 10000 + curLv}");
+                return;
+            }
             if (bUnlock)
                 ShowCostUI(mountStarInfo.StarUpCost);
             ShowMountSkillUI(mountStarInfo.StarSkill);
@@ -353,7 +357,7 @@ namespace FL.FGUI
             {
                 if (nextMountStarInfo?.LevelOwnAttr?.Length > 1)
                 {
-                    VM.NextMountAttrDescLabel.text = TableUtils.ToRealDouble(nextMountStarInfo.LevelOwnAttr[1]).ToString("F3") + "%";
+                    VM.NextMountAttrDescLabel.text = nextMountStarInfo.LevelOwnAttr[1].ToRealFloat().ToString("P3");
                 }
                 if (curLv == 0)
                 {
@@ -373,7 +377,7 @@ namespace FL.FGUI
             var attributeInfo = AttrDescTableRepo.Get(attrType);
             if (attributeInfo != null)
             {
-                string valStr = attrValue > 0 ? TableUtils.ToRealDouble(attrValue).ToString("F3") + "%" : "0%";
+                string valStr = attrValue > 0 ? attrValue.ToRealFloat().ToString("P3") : "0%";
                 VM.MountAttrDescLabel.text = attributeInfo.ShowName + valStr;
             }
         }
@@ -398,11 +402,11 @@ namespace FL.FGUI
         /// <param name="starLevel"></param>
         private void ShowAdvanceMountStarUI(int starLevel)
         {
-            int starNum = starLevel == 0 ? 0 : starLevel % MountData.Instance.MaxStarNum;
+            int starNum = starLevel == 0 ? 0 : starLevel % MountData.MaxStarNum;
             if (starLevel > 0 && starNum == 0)
-                starNum = MountData.Instance.MaxStarNum;
+                starNum = MountData.MaxStarNum;
             // 获取星星的色阶
-            int starStep = Mathf.FloorToInt((starLevel - 1) / MountData.Instance.MaxStarNum) + 1;
+            int starStep = Mathf.FloorToInt((starLevel - 1) / MountData.MaxStarNum) + 1;
 
             int[] array = Enumerable.Repeat(starStep, starNum).ToArray();
             VM.MountStar.BindDatas(array);
@@ -442,7 +446,7 @@ namespace FL.FGUI
         /// <param name="args"></param>
         private void UseMountSkillSucessful(int eventId, object args)
         {
-            ShowEnableSkillBtn(true, _advancedMountsInfoList[_curAdvancedIndex].Id == MountData.Instance.useSkillMountId);
+            ShowEnableSkillBtn(true, _advancedMountsInfoList[_curAdvancedIndex].Id == MountData.Instance.UseSkillMountId);
         }
 
         /// <summary>
@@ -478,7 +482,7 @@ namespace FL.FGUI
         private void ChangeRideState(int eventId, object args)
         {
             int mountId = _advancedMountsInfoList[_curAdvancedIndex].Id;
-            ShowRideUI(MountData.Instance.IsUnLock(mountId), mountId == MountData.Instance.mountModelId);
+            ShowRideUI(MountData.Instance.IsUnLock(mountId), mountId == MountData.Instance.MountModelId);
         }
 
         /// <summary>

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Mount/AttrItemList/MountAttrItemListCtrl.cs

@@ -42,10 +42,10 @@ namespace FL.FGUI
             {
                 VM.MaxCtrl.selectedIndex = data.nextVal == 0 ? 1 : 0;
                 VM.AttrNameLabl.text = attributeInfo.ShowName;
-                VM.AttrValLabl.text = TableUtils.ToRealDouble(data.curVal).ToString("F3") + "%";
+                VM.AttrValLabl.text = data.curVal.ToRealFloat().ToString("P3");
                 if (data.nextVal > 0)
                 {
-                    VM.NextAttrValLabel.text = TableUtils.ToRealDouble(data.nextVal).ToString("F3") + "%";
+                    VM.NextAttrValLabel.text = data.nextVal.ToRealFloat().ToString("P3");
                 }
             }
         }

+ 6 - 29
Assets/Scripts/Business/Runtime/FGUI/Mount/MainPanel/MountMainPanelCtrl.cs

@@ -40,43 +40,21 @@ namespace FL.FGUI
         #region UI事件
         private void AddUIListenres()
         {
-            VM.UpgradeBtn.onClick.Add(OnClickUpgradeBtn);
-            VM.TrainBtn.onClick.Add(OnClickTrainBtn);
-            VM.AdvancedMountBtn.onClick.Add(OnClickAdvancedMountBtn);
-
+            VM.PageCtrl.onChanged.Add(OnPageCtrlChange);
         }
         private void RemoveUIListenres()
         {
-            VM.UpgradeBtn.onClick.Remove(OnClickUpgradeBtn);
-            VM.TrainBtn.onClick.Remove(OnClickTrainBtn);
-            VM.AdvancedMountBtn.onClick.Remove(OnClickAdvancedMountBtn);
-
-        }
-        /// <summary>
-        /// 坐骑升级页签按钮
-        /// </summary>
-        /// <param name="context"></param>
-        private void OnClickUpgradeBtn(EventContext context)
-        {
-            ShowPage(0);
+            VM.PageCtrl.onChanged.Remove(OnPageCtrlChange);
         }
+        
         /// <summary>
-        /// 坐骑驯养页签按钮
+        /// 页签按钮切换事件
         /// </summary>
         /// <param name="context"></param>
-        private void OnClickTrainBtn(EventContext context)
+        private void OnPageCtrlChange(EventContext context)
         {
-            ShowPage(1);
+            ShowPage(VM.PageCtrl.selectedIndex);
         }
-        /// <summary>
-        /// 高级坐骑页签按钮
-        /// </summary>
-        /// <param name="context"></param>
-        private void OnClickAdvancedMountBtn(EventContext context)
-        {
-            ShowPage(2);
-        }
-
         #endregion
 
         private void AddEventListener()
@@ -100,7 +78,6 @@ namespace FL.FGUI
         private void ShowPage(int pageIndex)
         {
             _pageIndex = pageIndex;
-            VM.PageCtrl.selectedIndex = pageIndex;
             ShowUpgradeMountsUI(pageIndex == 0);
             ShowTrainMountsUI(pageIndex == 1);
             ShowAdvancedMountUI(pageIndex == 2);

+ 1 - 1
Assets/Scripts/Business/Runtime/FGUI/Mount/MountListItem/MountMountListItemCtrl.cs

@@ -40,7 +40,7 @@ namespace FL.FGUI
             VM.QualityImg.icon = AddressableDefine.MountQualityFrame(mountBaseInfo.Quality);
             VM.MountIcon.icon = mountBaseInfo.Icon;
             VM.LockCtrl.selectedIndex = MountData.Instance.IsUnLock(mountBaseInfo.Id) ? 0 : 1;
-            VM.RideCtrl.selectedIndex = MountData.Instance.mountModelId == mountBaseInfo.Id ? 1 : 0;
+            VM.RideCtrl.selectedIndex = MountData.Instance.MountModelId == mountBaseInfo.Id ? 1 : 0;
             VM.SelectCtrl.selectedIndex = 0;
         }
 

+ 3 - 3
Assets/Scripts/Business/Runtime/FGUI/Mount/TrainNested/MountTrainNestedCtrl.cs

@@ -111,7 +111,7 @@ namespace FL.FGUI
                 ShowTrainExp(curTrainInfo.Success);
                 _trainCostItemId = curTrainInfo.LevelUpCost[0];
                 _trainCostNum = curTrainInfo.LevelUpCost.Length > 1 ? curTrainInfo.LevelUpCost[1] : 1;
-                VM.TrainRateLabel.text = string.Format(StringDefine.TrainSuccessRate, TableUtils.ToRealDouble(curTrainInfo.Prob * 100).ToString("F2") + "%");
+                VM.TrainRateLabel.text = string.Format(StringDefine.TrainSuccessRate, curTrainInfo.Prob.ToRealFloat().ToString("P2"));
             }
             ShowTrainAttrUI(mountsPartsMap);
             if (zuoqiBuweiProbTableRepo.Get(totalLv + 1) == null)
@@ -124,7 +124,7 @@ namespace FL.FGUI
 
             if (bShowSpine)
             {
-                var mountInfo = zuoqiInfoTableRepo.Get(MountData.Instance.universalId);
+                var mountInfo = zuoqiInfoTableRepo.Get(MountData.Instance.UniversalId);
                 ShowMountSpine(mountInfo.Spine, true);
             }
         }
@@ -145,7 +145,7 @@ namespace FL.FGUI
         private void ShowTrainExp(int total)
         {
             VM.TrainLuckyBar.max = total;
-            VM.TrainLuckyBar.value = MountData.Instance.mountPartExp;
+            VM.TrainLuckyBar.value = MountData.Instance.MountPartExp;
         }
 
         /// <summary>

+ 1 - 2
Assets/Scripts/Business/Runtime/FGUI/Mount/TrainingAreaNested/MountTrainingAreaNestedCtrl.cs

@@ -54,8 +54,7 @@ namespace FL.FGUI
                     var sb = StringBuilderUtils.Acquire();
                     sb.Append(attributeInfo.ShowName);
                     sb.Append("+");
-                    sb.Append(TableUtils.ToRealDouble(data.trainInfo.LevelOwnAttr[1]).ToString("F3"));
-                    sb.Append("%");
+                    sb.Append(data.trainInfo.LevelOwnAttr[1].ToRealFloat().ToString("P3"));
                     VM.EffectLabel.text = sb.ToString();
                     StringBuilderUtils.Release(sb);
                 }

+ 4 - 2
Assets/Scripts/Business/Runtime/FGUI/Mount/UpgradeAttrListItem/MountUpgradeAttrListItemCtrl.cs

@@ -42,11 +42,13 @@ namespace FL.FGUI
             var attributeInfo = AttrDescTableRepo.Get(data.attrType);
             if (attributeInfo != null)
             {
-                string oldValDesc = TableUtils.ToRealDouble(data.oldAttrValue).ToString("F3") + "%";
+                string oldValDesc = data.oldAttrValue.ToRealFloat().ToString("P3");
                 VM.AttrDescLabel.text = $"{attributeInfo.ShowName}+{oldValDesc}";
-                string curValDesc = TableUtils.ToRealDouble(data.curAttrValue).ToString("F3") + "%";
+                string curValDesc = data.curAttrValue.ToRealFloat().ToString("P3");
                 VM.NextAttrDescLabel.text = $"{attributeInfo.ShowName}+{curValDesc}";
             }
+            else
+                XGame.Log.Error($"属性表中不存在类型:{data.attrType}");
         }
     }
 }

+ 45 - 33
Assets/Scripts/Business/Runtime/FGUI/Mount/UpgradeNested/MountUpgradeNestedCtrl.cs

@@ -43,6 +43,10 @@ namespace FL.FGUI
         private List<MountAttrParam> _mountSpecialAttrList;
         private Dictionary<int, zuoqiInfoTable> _mountStepMap; // 坐骑星阶数据
 
+        /// <summary>
+        /// 通用坐骑每阶的最大升星等级
+        /// </summary>
+        private const int MaxStarLv = 10;
 
         protected override void OnEnable(object intent)
         {
@@ -111,12 +115,9 @@ namespace FL.FGUI
         private void OnClickRideBtn(EventContext context)
         {
             int mountId = _mountModelList[_mountIndex].tableId;
-            if (mountId == 0)
-            {
-                XGame.Framework.Assert.IsNotNull(mountId);
-            }
 
-            if (mountId == MountData.Instance.mountModelId)
+
+            if (mountId == MountData.Instance.MountModelId)
             {
                 MountService.Instance.SendToRideDown();
             }
@@ -147,9 +148,13 @@ namespace FL.FGUI
         /// </summary>
         private void GetMouuntModelData()
         {
-            _universalId = MountData.Instance.universalId;
-            _curMountInfo = zuoqiInfoTableRepo.Get(MountData.Instance.universalId);
-            XGame.Framework.Assert.IsNotNull(_curMountInfo, $"坐骑表zuoqiInfo信息不存在,id:{MountData.Instance.universalId}");
+            _universalId = MountData.Instance.UniversalId;
+            _curMountInfo = zuoqiInfoTableRepo.Get(MountData.Instance.UniversalId);
+            if (_curMountInfo == null)
+            {
+                XGame.Log.Error($"坐骑表zuoqiInfo信息不存在,id:{MountData.Instance.UniversalId}");
+                return;
+            }
             var mountBaseInfo = zuoqiBaseTableRepo.Get(_curMountInfo.Zqid);
             if (mountBaseInfo != null)
             {
@@ -159,39 +164,46 @@ namespace FL.FGUI
             _mountModelList.Clear();
             int starLv = _curMountInfo.Star;
             var cfgInfoList = zuoqiInfoTableRepo.GetAll();
+            var first = cfgInfoList[0];
+            var last = cfgInfoList[cfgInfoList.Length - 1];
+            int mountId = first.Zqid;
             string lastModelName = string.Empty;
-            foreach (var cfgInfo in cfgInfoList)
+            int paramId = mountId * 10000;
+            for (var step = first.Step; step <= last.Step; step++)
             {
-                if (cfgInfo.Icon != lastModelName)
+                var mountInfo = zuoqiInfoTableRepo.Get(paramId + step * 100);
+                if (mountInfo != null)
                 {
-                    lastModelName = cfgInfo.Icon;
-                    _mountModelList.Add(new MountModelParam()
+                    if (mountInfo.Spine != lastModelName)
                     {
-                        tableId = cfgInfo.Id,
-                        unlockStep = cfgInfo.Step,
-                        bLock = _curMountInfo.Step < cfgInfo.Step || starLv < cfgInfo.Star,
-                        spineName = cfgInfo.Spine
-                    });
-                }
-                if (cfgInfo.Star == 0 && !_mountStepMap.ContainsKey(cfgInfo.Step))
-                {
-                    _mountStepMap.Add(cfgInfo.Step, cfgInfo);
+                        lastModelName = mountInfo.Spine;
+                        _mountModelList.Add(new MountModelParam()
+                        {
+                            tableId = mountInfo.Id,
+                            unlockStep = mountInfo.Step,
+                            bLock = _curMountInfo.Step < mountInfo.Step || starLv < mountInfo.Star,
+                            spineName = mountInfo.Spine
+                        });
+                    }
+                    if (mountInfo.Star == 0 && !_mountStepMap.ContainsKey(mountInfo.Step))
+                    {
+                        _mountStepMap.Add(mountInfo.Step, mountInfo);
+                    }
                 }
             }
         }
 
         /// <summary>
-        /// 
+        /// 优先获取骑乘的普通坐骑索引,如果骑乘的不是普通坐骑,则显示当前解锁的最高阶坐骑索引
         /// </summary>
-
         private void SetMountIndex()
         {
             _mountIndex = 0;
             int showMountModelId = 0;
-            var advanceMountInfo = zuoqiBaseTableRepo.Get(MountData.Instance.mountModelId);
+            var advanceMountInfo = zuoqiBaseTableRepo.Get(MountData.Instance.MountModelId);
             if (advanceMountInfo == null)
             {
-                var mountModelInfo = zuoqiInfoTableRepo.Get(MountData.Instance.mountModelId);
+                var mountModelInfo = zuoqiInfoTableRepo.Get(MountData.Instance.MountModelId);
                 if (mountModelInfo != null)
                 {
                     showMountModelId = mountModelInfo.Id;
@@ -246,7 +258,7 @@ namespace FL.FGUI
         /// </summary>
         private void ShowExp()
         {
-            VM.ExpBar.value = VM.MaxUpgradeStep.selectedIndex == 1 ? VM.ExpBar.max : MountData.Instance.exp;
+            VM.ExpBar.value = VM.MaxUpgradeStep.selectedIndex == 1 ? VM.ExpBar.max : MountData.Instance.UniversalExp;
         }
 
         /// <summary>
@@ -274,7 +286,7 @@ namespace FL.FGUI
             VM.MountStepLvLabel.text = stepLv.ToString();
             var nextInfo = _mountStepMap.ContainsKey(_curMountInfo.Step + 1) ? _mountStepMap[_curMountInfo.Step + 1] : null;
             bool bMaxStep = nextInfo == null;
-            if (bMaxStep && _curMountInfo.Star == 10)
+            if (bMaxStep && _curMountInfo.Star == MaxStarLv)
             {
                 ShowMaxUpgradeStep(true);//满星阶状态
                 ShowCostItemNestedUI(false);
@@ -292,7 +304,7 @@ namespace FL.FGUI
         }
 
         /// <summary>
-        ///
+        /// 满星阶
         /// </summary>
         /// <param name="bShow"></param>
         private void ShowMaxUpgradeStep(bool bShow)
@@ -301,7 +313,7 @@ namespace FL.FGUI
         }
 
         /// <summary>
-        /// 
+        /// 通用坐骑升级消耗
         /// </summary>
         /// <param name="bShow"></param>
         private void ShowCostItemNestedUI(bool bShow)
@@ -321,7 +333,7 @@ namespace FL.FGUI
             VM.BaseStarLvLabel.text = starLv.ToString();
             _mountBaseAttrList.Clear();
             zuoqiInfoTable nextInfo;
-            if (starLv < 10)
+            if (starLv < MaxStarLv)
                 nextInfo = zuoqiInfoTableRepo.Get(_curMountInfo.Id + 1);
             else
             {
@@ -359,7 +371,7 @@ namespace FL.FGUI
                     VM.UnLockModelLabel.text = string.Format(StringDefine.UnlockMountStep, param.unlockStep);
                 }
                 else
-                    ShowRideUI(true, param.tableId == MountData.Instance.mountModelId);
+                    ShowRideUI(true, param.tableId == MountData.Instance.MountModelId);
             }
             ShowSwitchMountBtnState();
         }
@@ -398,7 +410,7 @@ namespace FL.FGUI
         /// <param name="args"></param>
         private void FeedMountSucessful(int eventId, object args)
         {
-            if (_universalId == MountData.Instance.universalId)
+            if (_universalId == MountData.Instance.UniversalId)
             {
                 ShowExp();
                 return;
@@ -417,7 +429,7 @@ namespace FL.FGUI
             var param = _mountModelList[_mountIndex];
             if (param.tableId > 0)
             {
-                ShowRideUI(!param.bLock, param.tableId == MountData.Instance.mountModelId);
+                ShowRideUI(!param.bLock, param.tableId == MountData.Instance.MountModelId);
             }
         }
 

+ 18 - 6
Assets/Scripts/Business/Runtime/FGUI/Mount/UpgradePreviewPanel/MountUpgradePreviewPanelCtrl.cs

@@ -60,7 +60,11 @@ namespace FL.FGUI
                 }
                 //10000*坐骑id+1
                 var curStarInfo = zuoqiStarTableRepo.Get(mountId * 10000 + curLv);
-                XGame.Framework.Assert.IsNotNull(curStarInfo,$"坐骑zuoqiStar表不存在id;{mountId * 10000 + curLv}");
+                if (curStarInfo == null) 
+                {
+                    XGame.Log.Error($"坐骑zuoqiStar表不存在id:{mountId * 10000 + curLv}");
+                    return;
+                }
                 ShowCurSkillUI(curStarInfo.StarSkill);
                 ShowNextSkillUI(nextSkillId);
             }
@@ -69,7 +73,11 @@ namespace FL.FGUI
         private void ShowCurSkillUI(int skillId)
         {
             var curSkillInfo = SkillTableRepo.Get(skillId);
-            XGame.Framework.Assert.IsNotNull(curSkillInfo, $"技能表不存在id;{skillId}");
+            if (curSkillInfo == null)
+            {
+                XGame.Log.Error($"技能表不存在skillId:{skillId}");
+                return;
+            }
             VM.SkillNameLabel.text = curSkillInfo.Name;
             VM.SkillDescLabel.text = curSkillInfo.Desc;
         }
@@ -77,18 +85,22 @@ namespace FL.FGUI
         private void ShowNextSkillUI(int skillId)
         {
             var skillInfo = SkillTableRepo.Get(skillId);
-            XGame.Framework.Assert.IsNotNull(skillInfo, $"技能表不存在id;{skillId}");
+            if (skillInfo == null)
+            {
+                XGame.Log.Error($"技能表不存在skillId:{skillId}");
+                return;
+            }
             VM.NextSkillNameLabel.text = skillInfo.Name;
             VM.NextSkillDescLabel.text = skillInfo.Desc;
         }
 
         private void ShowUnlockStarUI(int starLevel)
         {
-            int starNum = starLevel == 0 ? 0 : starLevel % MountData.Instance.MaxStarNum;
+            int starNum = starLevel == 0 ? 0 : starLevel % MountData.MaxStarNum;
             if (starLevel > 0 && starNum == 0)
-                starNum = MountData.Instance.MaxStarNum;
+                starNum = MountData.MaxStarNum;
             // 获取星星的色阶
-            int starStep = Mathf.FloorToInt((starLevel - 1) / MountData.Instance.MaxStarNum) + 1;
+            int starStep = Mathf.FloorToInt((starLevel - 1) / MountData.MaxStarNum) + 1;
 
             int[] array = Enumerable.Repeat(starStep, starNum).ToArray();
             VM.UnLockStar.BindDatas(array); 

+ 10 - 2
Assets/Scripts/Business/Runtime/FGUI/Mount/UpgradeSuccessfulPanel/MountUpgradeSuccessfulPanelCtrl.cs

@@ -53,10 +53,18 @@ namespace FL.FGUI
             int oldStarLv = MountService.Instance.mountStarLv;
             int curStarLv = MountData.Instance.GetAdvancedMountLv(mountId);
             var oldStarInfo = zuoqiStarTableRepo.Get(mountId * 10000 + oldStarLv);
-            XGame.Framework.Assert.IsNotNull(oldStarInfo, $"坐骑表zuoqiStar中不存在id:{mountId * 10000 + oldStarLv}");
+            if (oldStarInfo == null)
+            {
+                XGame.Log.Error($"坐骑表zuoqiStar中不存在id:{mountId * 10000 + oldStarLv}");
+                return;
+            }
             int[] oldStarOwnAttr = oldStarInfo.LevelOwnAttr;
             var curStarInfo = zuoqiStarTableRepo.Get(mountId * 10000 + curStarLv);
-            XGame.Framework.Assert.IsNotNull(curStarInfo, $"坐骑表zuoqiStar中不存在id:{mountId * 10000 + curStarLv}");
+            if (curStarInfo == null)
+            {
+                XGame.Log.Error($"坐骑表zuoqiStar中不存在id:{mountId * 10000 + curStarLv}");
+                return;
+            }
             ShowAttrUI(oldStarLv, curStarLv, oldStarOwnAttr, curStarInfo.LevelOwnAttr);
         }
 

+ 3 - 3
Assets/Scripts/Business/Runtime/FGUI/Partner/EpiDetailInfo/PartnerEpiDetailInfoCtrl.cs

@@ -1,4 +1,4 @@
-/// #pkgName FGUI包名
+/// #pkgName FGUI包名
 /// #panelName UIPanel名字
 /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
 /// 该脚本由模板创建
@@ -303,10 +303,10 @@ namespace FL.FGUI
                         continue;
                     var attrValue = table.Own_attr[i + 1];
                     var val =
-                        attrValue > 0 ? TableUtils.ToRealDouble(attrValue).ToString("F2") : "0";
+                        attrValue > 0 ? attrValue.ToRealFloat().ToString("F2") : "0";
                     if (i > 0)
                         str += ",";
-                    str += $"{attrTable.ShowName}{val}%";
+                    str += $"{attrTable.ShowName}{val}";
                 }
                 VM.AttrLabel.SetVar("attr", str).FlushVars();
             }

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

@@ -1,4 +1,4 @@
-/// #pkgName FGUI包名
+/// #pkgName FGUI包名
 /// #panelName UIPanel名字
 /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
 /// 该脚本由模板创建
@@ -97,11 +97,11 @@ namespace FL.FGUI
             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";
+            string descAtk = atkVal > 0 ? atkVal.ToRealFloat().ToString("F1") : "0";
             VM.AtkValLabel.text = descAtk;
             var atkSpeed = lvTable.LvAttr[3];
             string descSpeed =
-                atkSpeed > 0 ? TableUtils.ToRealDouble(atkSpeed).ToString("F1") : "0";
+                atkSpeed > 0 ? atkSpeed.ToRealFloat().ToString("F1") : "0";
             VM.SpeedValLabel.text = descSpeed;
         }
 

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

@@ -73,11 +73,11 @@ namespace FL.FGUI
             }
             var atkVal = lvTable.LvAttr[1];
             //var attributeInfo = AttrDescTableRepo.Get(attrType);
-            string descAtk = atkVal > 0 ? TableUtils.ToRealDouble(atkVal).ToString("F1") : "0";
+            string descAtk = atkVal > 0 ? atkVal.ToRealFloat().ToString("F1") : "0";
             VM.AtkValLabel.text = descAtk;
             var atkSpeed = lvTable.LvAttr[3];
             string descSpeed =
-                atkSpeed > 0 ? TableUtils.ToRealDouble(atkSpeed).ToString("F1") : "0";
+                atkSpeed > 0 ? atkSpeed.ToRealFloat().ToString("F1") : "0";
             VM.SpeedValLabel.text = descSpeed;
         }
 

+ 3 - 3
Assets/Scripts/Business/Runtime/FGUI/Player/AttributeItem/PlayerAttributeItemCtrl.cs

@@ -47,9 +47,9 @@ namespace FL.FGUI
             if (attributeInfo != null)
             {
                 //生命属性 [color=#33CCFF]123456789[/color]	
-                string format = attrParam.attributeValue > 0 ? "F3" : "F0";
-                string desc = attributeInfo.Num_type == 1 ? TableUtils.ToRealDouble(attrParam.attributeValue).ToString(format) + "%" :
-                             (attrParam.attributeType == EAttributeType.AtkSpeed ? TableUtils.ToRealDouble(attrParam.attributeValue).ToString("F1") : attrParam.attributeValue.ToString());
+                string format = attrParam.attributeValue > 0 ? "P3" : "P0";
+                string desc = attributeInfo.Num_type == 1 ? attrParam.attributeValue.ToRealDouble().ToString(format):
+                             (attrParam.attributeType == EAttributeType.AtkSpeed ? attrParam.attributeValue.ToRealDouble().ToString("P1") : attrParam.attributeValue.ToString());
                 VM.AttributeLabel.text = $"{attributeInfo.ShowName} [color=#6699CC]{desc}[/color]";
             }
         }

+ 2 - 2
Assets/Scripts/Business/Runtime/FGUI/Player/AwakePanel/PlayerAwakePanelCtrl.cs

@@ -421,8 +421,8 @@ namespace FL.FGUI
                     {
                         sb.Append(attributeInfo.ShowName);
                         sb.Append("[color=#1EF369]+");
-                        sb.Append(attributeInfo.Num_type == 1 ? TableUtils.ToRealDouble(runeInfo.Value_plus[i+1]).ToString("F3") + "%" :
-                                 (attributeInfo.Id == (int)EAttributeType.AtkSpeed ? TableUtils.ToRealDouble(runeInfo.Value_plus[i + 1]).ToString("F1") : runeInfo.Value_plus[i + 1].ToString()));
+                        sb.Append(attributeInfo.Num_type == 1 ? (runeInfo.Value_plus[i+1]).ToRealFloat().ToString("P3"):
+                                 (attributeInfo.Id == (int)EAttributeType.AtkSpeed ? (runeInfo.Value_plus[i + 1]).ToRealFloat().ToString("P1") : runeInfo.Value_plus[i + 1].ToString()));
                         sb.Append("[/color]");
                     }
                 }

+ 1 - 1
Assets/Scripts/Business/Runtime/FGUI/Player/JokSkillNested/PlayerJokSkillNestedCtrl.cs

@@ -191,7 +191,7 @@ namespace FL.FGUI
         private void ShowAtrributeVal(GTextField attrLabel, EAttributeType attrType, bool bAtkSpeed = false)
         {
             var attrVal = PlayerData.Instance.Attr.GetValue(attrType);
-            attrLabel.text = $"{_attributeDescMap[attrType]}:{(bAtkSpeed ? TableUtils.ToRealDouble(attrVal).ToString("F1") : attrVal.ToString())}";
+            attrLabel.text = $"{_attributeDescMap[attrType]}:{(bAtkSpeed ? attrVal.ToRealDouble().ToString("P1") : attrVal.ToString())}";
         }
 
 

+ 2 - 2
Assets/Scripts/Business/Runtime/Network/Controllers/ActMountExpPushCtrl.cs

@@ -7,8 +7,8 @@ namespace FL.Network
     {
         protected override void OnProcess(ActMountExpPush message, object context)
         {
-            MountData.Instance.exp = message.exp;
-            MountData.Instance.universalId = message.id;
+            MountData.Instance.UniversalExp = message.exp;
+            MountData.Instance.UniversalId = message.id;
         }
     }
 }

+ 5 - 5
Assets/Scripts/Business/Runtime/Network/Controllers/ActMountPushCtrl.cs

@@ -7,11 +7,11 @@ namespace FL.Network
     {
         protected override void OnProcess(ActMountPush message, object context)
         {
-            MountData.Instance.universalId = message.id;
-            MountData.Instance.exp = message.exp;
-            MountData.Instance.mountModelId = message.use;
-            MountData.Instance.useSkillMountId = message.useSkill;
-            MountData.Instance.mountPartExp = message.bwExp;
+            MountData.Instance.UniversalId = message.id;
+            MountData.Instance.UniversalExp = message.exp;
+            MountData.Instance.MountModelId = message.use;
+            MountData.Instance.UseSkillMountId = message.useSkill;
+            MountData.Instance.MountPartExp = message.bwExp;
             // (已解锁)高级坐骑升星数据
             if (message.mountList != null) 
             {

+ 2 - 2
Assets/Scripts/Business/Runtime/Network/Controllers/ActMountUsePushCtrl.cs

@@ -6,8 +6,8 @@ namespace FL.Network
     {
         protected override void OnProcess(ActMountUsePush message, object context)
         {
-            MountData.Instance.useSkillMountId = message.useSkill;
-            MountData.Instance.mountModelId = message.use;
+            MountData.Instance.UseSkillMountId = message.useSkill;
+            MountData.Instance.MountModelId = message.use;
         }
     }
 }

+ 2 - 2
fl-fgui-project/assets/Mount/AdvancedNested.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="692,923">
-  <controller name="AdvanceMountStateCtrl" pages="0,,1,,2," selected="0">
+  <controller name="AdvanceMountStateCtrl" pages="0,,1,,2," selected="1">
     <remark page="0" value="未解锁"/>
     <remark page="1" value="已解锁可升级"/>
     <remark page="2" value="已达最大等级"/>
@@ -26,7 +26,7 @@
       <relation target="n7_j7sp" sidePair="middle-middle"/>
     </group>
     <loader3D id="n8_j7sp" name="MountSpine" xy="345,157" pivot="0.5,0.5" anchor="true" size="211,283" group="n94_pww4" url="ui://s58m5vbw9sqtg" align="center" vAlign="middle" autoSize="true" animation="" skin="" clearOnPublish="true"/>
-    <component id="n13_j7sp" name="RideBtn" src="sfx62x" fileName="Components/ComButtons/ComBlueBtn.xml" pkg="gt6q23qw" xy="210,285" group="n94_pww4" scale="0.6,0.6">
+    <component id="n13_j7sp" name="RideBtn" src="sfx62z" fileName="Components/ComButtons/ComYellowBtn.xml" pkg="gt6q23qw" xy="210,285" group="n94_pww4" scale="0.6,0.6">
       <gearDisplay controller="AdvanceMountStateCtrl" pages="1,2"/>
       <gearText controller="RideCtrl" pages="1" values="取消骑乘" default="骑乘"/>
       <Button title="骑乘" titleFontSize="43"/>

+ 0 - 1
fl-fgui-project/assets/Mount/TrainNested.xml

@@ -7,7 +7,6 @@
   <displayList>
     <image id="n14_j7sp" name="n14" src="rwcw4" fileName="images/pop/tanchuangdiban2.png" pkg="gt6q23qw" xy="0,366" size="692,426" group="n94_srfj"/>
     <loader id="n5_j7sp" name="n5" xy="1,0" size="689,547" group="n94_srfj" url="ui://s58m5vbwj7spj" align="center" vAlign="middle" autoSize="true"/>
-    <image id="n7_j7sp" name="n7" src="9sqtc" fileName="Images/mingzidikuang.png" xy="127,61" pivot="0.5,0.5" anchor="true" size="246,85" group="n94_srfj"/>
     <image id="n65_j7sp" name="n65" src="rwcw5" fileName="images/pop/tanchuangdiban3.png" pkg="gt6q23qw" xy="355,641" pivot="0.5,0.5" anchor="true" size="624,138" group="n94_srfj"/>
     <component id="n37_j7sp" name="TrainCostItem" src="j7yv3n" fileName="Components/ComCostNested.xml" pkg="gt6q23qw" xy="162,824" pivot="0.5,0.5" anchor="true" group="n94_srfj">
       <gearDisplay controller="MaxUpgradeStep" pages="0"/>

+ 1 - 1
fl-fgui-project/assets/Mount/UpgradeNested.xml

@@ -16,7 +16,7 @@
     <loader3D id="n8_j7sp" name="MountSpine" xy="362,220" pivot="0.5,0.5" anchor="true" size="211,283" group="n94_srfj" url="ui://s58m5vbw9sqtg" align="center" vAlign="middle" autoSize="true" animation="" skin="" clearOnPublish="true"/>
     <component id="n11_j7sp" name="LastBtn" src="j7spo" fileName="Components/ArrowBtn.xml" xy="4,166" group="n94_srfj"/>
     <component id="n12_j7sp" name="NextBtn" src="j7spo" fileName="Components/ArrowBtn.xml" xy="632,166" group="n94_srfj" scale="-1,1"/>
-    <component id="n13_j7sp" name="RideBtn" src="sfx62x" fileName="Components/ComButtons/ComBlueBtn.xml" pkg="gt6q23qw" xy="210,285" group="n94_srfj" scale="0.6,0.6">
+    <component id="n13_j7sp" name="RideBtn" src="sfx62z" fileName="Components/ComButtons/ComYellowBtn.xml" pkg="gt6q23qw" xy="210,285" group="n94_srfj" scale="0.6,0.6">
       <gearText controller="RideCtrl" pages="1" values="取消骑乘" default="骑乘"/>
       <Button title="骑乘" titleFontSize="43"/>
     </component>