| Main/Config/ConfigManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/Config/Configs/HeroSkinAttrConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/Config/Configs/HeroSkinConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroSkinCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroSkinChooseWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroSkinChooseWin.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroSkinRoleCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroSkinRoleCell.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroSkinRoleLineCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroSkinRoleLineCell.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroSkinWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Main/FightPowerManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/Config/ConfigManager.cs
@@ -146,7 +146,7 @@ LoadConfigByType(configType); sw.Stop(); #if UNITY_EDITOR if (sw.ElapsedMilliseconds >= 500) if (sw.ElapsedMilliseconds >= 100) { Debug.LogError($"加载配置 {configType.Name} 耗时较长: {sw.ElapsedMilliseconds} ms"); } Main/Config/Configs/HeroSkinAttrConfig.cs
@@ -1,6 +1,6 @@ //-------------------------------------------------------- // [Author]: YYL // [ Date ]: 2026年3月4日 // [ Date ]: 2026年3月13日 //-------------------------------------------------------- using System.Collections.Generic; @@ -17,6 +17,7 @@ } public int SkinID; public int Quality; public int NeedItemID; public int StarMax; public int[] WearAttrIDList; @@ -38,17 +39,19 @@ string[] tables = input.Split('\t'); int.TryParse(tables[0],out SkinID); int.TryParse(tables[1],out NeedItemID); int.TryParse(tables[1],out Quality); int.TryParse(tables[2],out StarMax); int.TryParse(tables[2],out NeedItemID); if (tables[3].Contains("[")) int.TryParse(tables[3],out StarMax); if (tables[4].Contains("[")) { WearAttrIDList = JsonMapper.ToObject<int[]>(tables[3]); WearAttrIDList = JsonMapper.ToObject<int[]>(tables[4]); } else { string[] WearAttrIDListStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] WearAttrIDListStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); WearAttrIDList = new int[WearAttrIDListStringArray.Length]; for (int i=0;i<WearAttrIDListStringArray.Length;i++) { @@ -56,13 +59,13 @@ } } if (tables[4].Contains("[")) if (tables[5].Contains("[")) { WearAttrValueList = JsonMapper.ToObject<int[]>(tables[4]); WearAttrValueList = JsonMapper.ToObject<int[]>(tables[5]); } else { string[] WearAttrValueListStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] WearAttrValueListStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); WearAttrValueList = new int[WearAttrValueListStringArray.Length]; for (int i=0;i<WearAttrValueListStringArray.Length;i++) { @@ -70,13 +73,13 @@ } } if (tables[5].Contains("[")) if (tables[6].Contains("[")) { WearAttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[5]); WearAttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[6]); } else { string[] WearAttrPerStarAddListStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] WearAttrPerStarAddListStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); WearAttrPerStarAddList = new int[WearAttrPerStarAddListStringArray.Length]; for (int i=0;i<WearAttrPerStarAddListStringArray.Length;i++) { @@ -84,13 +87,13 @@ } } if (tables[6].Contains("[")) if (tables[7].Contains("[")) { RoleAttrIDList = JsonMapper.ToObject<int[]>(tables[6]); RoleAttrIDList = JsonMapper.ToObject<int[]>(tables[7]); } else { string[] RoleAttrIDListStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] RoleAttrIDListStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); RoleAttrIDList = new int[RoleAttrIDListStringArray.Length]; for (int i=0;i<RoleAttrIDListStringArray.Length;i++) { @@ -98,13 +101,13 @@ } } if (tables[7].Contains("[")) if (tables[8].Contains("[")) { RoleAttrValueList = JsonMapper.ToObject<int[]>(tables[7]); RoleAttrValueList = JsonMapper.ToObject<int[]>(tables[8]); } else { string[] RoleAttrValueListStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] RoleAttrValueListStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); RoleAttrValueList = new int[RoleAttrValueListStringArray.Length]; for (int i=0;i<RoleAttrValueListStringArray.Length;i++) { @@ -112,13 +115,13 @@ } } if (tables[8].Contains("[")) if (tables[9].Contains("[")) { RoleAttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[8]); RoleAttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[9]); } else { string[] RoleAttrPerStarAddListStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] RoleAttrPerStarAddListStringArray = tables[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); RoleAttrPerStarAddList = new int[RoleAttrPerStarAddListStringArray.Length]; for (int i=0;i<RoleAttrPerStarAddListStringArray.Length;i++) { Main/Config/Configs/HeroSkinConfig.cs
@@ -1,6 +1,6 @@ //-------------------------------------------------------- // [Author]: YYL // [ Date ]: 2026年3月11日 // [ Date ]: 2026年3月13日 //-------------------------------------------------------- using System.Collections.Generic; @@ -19,7 +19,6 @@ public int SkinID; public string SkinName; public string BG; public int Quality; public int AudioID; public string Tachie; public float[] TachieParam; @@ -48,19 +47,17 @@ BG = tables[2]; int.TryParse(tables[3],out Quality); int.TryParse(tables[3],out AudioID); int.TryParse(tables[4],out AudioID); Tachie = tables[4]; Tachie = tables[5]; if (tables[6].Contains("[")) if (tables[5].Contains("[")) { TachieParam = JsonMapper.ToObject<float[]>(tables[6]); TachieParam = JsonMapper.ToObject<float[]>(tables[5]); } else { string[] TachieParamStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] TachieParamStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); TachieParam = new float[TachieParamStringArray.Length]; for (int i=0;i<TachieParamStringArray.Length;i++) { @@ -68,21 +65,21 @@ } } SquareIcon = tables[7]; SquareIcon = tables[6]; RectangleIcon = tables[8]; RectangleIcon = tables[7]; CardPic = tables[9]; CardPic = tables[8]; SpineRes = tables[10]; SpineRes = tables[9]; InitialSkinName = tables[11]; InitialSkinName = tables[10]; ApearMotionName = tables[12]; ApearMotionName = tables[11]; TransfMotionName = tables[13]; TransfMotionName = tables[12]; LoopMotionName = tables[14]; LoopMotionName = tables[13]; } catch (Exception exception) { Main/System/HeroUI/HeroSkinCell.cs
@@ -18,8 +18,9 @@ { var skinID = HeroConfig.Get(heroID).SkinIDList[index]; var skinConfig = HeroSkinConfig.Get(skinID); var attrCfg = HeroSkinAttrConfig.Get(skinID); skinImage.SetOrgSprite(skinConfig.CardPic, "HeroSkinCard"); skinFrame.SetSprite("HeroSkinFrame" + skinConfig.Quality); skinFrame.SetSprite("HeroSkinFrame" + (attrCfg== null ? 0 : attrCfg.Quality)); skinName.text = skinConfig.SkinName == "" ? Language.Get("HeroSkin2") : skinConfig.SkinName; if (!isHero) { Main/System/HeroUI/HeroSkinChooseWin.cs
New file @@ -0,0 +1,84 @@ using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// 武将皮肤形象选择 /// </summary> public class HeroSkinChooseWin : UIBase { [SerializeField] Button closeBtn; [SerializeField] Button okBtn; [SerializeField] ScrollerController skinScroller; public static int selectIndex; public static List<int> activeIndexList = new List<int>(); HeroConfig heroConfig; protected override void InitComponent() { closeBtn.AddListener(() => { CloseWindow(); }); okBtn.AddListener(() => { var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid); HeroUIManager.Instance.SendSkinOP(hero.heroId, heroConfig.SkinIDList[selectIndex], 2, hero.itemHero.gridIndex); CloseWindow(); }); } protected override void OnPreOpen() { var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid); heroConfig = hero.heroConfig; skinScroller.OnRefreshCell += OnRefreshCell; selectIndex = hero.SkinIndex; activeIndexList = new List<int>(); for (int i = 0; i < heroConfig.SkinIDList.Length; i++) { if (HeroUIManager.Instance.IsHeroSkinActive(hero.heroId, heroConfig.SkinIDList[i])) { activeIndexList.Add(i); } } CreateScroller(); } protected override void OnPreClose() { skinScroller.OnRefreshCell -= OnRefreshCell; heroConfig = null; } void CreateScroller() { skinScroller.Refresh(); for (int i = 0; i < activeIndexList.Count; i++) { if (i % 4 == 0) { skinScroller.AddCell(ScrollerDataType.Header, i); } } skinScroller.Restart(); } void OnRefreshCell(ScrollerDataType type, CellView cell) { var _cell = cell as HeroSkinRoleLineCell; _cell.Display(heroConfig, cell.index); } public void SetSelectIndex(int index) { selectIndex = index; skinScroller.m_Scorller.RefreshActiveCellViews(); } } Main/System/HeroUI/HeroSkinChooseWin.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 186027f98fd6d5e4d95ce7d41ba5f040 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Main/System/HeroUI/HeroSkinRoleCell.cs
New file @@ -0,0 +1,23 @@ using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class HeroSkinRoleCell : MonoBehaviour { [SerializeField] UIHeroController heroModel; [SerializeField] Image selectImg; [SerializeField] Button selectBtn; //index为皮肤表中索引 public void Display(HeroConfig heroConfig, int index) { selectImg.SetActive(HeroSkinChooseWin.selectIndex == index); heroModel.Create(heroConfig.SkinIDList[index], heroConfig.UIScale); selectBtn.AddListener(() => { var ui = UIManager.Instance.GetUI<HeroSkinChooseWin>(); ui.SetSelectIndex(index); }); } } Main/System/HeroUI/HeroSkinRoleCell.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 340939aa27fc7bb4eafbe1bc3e58dda2 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Main/System/HeroUI/HeroSkinRoleLineCell.cs
New file @@ -0,0 +1,23 @@ using UnityEngine; public class HeroSkinRoleLineCell : CellView { [SerializeField] HeroSkinRoleCell[] skinRoleCells; //index 为 临时列表的索引 public void Display(HeroConfig heroConfig, int index) { for (int i = 0; i < skinRoleCells.Length; i++) { if (index + i < HeroSkinChooseWin.activeIndexList.Count) { skinRoleCells[i].SetActive(true); skinRoleCells[i].Display(heroConfig, HeroSkinChooseWin.activeIndexList[index + i]); } else { skinRoleCells[i].SetActive(false); } } } } Main/System/HeroUI/HeroSkinRoleLineCell.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 37364238198b1504d979cddfa353daee MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Main/System/HeroUI/HeroSkinWin.cs
@@ -80,11 +80,16 @@ } HeroUIManager.Instance.SendSkinOP(heroID, skinID, 4, hero.itemHero.gridIndex); }); showGetObj.AddListener(() => { showGetObj.SetActive(false); showNormalObj.SetActive(true); }); changeClothBtn.AddListener(() => { UIManager.Instance.OpenWindow<HeroSkinChooseWin>(); }); } @@ -128,11 +133,12 @@ protected override void OnPreClose() { hero = null; skinScroller.OnRefreshCell -= OnRefreshCell; HeroUIManager.Instance.OnSkinIndexChanged -= OnSkinIndexChanged; HeroUIManager.Instance.OnHeroCollectEvent -= OnHeroCollectEvent; PackManager.Instance.RefreshItemEvent -= OnRefreshItemEvent; hero = null; heroConfig = null; HeroUIManager.Instance.selectSkinIndex = -1; } @@ -259,6 +265,11 @@ shopBtn.SetActive(false); changeClothBtn.SetActive(false); } else { shopBtn.SetActive(true); changeClothBtn.SetActive(true); } if (!HeroUIManager.Instance.IsHeroSkinActive(heroID, skinID)) { Main/System/Main/FightPowerManager.cs
@@ -366,9 +366,8 @@ //武将皮肤 var skinValue = HeroUIManager.Instance.GetSkinAttrValue(attrType); var skinPer = HeroUIManager.Instance.GetSkinAttrPer(attrType); var skinPer = HeroUIManager.Instance.GetSkinAttrPer(attrType) / 10000.0; var heroSkinValue = hero.GetHeroSkinValue(attrType); var heroSkinPer = hero.GetHeroSkinPer(attrType); double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+skinValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+skinPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue+heroSkinValue; @@ -413,7 +412,6 @@ //武将皮肤 var heroSkinValue = hero.GetHeroSkinValue(attrType); var heroSkinPer = hero.GetHeroSkinPer(attrType); double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+heroSkinValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue;