yyl
2025-09-05 fe421e1b91bbb3f69e494ec58dd8092d61346f5e
Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
36个文件已修改
1个文件已删除
3个文件已添加
1 文件已重命名
755 ■■■■ 已修改文件
Main/Common/EventName.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/UIFuncOpen.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Core/ButtonEx.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Decorate/Tweens/PositionTween.cs 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Decorate/Tweens/RotationTween.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Decorate/Tweens/ScaleTween.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Decorate/Tweens/TweenEx.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/HeroAwakeConfig.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/PlayerPropertyConfig.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleField/BattleField.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleField/StoryBattleField.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleManager.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/BattleObject/BattleObject.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Battle/Skill/SkillBase.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Equip/EquipModel.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HappyXB/HappyXBModel.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HappyXB/HeroCallResultWin.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HappyXB/HeroCallWin.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroInfo.Talent.cs 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/GiftBaseCell.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftEatWin.cs 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftEatWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftLineCell.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroHeadBaseCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroLVBreakSuccessWin.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroListWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroShowBaseCell.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroTrainWin.cs 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.Gift.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.Talent.cs 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.Talent.cs.meta 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/ItemTip/OwnItemCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/ItemTip/OwnMoneyCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/AutoFightModel.cs 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/AutoFightWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/MainWin.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Setting/QuickSetting.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SkillUI/SkillBaseCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SkillUI/SkillWordCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/ComponentExtersion.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/UIHelper.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Common/EventName.cs
@@ -11,6 +11,8 @@
    public const string DISPLAY_BATTLE_UI = "DISPLAY_BATTLE_UI";//显示战斗UI
    public const string BATTLE_DROP_ITEMS = "BATTLE_DROP_ITEMS";//掉落物品
    public const string BATTLE_CAST_SKILL = "BATTLE_CAST_SKILL";//施放技能
    public const string BATTLE_END = "BATTLE_END";//战斗结束
}
Main/Component/UI/Common/UIFuncOpen.cs
@@ -63,7 +63,8 @@
        if (funcBtn != null)
        {
            funcBtn.interactable = IsOpen;
            // 禁用按钮的点击事件,但不改变透明度
            funcBtn.enabled = IsOpen;
        }
        
        
Main/Component/UI/Core/ButtonEx.cs
@@ -14,8 +14,11 @@
    public bool customNegativeSound = false;
    public int positiveSound = 0;
    public int negativeSound = 0;
    public float pressedScale = 1.1f;
    float m_AbleTime = 0f;
    private Vector3 originalScale;
    public float ableTime {
        get { return m_AbleTime; }
        private set {
@@ -44,6 +47,19 @@
    protected override void Awake()
    {
        base.Awake();
        originalScale = transform.localScale;
    }
    public override void OnPointerDown(PointerEventData eventData)
    {
        base.OnPointerDown(eventData);
        transform.localScale = originalScale * pressedScale;
    }
    public override void OnPointerUp(PointerEventData eventData)
    {
        base.OnPointerUp(eventData);
        transform.localScale = originalScale;
    }
    private void PlayPositiveSound()
Main/Component/UI/Decorate/Tweens/PositionTween.cs
@@ -1,45 +1,45 @@
using UnityEngine;
using System.Collections;
    public class PositionTween : TweenEx
public class PositionTween : TweenEx
{
    public override void SetStartState()
    {
        base.SetStartState();
        this.rectTransform.anchoredPosition = from;
    }
        public override void SetStartState()
    public override void SetEndState()
    {
        base.SetEndState();
        this.rectTransform.anchoredPosition = to;
    }
    protected override void OnPrepare()
    {
        base.OnPrepare();
        this.rectTransform.anchoredPosition = reversal ? to : from;
    }
    protected override void OnOnceEnd()
    {
        if (wrapMode == WrapMode.PingPongOnce)
        {
            base.SetStartState();
            this.rectTransform.anchoredPosition = from;
            SetStartState();
        }
        public override void SetEndState()
        {
            base.SetEndState();
            this.rectTransform.anchoredPosition = to;
        else
        {
            this.rectTransform.anchoredPosition = reversal ? from : to;
        }
        base.OnOnceEnd();
        protected override void OnPrepare()
        {
            base.OnPrepare();
            this.rectTransform.anchoredPosition = reversal ? to : from;
        }
    }
        protected override void OnOnceEnd()
        {
            if (wrapMode == WrapMode.PingPongOnce)
            {
                SetStartState();
            }
            else
            {
                this.rectTransform.anchoredPosition = reversal ? from : to;
            }
    protected override void UpdateVector3()
    {
        base.UpdateVector3();
        this.rectTransform.anchoredPosition = CalculateVector3();
    }
            base.OnOnceEnd();
        }
        protected override void UpdateVector3()
        {
            base.UpdateVector3();
            this.rectTransform.anchoredPosition = CalculateVector3();
        }
    }
}
Main/Component/UI/Decorate/Tweens/RotationTween.cs
@@ -25,8 +25,14 @@
    protected override void OnOnceEnd()
    {
        this.transform.localEulerAngles = reversal ? from : to;
        if (wrapMode == WrapMode.PingPongOnce)
        {
            SetStartState();
        }
        else
        {
            this.transform.localEulerAngles = reversal ? from : to;
        }
        base.OnOnceEnd();
    }
Main/Component/UI/Decorate/Tweens/ScaleTween.cs
@@ -23,7 +23,14 @@
    protected override void OnOnceEnd()
    {
        this.transform.localScale = reversal ? from : to;
        if (wrapMode == WrapMode.PingPongOnce)
        {
            SetStartState();
        }
        else
        {
            this.transform.localScale = reversal ? from : to;
        }
        base.OnOnceEnd();
    }
Main/Component/UI/Decorate/Tweens/TweenEx.cs
@@ -99,14 +99,8 @@
            switch (wrapMode)
            {
                case WrapMode.Once:
                    if (accumulatedTime > duration)
                    {
                        OnOnceEnd();
                        doTween = false;
                    }
                    break;
                case WrapMode.PingPongOnce:
                    if (accumulatedTime > duration*2)
                    if (accumulatedTime > duration)
                    {
                        OnOnceEnd();
                        doTween = false;
@@ -173,9 +167,11 @@
                t = Mathf.Repeat((accumulatedTime / duration) * curveLength, 1);
                break;
            case WrapMode.PingPong:
            case WrapMode.PingPongOnce:
                t = Mathf.PingPong((accumulatedTime / duration) * curveLength, 1);
                break;
            case WrapMode.PingPongOnce:
                t = Mathf.PingPong((accumulatedTime / (duration/2)) * curveLength, 1);
                break;
        }
        var value = curve.Evaluate(reversal ? curveLength - t : t);
Main/Config/PartialConfigs/HeroAwakeConfig.cs
@@ -63,7 +63,17 @@
            {
                return item.Key;
            }
        }
        }
        return 0;
    }
    public static int GetMaxAwakeLV(int heroID)
    {
        Dictionary<int, HeroAwakeConfig> tempDic = null;
        if (!configDics.TryGetValue(heroID, out tempDic))
        {
            return 0;
        }
        return tempDic.Count;
    }
}
Main/Config/PartialConfigs/PlayerPropertyConfig.cs
@@ -30,8 +30,9 @@
    public static int[] baseAttrs = new int[] { 6, 7, 8 };
    // 映射对应的百分比属性,方便使用,如计算属性需要找对应的百分比加成
    public static Dictionary<int, int> baseAttr2perDict = new Dictionary<int, int>()
    {
    {
        { 6,16 },
        { 7,17 },
        { 8,18 }
Main/System/Battle/BattleField/BattleField.cs
@@ -439,17 +439,19 @@
            {
                Debug.LogError("战斗胜利");
                //  战斗胜利
                //  如果是自动战斗转自动战斗?
            }
            else
            {
                //  战斗失败
                Debug.LogError("战斗失败");
                // HaveRest();
            }
            IsBattleFinish = true;
            //提供外部 胜利等奖励显示
            EventBroadcast.Instance.Broadcast<string, JsonData>(EventName.BATTLE_END, guid, turnFightStateData);
            
        });
        recordPlayer.PlayRecord(battleEndAction);
Main/System/Battle/BattleField/StoryBattleField.cs
@@ -122,13 +122,6 @@
    public override void OnTurnFightState(int turnNum, int State, int FuncLineID, JsonData extendData)
    {
        base.OnTurnFightState(turnNum, State, FuncLineID, extendData);
        // 0-起始状态标记;1-准备完毕;2-战斗中;3-战斗结束;4-结算奖励;5-结束状态标记 6-休息并结束
        if (State == 4)
        {
            //上一波小怪死亡,默认帮玩家请求一下刷新新怪,玩家点击锤子时候就可以直接攻击
            RequestFight();
        }
    }
    protected void OnTeamChange(TeamType teamType)
@@ -141,6 +134,14 @@
            }
        }
    }
    protected override void OnSettlement(JsonData turnFightStateData)
    {
        base.OnSettlement(turnFightStateData);
        BattleManager.Instance.MainFightRequest(4);
    }
    public override void HaveRest()
    {
@@ -157,7 +158,6 @@
    // public override void OnBattleEnd(JsonData turnFightStateData)
    // {
    //     base.OnBattleEnd(turnFightStateData);
    //     // HaveRest();
    // }
Main/System/Battle/BattleManager.cs
@@ -419,7 +419,7 @@
    // 0-停止战斗回城   -  玩家主动点击回城时发送
    // 1-设置消耗倍值   -  玩家设置消耗倍值,对应到玩家useHarmerCount的值
    // 2-挑战关卡小怪   -  玩家点击开始战斗时发送,仅从休息状态到开始战斗时发送即可
    // 3-挑战关卡boss   -  玩家请求挑战该关卡boss时发送
    // 3-重定义暂未使用
    // 4-继续战斗          -   玩家主线战斗中(包含主线小怪、主线boss),前端表现完后端同步的战斗片段后,可再回复该值,后端会根据战斗逻辑及流程自动回复下一段的战斗片段封包,一直循环
    public void MainFightRequest(byte reqType, uint reqValue = 0)
    {
Main/System/Battle/BattleObject/BattleObject.cs
@@ -353,7 +353,7 @@
    public void PerformDrop()
    {
        if (null == battleDrops)
        if (null == battleDrops || battleDrops.dropItemPackIndex.Count == 0)
            return;
        EventBroadcast.Instance.Broadcast<string, BattleDrops, Action>(
Main/System/Battle/Skill/SkillBase.cs
@@ -4,7 +4,6 @@
using DG.Tweening;
using Spine;
using System.Linq;
using PlasticGui.WorkspaceWindow.BranchExplorer;
public class SkillBase
Main/System/Equip/EquipModel.cs
@@ -87,7 +87,9 @@
    {
        if (!string.IsNullOrEmpty(guid))
            return;
        lastDropIndexs = drops.dropItemPackIndex;
        // Debug.Log("-掉落装备 " + lastDropIndexs.Count + " 个" + JsonMapper.ToJson(lastDropIndexs));
        NotifyItemDrop(drops.dropItemPackIndex, drops.rectTransform);
        action?.Invoke();
    }
@@ -118,6 +120,7 @@
        if (item == null)
            return;
        //非自动模式下,筛选装备打开装备操作界面
        if (IsEquip(item))
        {
@@ -136,7 +139,8 @@
        if (info.MakeValue == 0)
            return;
        waitEquipOPPack = false;
        if (info.MakeValue == 2)
            waitEquipOPPack = false;
        bool isDone = false;    // 换上新装备且分解了旧装备
        //选中的地板装备进行处理,替换还是找下一件,检查OnEquipOPResultAction
        if (selectFloorEquip != null)
@@ -182,7 +186,7 @@
    /// <param name="autoDecompose"></param>
    public void SendEquipOP(ushort[] itemIndexList, byte opType, bool autoDecompose = false)
    {
        if (waitEquipOPPack) return;
        if (opType == 2 && waitEquipOPPack) return;
        // NoteFloorEquip(itemIndexList, opType);
        var pack = new CB415_tagCSMainDropItemOP();
@@ -191,7 +195,7 @@
        pack.OPType = opType;
        pack.OPValue = (byte)(autoDecompose ? 1 : 0); // 替换后是否自动分解原装备:0否1是
        if (opType > 0)
        if (opType == 2)
            waitEquipOPPack = true;
        GameNetSystem.Instance.SendInfo(pack);
    }
Main/System/HappyXB/HappyXBModel.cs
@@ -433,6 +433,23 @@
        return freeCountToday < funcSet.DailyFreeCount;
    }
    public int GetFreeCountToday(int type)
    {
        XBTypeInfo typeInfo = GetXBInfoByType(type);
        if (typeInfo != null)
        {
            return typeInfo.freeCountToday;
        }
        return 0;
    }
    public int GetDailyFreeCount(int type)
    {
        return TreasureSetConfig.Get(type).DailyFreeCount;
    }
    //获取还需多少次可得幸运奖励
    public int GetNextXBCountForBigAward(int type, out List<int> qualityList)
    {
@@ -442,7 +459,7 @@
        {
            return 0;
        }
        var xbConfig = GetXBItemConfigByType(type);
        var luckList = xbConfig.LuckyItemRateInfo.Keys.ToList();
        luckList.Sort();
Main/System/HappyXB/HeroCallResultWin.cs
@@ -227,9 +227,11 @@
        call1ItemIcon.SetOrgSprite(IconKey);
        var itemCount = PackManager.Instance.GetItemCountByID(PackType.Item, funcSet.CostItemID);
        if (HappyXBModel.Instance.IsHaveFreeXB((int)HeroUIManager.Instance.selectCallType))
        int todayFreeCount = HappyXBModel.Instance.GetFreeCountToday((int)HeroUIManager.Instance.selectCallType);
        int dayMaxCount = HappyXBModel.Instance.GetDailyFreeCount((int)HeroUIManager.Instance.selectCallType);
        if (todayFreeCount < dayMaxCount)
        {
            call1Text.text = Language.Get("L1127");
            call1Text.text = Language.Get("L1127") + (dayMaxCount - todayFreeCount) + "/" + dayMaxCount;
        }
        else
        {
Main/System/HappyXB/HeroCallWin.cs
@@ -74,9 +74,12 @@
        call1ItemIcon.SetOrgSprite(IconKey);
        call10ItemIcon.SetOrgSprite(IconKey);
        var itemCount = PackManager.Instance.GetItemCountByID(PackType.Item, funcSet.CostItemID);
        if (HappyXBModel.Instance.IsHaveFreeXB((int)HappXBTitle.HeroCallAdvanced))
        int todayFreeCount = HappyXBModel.Instance.GetFreeCountToday((int)HappXBTitle.HeroCallAdvanced);
        int dayMaxCount = HappyXBModel.Instance.GetDailyFreeCount((int)HappXBTitle.HeroCallAdvanced);
        if (todayFreeCount < dayMaxCount)
        {
            call1Text.text = Language.Get("L1127");
            call1Text.text = Language.Get("L1127") + (dayMaxCount - todayFreeCount) + "/" + dayMaxCount;
        }
        else
        {
Main/System/Hero/HeroInfo.Talent.cs
@@ -41,6 +41,17 @@
        }
    }
    // 75 # 英雄天赋洗炼锁定索引列表,对应71天赋ID索引
    public List<int> talentLockList
    {
        get
        {
            if (itemHero == null)
                return null;
            return itemHero.GetUseData(75);
        }
    }
    Dictionary<int, int> talentAttrDic = new Dictionary<int, int>();   //属性ID : 天赋属性值
@@ -85,23 +96,37 @@
        return 0;
    }
    public int GetMaxStarCount()
    {
        if (Quality < 4)
            return HeroUIManager.normalGiftMaxCnt * HeroUIManager.Instance.maxGiftLevel;
        return HeroUIManager.giftMaxCnt * HeroUIManager.Instance.maxGiftLevel;
    }
    public int GetTotalStarCount()
    {
        //talentLvList里的元素全部相加
        return talentLvList.Sum();
    }
    //天赋会更快到达满级;觉醒可以提升星上限,如初始时40满星,觉醒X级后50满星
    //判断当前是否满星
    public bool IsFullStar()
    {
        if (HeroAwakeConfig.GetHeroAwakeConfig(heroId, 1) == null)
        {
            return heroStar >= HeroQualityConfig.Get(Quality).InitStarUpper;
        }
        //根据觉醒累计提升星上限
        int addStarCount = 0;
        for (int i = 1; i <= awakeLevel; i++)
        {
            addStarCount += HeroAwakeConfig.GetHeroAwakeConfig(heroId, i).AddStarUpper;
        }
        return heroStar >= HeroQualityConfig.Get(Quality).InitStarUpper + addStarCount;
    }
    public bool IsFullGift()
    {
        //检查talentLvList 所有元素都大于等于10
        return talentLvList.All(x => x >= HeroUIManager.Instance.maxGiftLevel);
    }
    public int GetTalentLockCount()
    {
        //talentLockList里的元素全部相加 1代表锁定 0代表未锁定
        return talentLockList.Sum();
    }
}
Main/System/HeroUI/GiftBaseCell.cs
@@ -106,9 +106,8 @@
    //showState 0:不显示 1:新增 2:提升
    //giftID 0 :代表灰色需升星激活 -1:代表棕色需觉醒激活,其他根据配表,没有天赋的外层控制显隐
    public void Init(int giftID, int lv, UnityAction onclick = null, int showState = 0)
    public void Init(int giftID, int lv, UnityAction onclick = null, int showState = 0, int heroID = 0, int index = 0)
    {
        giftBtn.AddListener(onclick);
        if (HeroTalentConfig.HasKey(giftID))
        {
            var config = HeroTalentConfig.Get(giftID);
@@ -129,7 +128,32 @@
            lvRect.SetActive(false);
            stateImg.SetActive(false);
        }
        giftBtn.AddListener(onclick != null ? onclick : () => { ShowSmallTip(giftID, lv, heroID, index); });
    }
    void ShowSmallTip(int giftID, int giftLV, int heroID, int index)
    {
        SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
        if (giftID > 0)
        {
            var giftConfig = HeroTalentConfig.Get(giftID);
            SmallTipWin.showText = Language.Get("SmallTipFomat", giftConfig.Name + " " + Language.Get("L1113", giftLV),
            Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue)));
            UIManager.Instance.OpenWindow<SmallTipWin>();
        }
        else if (giftID == 0)
        {
            SmallTipWin.showText = Language.Get("HeroGift1");
            UIManager.Instance.OpenWindow<SmallTipWin>();
        }
        else if (giftID == -1)
        {
            SmallTipWin.showText = Language.Get("HeroGift2", HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(heroID, index));
            UIManager.Instance.OpenWindow<SmallTipWin>();
        }
    }
    Color32 GetColor(int quality)
    {
@@ -220,7 +244,7 @@
            
        }
        scale = width / rect.sizeDelta.x;
        cellContainer.transform.localScale = new Vector3(scale, scale, scale);
        cellContainer.transform.localScale = cellContainer.transform.localScale * scale;
    }
}
Main/System/HeroUI/HeroGiftEatWin.cs
New file
@@ -0,0 +1,68 @@
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 武将吞噬界面
/// </summary>
public class HeroGiftEatWin : UIBase
{
    [SerializeField] HeroShowBaseCell heroShow;
    [SerializeField] GiftBaseCell[] giftCells;
    [SerializeField] Button addHeroBtn;
    [SerializeField] GameObject addHeroGo;
    [SerializeField] HeroShowBaseCell addHeroShow;
    [SerializeField] GiftBaseCell[] addGiftCells;
    [SerializeField] GameObject addTip;
    [SerializeField] GameObject addAttrGo;
    [SerializeField] Text[] addAttrTexts;
    [SerializeField] Text addGiftTip;
    [SerializeField] GameObject eatBtn;
    string addHeroGuid;
    protected override void OnPreOpen()
    {
        var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuidForGiftFunc);
        Display(hero);
    }
    protected override void OnPreClose()
    {
        addHeroGuid = "";
    }
    public void Display(HeroInfo hero)
    {
        heroShow.Init(hero.heroId, hero.SkinID, hero.breakLevel, hero.heroStar, hero.awakeLevel, hero.heroLevel);
        HeroUIManager.Instance.RefreshGiftCell(giftCells, hero);
        if (string.IsNullOrEmpty(addHeroGuid))
        {
            addHeroBtn.SetActive(true);
            addHeroGo.SetActive(false);
            addTip.SetActive(true);
            addAttrGo.SetActive(false);
        }
        else
        {
            addHeroBtn.SetActive(false);
            addHeroGo.SetActive(true);
            addTip.SetActive(false);
            addAttrGo.SetActive(true);
            var addHero = HeroManager.Instance.GetHero(addHeroGuid);
            addHeroShow.Init(addHero.heroId, addHero.SkinID, addHero.breakLevel, addHero.heroStar, addHero.awakeLevel, addHero.heroLevel);
            HeroUIManager.Instance.RefreshGiftCell(addGiftCells, addHero);
            for (int i = 0; i < addAttrTexts.Length; i++)
            {
                int id = PlayerPropertyConfig.baseAttrs[i];
                addAttrTexts[i].text = PlayerPropertyConfig.GetFullDescription(id, hero.qualityConfig.StarAddPer);
            }
            addGiftTip.SetActive(hero.IsFullGift());
        }
    }
}
Main/System/HeroUI/HeroGiftEatWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 93b6b3386d485e34580130c8aff973bb
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/HeroUI/HeroGiftLineCell.cs
@@ -14,14 +14,7 @@
                var giftID = configList[index];
                var giftLV = HeroUIManager.Instance.maxGiftLevel;
                cardList[i].SetActive(true);
                cardList[i].Init(giftID, giftLV, () =>
                {
                    var giftConfig = HeroTalentConfig.Get(giftID);
                    SmallTipWin.showText = Language.Get("SmallTipFomat", giftConfig.Name + " " + Language.Get("L1113", giftLV),
                    Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue)));
                    SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
                    UIManager.Instance.OpenWindow<SmallTipWin>();
                });
                cardList[i].Init(giftID, giftLV);
            }
            else
            {
Main/System/HeroUI/HeroHeadBaseCell.cs
@@ -232,7 +232,7 @@
            
        }
        scale = width / rect.sizeDelta.x;
        cellContainer.transform.localScale = new Vector3(scale, scale, scale);
        cellContainer.transform.localScale = cellContainer.transform.localScale * scale;
    }
}
Main/System/HeroUI/HeroLVBreakSuccessWin.cs
@@ -21,7 +21,6 @@
    string guid;
    HeroInfo hero;
    protected override void InitComponent()
@@ -35,8 +34,7 @@
        guid = HeroUIManager.Instance.waitResponse.guid;
        if (string.IsNullOrEmpty(guid))
            return;
        hero = HeroManager.Instance.GetHero(guid);
        Refresh();
        Display(HeroManager.Instance.GetHero(guid));
    }
    protected override void OnPreClose()
@@ -44,7 +42,7 @@
    }
    public override void Refresh()
    public void Display(HeroInfo hero)
    {
        breakLVText.text = "+" + (hero.breakLevel - 1);
        nextBreakLVText.text = "+" + hero.breakLevel;
Main/System/HeroUI/HeroListWin.cs
@@ -169,7 +169,7 @@
    void RefreshPackCount()
    {
        int count = singlePack.GetAllItems().Count;
        heroPackText.text = UIHelper.AppendColor(count > singlePack.unlockedGridCount ? TextColType.Red : TextColType.NavyBrown,
        heroPackText.text = UIHelper.AppendColor(count >= singlePack.unlockedGridCount ? TextColType.Red : TextColType.NavyBrown,
                            string.Format("{0}/{1}", count, singlePack.unlockedGridCount));
    }
Main/System/HeroUI/HeroShowBaseCell.cs
@@ -2,11 +2,12 @@
using UnityEngine.UI;
using System.Collections.Generic;
//武将模型站台模块
public class HeroShowBaseCell : MonoBehaviour
{
    Image m_QualityBG;
    Image qualityBG
    Image qualityBG //底座台子
    {
        get
        {
@@ -38,7 +39,7 @@
        {
            if (m_StarRect == null)
            {
                m_StarRect = this.transform.Find("Container_HeroShow/stars");
                m_StarRect = this.transform.Find("Container_HeroShow/layout/stars");
            }
            return m_StarRect;
        }
@@ -54,7 +55,7 @@
                m_StarsImg = new List<Image>();
                for (int i = 0; i < 5; i++)
                {
                    var star = this.transform.GetComponent<Image>("Container_HeroShow/stars/star" + i);
                    var star = this.transform.GetComponent<Image>("Container_HeroShow/layout/stars/star" + i);
                    m_StarsImg.Add(star);
                }
            }
@@ -97,22 +98,31 @@
        {
            if (m_LvText == null)
            {
                m_LvText = this.transform.GetComponent<Text>("Container_HeroShow/lv");
                m_LvText = this.transform.GetComponent<Text>("Container_HeroShow/layout/lv");
            }
            return m_LvText;
        }
    }
    OutlineEx heroNameOutline;
    OutlineEx heroLVOutline;
    OutlineEx m_LvTextOutline;
    OutlineEx heroLVOutline
    {
        get
        {
            if (m_LvTextOutline == null)
            {
                m_LvTextOutline = this.transform.GetComponent<OutlineEx>("Container_HeroShow/layout/lv");
            }
            return m_LvTextOutline;
        }
    }
    void Awake()
    {
        LoadPrefab();
    }
    // 武将小头像,(职业和名称不再此管理,各个界面排版不同)
    public void Init(int heroID, int skinID = 0, int breakLevel = 0, int star = 0, int awakelv = 0, int lv = 0, bool isShowLock = false)
    // 武将模型站台显示
    public void Init(int heroID, int skinID, int breakLevel = 0, int star = 0, int awakelv = 0, int lv = 0, bool isShowLock = false)
    {
        var heroConfig = HeroConfig.Get(heroID);
        qualityBG.SetSprite("herodz" + heroConfig.Quality);
@@ -154,7 +164,6 @@
        nameText.text = breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, breakLevel);
        nameText.color = UIHelper.GetUIColorByFunc(heroConfig.Quality);
        heroNameOutline.colorType = (QualityTextColType)heroConfig.Quality;
        lvText.text = string.Format("{0}{1} {2}", Language.Get("L1094"), lv, awakelv == 0 ? Language.Get("herocard13") : Language.Get("herocard12", awakelv));
        heroLVOutline.colorType = awakelv == 0 ? QualityTextColType.None : QualityTextColType.red;
@@ -193,15 +202,13 @@
            //外部控制了尺寸获取为0
            GridLayoutGroup grid = GetComponentInParent<GridLayoutGroup>();
            if (grid != null)
            {
            {
                width = grid.cellSize.x;
            }
        }
        scale = width / rect.sizeDelta.x;
        cellContainer.transform.localScale = new Vector3(scale, scale, scale);
        heroNameOutline = nameText.GetComponent<OutlineEx>();
        heroLVOutline = lvText.GetComponent<OutlineEx>();
        cellContainer.transform.localScale = cellContainer.transform.localScale * scale;
    }
}
Main/System/HeroUI/HeroTrainWin.cs
@@ -135,6 +135,7 @@
        });
        starUPBtn.AddListener(StarUP);
        washBtn.AddListener(Wash);
    }
@@ -584,9 +585,9 @@
    void RefreshGift()
    {
        RefreshGiftCell();
        HeroUIManager.Instance.RefreshGiftCell(giftBaseCells, hero);
        if (hero.GetTotalStarCount() >= hero.GetMaxStarCount())
        if (hero.heroStar >= HeroUIManager.Instance.GetMaxStarCount(hero.heroId,  hero.Quality))
        {
            starUPBtn.interactable = false;
            starUPBtn.SetColorful(null, false);
@@ -604,63 +605,22 @@
            starUPBtn.SetColorful(null, true);
            starUPBtnText.text = Language.Get("HeroGift3");
        }
    }
    void RefreshGiftCell()
    {
        //传说以下只有4个
        int showCount = hero.Quality < 4 ? HeroUIManager.normalGiftMaxCnt : HeroUIManager.giftMaxCnt;
        for (int i = 0; i < giftBaseCells.Length; i++)
        if (hero.heroStar < HeroUIManager.Instance.canWashStarLevel)
        {
            if (i >= showCount)
            {
                giftBaseCells[i].SetActive(false);
                continue;
            }
            giftBaseCells[i].SetActive(true);
            if (i < hero.talentIDList.Count)
            {
                int giftID = hero.talentIDList[i];
                int giftLV = hero.talentLvList[i];
                giftBaseCells[i].Init(giftID, giftLV, () =>
                {
                    var giftConfig = HeroTalentConfig.Get(giftID);
                    SmallTipWin.showText = Language.Get("SmallTipFomat", giftConfig.Name + " " + Language.Get("L1113", giftLV),
                    Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue)));
                    SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
                    UIManager.Instance.OpenWindow<SmallTipWin>();
                });
            }
            else
            {
                if (i < HeroUIManager.normalGiftMaxCnt)
                {
                    giftBaseCells[i].Init(0, 0, () =>
                    {
                        SmallTipWin.showText = Language.Get("HeroGift1");
                        SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
                        UIManager.Instance.OpenWindow<SmallTipWin>();
                    });
                }
                else
                {
                    int index = i;
                    giftBaseCells[i].Init(-1, 0, () =>
                    {
                        SmallTipWin.showText = Language.Get("HeroGift2", HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(hero.heroId, index));
                        SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
                        UIManager.Instance.OpenWindow<SmallTipWin>();
                    });
                }
            }
            washBtn.SetColorful(washBtn.GetComponentInChildren<Text>(), false);
        }
        else
        {
            washBtn.SetColorful(washBtn.GetComponentInChildren<Text>(), true);
        }
    }
    void StarUP()
    {
        if (hero.GetTotalStarCount() >= hero.GetMaxStarCount())
    {
        if (hero.heroStar >= HeroUIManager.Instance.GetMaxStarCount(hero.heroId,  hero.Quality))
        {
            return;
        }
@@ -674,7 +634,27 @@
        {
            starUPBtn.interactable = true;
            starUPBtn.SetColorful(null, true);
            starUPBtnText.text = Language.Get("HeroGift3");
            HeroUIManager.Instance.selectHeroGuidForGiftFunc = hero.itemHero.guid;
            UIManager.Instance.OpenWindow<HeroGiftEatWin>();
        }
    }
    void Wash()
    {
        if (hero.heroStar < HeroUIManager.Instance.canWashStarLevel)
        {
            SysNotifyMgr.Instance.ShowTip("HeroGift2", HeroUIManager.Instance.canWashStarLevel);
            return;
        }
        // //根据锁状态判断材料是否足够
        // if (!ItemLogicUtility.CheckItemCount(PackType.Item, HeroUIManager.Instance.washItemID,
        // HeroUIManager.Instance.GetTalentLockUseWashCount(hero), 2))
        // {
        //     return;
        // }
        // UIManager.Instance.OpenWindow<HeroGiftWashWin>();
    }
}
Main/System/HeroUI/HeroUIManager.Gift.cs
File was deleted
Main/System/HeroUI/HeroUIManager.Talent.cs
New file
@@ -0,0 +1,110 @@
using System;
using System.Collections;
using System.Collections.Generic;
using LitJson;
using UnityEngine;
//天赋
public partial class HeroUIManager : GameSystemManager<HeroUIManager>
{
    public int normalGiftMaxCnt = 4;  //初始天赋格子数
    public const int giftMaxCnt = 8;    //关联界面排版问题,暂时写死,通过觉醒可以增加上限
    public int maxGiftLevel;    //单天赋最高等级,其他功能可能会增加这个上限
    public int starLevelCanAwake;   //x星可以觉醒
    public int washItemID;
    public int[] washByLockUseCounts;
    public int canWashStarLevel;   //达到X星可以洗练
    public string selectHeroGuidForGiftFunc;
    void ParseGiftConfig()
    {
        var config = FuncConfigConfig.Get("HeroStarTalent");
        normalGiftMaxCnt = int.Parse(config.Numerical1);
        maxGiftLevel = int.Parse(config.Numerical2);
        starLevelCanAwake = int.Parse(config.Numerical4);
        config = FuncConfigConfig.Get("HeroWash");
        washItemID = int.Parse(config.Numerical1);
        washByLockUseCounts = JsonMapper.ToObject<int[]>(config.Numerical2);
        canWashStarLevel = int.Parse(config.Numerical3);
    }
    //根据天赋锁状态获取消耗的材料数量
    public int GetTalentLockUseWashCount(HeroInfo hero)
    {
        return washByLockUseCounts[hero.GetTalentLockCount()];
    }
    //天赋格子总数上限
    public int GetGiftGirdMaxCount(int heroID)
    {
        //没有觉醒配置的 为默认4,否则8
        if (HeroAwakeConfig.GetHeroAwakeConfig(heroID, 1) == null)
        {
            return Instance.normalGiftMaxCnt;
        }
        return giftMaxCnt;
    }
    //星上限由品质 和 觉醒决定
    public int GetMaxStarCount(int heroID, int quality)
    {
        if (HeroAwakeConfig.GetHeroAwakeConfig(heroID, 1) == null)
        {
            return HeroQualityConfig.Get(quality).InitStarUpper;
        }
        //根据觉醒累计提升星上限
        int addStarCount = 0;
        for (int i = 1; i <= HeroAwakeConfig.GetMaxAwakeLV(heroID); i++)
        {
            addStarCount += HeroAwakeConfig.GetHeroAwakeConfig(heroID, i).AddStarUpper;
        }
        return HeroQualityConfig.Get(quality).InitStarUpper + addStarCount;
    }
    public void RefreshGiftCell(GiftBaseCell[] giftBaseCells, HeroInfo hero)
    {
        int showCount = GetGiftGirdMaxCount(hero.heroId);
        for (int i = 0; i < giftBaseCells.Length; i++)
        {
            if (i >= showCount)
            {
                giftBaseCells[i].SetActive(false);
                continue;
            }
            giftBaseCells[i].SetActive(true);
            if (i < hero.talentIDList.Count)
            {
                int giftID = hero.talentIDList[i];
                int giftLV = hero.talentLvList[i];
                giftBaseCells[i].Init(giftID, giftLV);
            }
            else
            {
                if (i < normalGiftMaxCnt)
                {
                    giftBaseCells[i].Init(0, 0);
                }
                else
                {
                    int index = i;
                    giftBaseCells[i].Init(-1, 0, null, hero.heroId, index);
                }
            }
        }
    }
}
Main/System/HeroUI/HeroUIManager.Talent.cs.meta
Main/System/ItemTip/OwnItemCell.cs
@@ -46,7 +46,7 @@
    {
        if (itemID == 0)
        {
            Debug.LogError("itemID == 0");
            // Debug.LogError("itemID == 0");
            return;
        }
        numText.text = UIHelper.ReplaceLargeNum(PackManager.Instance.GetItemCountByID(PackType.Item, itemID));
Main/System/ItemTip/OwnMoneyCell.cs
@@ -61,7 +61,7 @@
    {
        if (moneyType == 0)
        {
            Debug.LogError("moneyType == 0");
            // Debug.LogError("moneyType == 0");
            return;
        }
        numText.text = UIHelper.ReplaceLargeNum(UIHelper.GetMoneyCnt(moneyType));
Main/System/Main/AutoFightModel.cs
@@ -36,7 +36,21 @@
    }
    //自动模式, 真正点击战锤消耗开启,和休息(或无材料)停止
    public bool isAutoAttack = false;
    bool m_IsAutoAttack = false;
    public bool isAutoAttack
    {
        get
        {
            return m_IsAutoAttack;
        }
        set
        {
            if (m_IsAutoAttack == value)
                return;
            m_IsAutoAttack = value;
            Debug.Log("isAutoAttack:" + m_IsAutoAttack);
        }
    }
    //是否开启自动战斗设置
    public bool isAutoAttackSet
@@ -77,6 +91,7 @@
        ParseConfig();
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerInit;
        BattleManager.Instance.onBattleFieldCreate += OnCreateBattleField;
        EventBroadcast.Instance.AddListener<string, SkillConfig, TeamHero>(EventName.BATTLE_CAST_SKILL, OnSkillCast);
    }
@@ -85,6 +100,7 @@
    {
        BattleManager.Instance.onBattleFieldCreate -= OnCreateBattleField;
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= BeforePlayerInit;
    }
@@ -117,6 +133,7 @@
        if (storyBattleField != null && storyBattleField.GetBattleMode() != BattleMode.Stop)
        {
            //战斗中改变模式
            isAutoAttack = isAutoAttackSet;
            storyBattleField.AutoSetBattleMode();
        }
@@ -173,10 +190,8 @@
            return;
        }
        if (isAutoAttackSet)
        {
            isAutoAttack = true;
        }
        isAutoAttack = isAutoAttackSet;
        //手动会一直进入这个逻辑, 自动触发一次
        storyBattleField.AutoSetBattleMode();
@@ -219,6 +234,10 @@
        if (!string.IsNullOrEmpty(guid))
            return;
        //防范回收报错
        if (teamHero == null)
            return;
        //只通知玩家武将的战斗
        if (teamHero.NPCID != 0)
            return;
Main/System/Main/AutoFightWin.cs
@@ -232,6 +232,7 @@
                if (isOK)
                {
                    AutoFightModel.Instance.isAutoAttackSet = false;
                    AutoFightModel.Instance.isAutoAttack = false;
                    AutoFightModel.Instance.fightCost = int.Parse(costText.text);
                    AutoFightModel.Instance.fightSpeed = int.Parse(speedText.text);
                    AutoFightModel.Instance.isStopFightByBetterEquip = betterEquipToggle.isOn;
Main/System/Main/MainWin.cs
@@ -22,6 +22,7 @@
    [SerializeField] Image restImg; //休息状态
    [SerializeField] GameObject fightGo; //战斗状态
    [SerializeField] Image fightHeroImg; //战斗显示英雄
    [SerializeField] ScaleTween fightHeroScale; //战斗显示英雄缩放
    [SerializeField] UIEffectPlayer fightEffect;
    [SerializeField] FillTween cdTween;
@@ -264,17 +265,20 @@
        {
            fightEffect.Play();
            cdTween.SetStartState();
            cdTween.Play(()=>
            {
            cdTween.Play(() =>
            {
                AutoFightModel.Instance.fightingHeroSkinID = TeamManager.Instance.GetTeam(TeamType.Story).GetNextServerHero(AutoFightModel.Instance.heroGuid).SkinID;
                fightHeroImg.SetOrgSprite(HeroSkinConfig.Get(AutoFightModel.Instance.fightingHeroSkinID).SquareIcon, "HeroHead");
            });
            fightHeroScale.SetStartState();
            fightHeroScale.Play();
        }
        else
        {
            fightEffect.Stop();
            cdTween.Stop();
            cdTween.SetEndState();
            fightHeroScale.Stop();
        }
        if (AutoFightModel.Instance.fightingHeroSkinID == 0)
Main/System/Setting/QuickSetting.cs
@@ -11,7 +11,7 @@
public class QuickSetting : Singleton<QuickSetting>
{
    public QuickSetting()
    {
    {
        //自动战斗 几倍消耗 几倍速度 是否高战力停止 是否开启自动战斗
        quickSettingDic.Add(QuickSettingType.AutoFight_Cost, new QuickSettingRange(QuickSettingType.AutoFight_Cost, 0, 1));
        quickSettingDic.Add(QuickSettingType.AutoFight_Speed, new QuickSettingRange(QuickSettingType.AutoFight_Speed, 1, 1));
@@ -19,6 +19,7 @@
        quickSettingDic.Add(QuickSettingType.AutoFight_Open, new QuickSettingRange(QuickSettingType.AutoFight_Open, 3, 1));
        setting = new string(UCharacter, 100);
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInitializeEvent;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk;
    }
    public Dictionary<QuickSettingType, QuickSettingRange> quickSettingDic = new Dictionary<QuickSettingType, QuickSettingRange>();
@@ -139,6 +140,16 @@
        PlayerDatas.Instance.baseData.Setting = setting;
    }
    private void OnPlayerLoginOk()
    {
        //初始设置
        if (PlayerDatas.Instance.baseData.LV == 1 && !AutoFightModel.Instance.isStopFightByBetterEquip)
        {
            AutoFightModel.Instance.isStopFightByBetterEquip = true;
            AutoFightModel.Instance.SaveAutoFightSetting();
        }
    }
}
public enum QuickSettingType
Main/System/SkillUI/SkillBaseCell.cs
@@ -121,7 +121,7 @@
            
        }
        scale = width / rect.sizeDelta.x;
        cellContainer.transform.localScale = new Vector3(scale, scale, scale);
        cellContainer.transform.localScale = cellContainer.transform.localScale * scale;
    }
}
Main/System/SkillUI/SkillWordCell.cs
@@ -114,7 +114,7 @@
            
        }
        scale = width / rect.sizeDelta.x;
        cellContainer.transform.localScale = new Vector3(scale, scale, scale);
        cellContainer.transform.localScale = cellContainer.transform.localScale * scale;
    }
}
Main/Utility/ComponentExtersion.cs
@@ -245,14 +245,20 @@
                    _btnTxt.color = UIHelper.GetUIColor(_colorful ? TextColType.Green : TextColType.White);
                    break;
                default:
                    _btnTxt.color = UIHelper.GetUIColor(_colorful ? TextColType.NavyBrown : TextColType.White);
                    //false 灰色,true 原色
                    if (!_colorful)
                        _btnTxt.text = UIHelper.AppendColor(TextColType.NavyGray, _btnTxt.text);    //不改变组件颜色,只改变显示颜色
                    else
                        _btnTxt.text = UIHelper.AppendColor(_btnTxt.color, _btnTxt.text);
                    break;
            }
        }
    }
    public static void SetInteractable(this Button _btn, Text _btnText, bool _interactable)
    // 设置按钮是否可点击,且置灰,默认取第一个文本;图片需用ImageEx组件
    // 更多功能请使用SetColorful
    public static void SetInteractable(this Button _btn, bool _interactable, Text _btnText = null)
    {
        if (_btn != null)
        {
@@ -263,10 +269,15 @@
                imageEx.gray = !_interactable;
            }
        }
        if (_btnText == null)
            _btnText = _btn.GetComponentInChildren<Text>();
        if (_btnText != null)
        {
            _btnText.color = UIHelper.GetUIColor(_interactable ? TextColType.NavyBrown : TextColType.White);
            //_btnText.color = _btnText.color.SetA(_interactable ? 1 : 0.5f);
            //false 灰色,true 原色
            if (!_interactable)
                _btnText.text = UIHelper.AppendColor(TextColType.NavyGray, _btnText.text);    //不改变组件颜色,只改变显示颜色
            else
                _btnText.text = UIHelper.AppendColor(_btnText.color, _btnText.text);
        }
    }
Main/Utility/UIHelper.cs
@@ -761,6 +761,30 @@
        return msg;
    }
    public static string AppendColor(Color color, string msg)
    {
        return StringUtility.Contact("<color=#", ColorToHexWithHash(color), ">", msg, "</color>");
    }
    public static string ColorToHexWithHash(Color color, bool includeAlpha = false)
    {
        int r = Mathf.RoundToInt(color.r * 255);
        int g = Mathf.RoundToInt(color.g * 255);
        int b = Mathf.RoundToInt(color.b * 255);
        if (includeAlpha)
        {
            int a = Mathf.RoundToInt(color.a * 255);
            return string.Format("{0:X2}{1:X2}{2:X2}{3:X2}", r, g, b, a);
        }
        else
        {
            return string.Format("{0:X2}{1:X2}{2:X2}", r, g, b);
        }
    }
    //needName 指官职0是否需要名称
    public static string GetRealmName(int realmLv, bool bright = true, bool needName = false)
    {
@@ -825,7 +849,7 @@
    /// <param name="itemColor"></param>
    /// <param name="msg"></param>
    /// <param name="bright"></param>
    /// <param name="colorGroupType"></param>
    /// <param name="colorGroupType">0 通用功能品质分组精良到神话</param>
    /// <returns></returns>
    public static string AppendColor(int itemColor, string msg, bool bright = true, int colorGroupType = 0)
    {