hch
2025-09-05 277e13e374f7b647388e9df8e5540cca9e3b1128
117 【武将】武将系统 - 吞噬功能
15个文件已修改
6个文件已添加
519 ■■■■■ 已修改文件
Main/System/Hero/HeroManager.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/GiftBaseCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftEatSuccessWin.cs 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftEatSuccessWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftEatWin.cs 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftRoleListCell.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftRoleListCell.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftRoleListWin.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroGiftRoleListWin.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroHeadBaseCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroListWin.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroShowBaseCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroTrainWin.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.Talent.cs 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/SinglePack.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/New/CommonItemBaisc.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/OfficialRank/OfficialTitleCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/AvatarCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SkillUI/SkillBaseCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/SkillUI/SkillWordCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroManager.cs
@@ -19,7 +19,7 @@
    public Action<HeroInfo> onHeroChangeEvent;
    public Action<HeroInfo> onHeroDeleteEvent;
    public Action<int> onHeroDeleteEvent;
    public override void Init()
    {
@@ -74,8 +74,7 @@
            heroInfoDict.Remove(guid);
            if (null != heroInfo)
                onHeroDeleteEvent?.Invoke(heroInfo);
            onHeroDeleteEvent?.Invoke(itemID);
        }
    }
Main/System/HeroUI/GiftBaseCell.cs
@@ -108,6 +108,7 @@
    //giftID 0 :代表灰色需升星激活 -1:代表棕色需觉醒激活,其他根据配表,没有天赋的外层控制显隐
    public void Init(int giftID, int lv, UnityAction onclick = null, int showState = 0, int heroID = 0, int index = 0)
    {
        LoadPrefab();   //存在被卸载的可能,重新加载
        if (HeroTalentConfig.HasKey(giftID))
        {
            var config = HeroTalentConfig.Get(giftID);
Main/System/HeroUI/HeroGiftEatSuccessWin.cs
New file
@@ -0,0 +1,77 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 武将吞噬成功界面
/// </summary>
public class HeroGiftEatSuccessWin : UIBase
{
    [SerializeField] Image[] beforeStars;
    [SerializeField] Image[] afterStars;
    [SerializeField] Text[] attrPerNameArr;
    [SerializeField] Text[] attrPerTextArr;
    [SerializeField] Text[] nextAttrPerTextArr;
    [SerializeField] GiftBaseCell[] giftBaseCellArr;
    [SerializeField] Button okBtn;
    //角色
    [SerializeField] Image taiziBG;
    [SerializeField] UIHeroController heroModel;
    [SerializeField] Text nameText;
    protected override void InitComponent()
    {
        okBtn.AddListener(CloseWindow);
    }
    protected override void OnPreOpen()
    {
        if (string.IsNullOrEmpty(HeroUIManager.Instance.selectHeroGuidForGiftFuncForSuccessWin))
            return;
        Display();
        HeroUIManager.Instance.selectEatHeroGuid = "";
    }
    public void Display()
    {
        HeroInfo hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuidForGiftFuncForSuccessWin);
        if (hero == null)
            return;
        int beforeStarCount = hero.heroStar - 1;
        int afterStarCount = hero.heroStar;
        HeroUIManager.Instance.ShowStarImg(beforeStarCount, beforeStars);
        HeroUIManager.Instance.ShowStarImg(afterStarCount, afterStars);
        //上阵属性
        int valuePer = hero.GetOnBattleAddPer();
        for (int i = 0; i < attrPerTextArr.Length; i++)
        {
            int id = PlayerPropertyConfig.basePerAttrs[i];
            attrPerNameArr[i].text = PlayerPropertyConfig.Get(id).Name;
            nextAttrPerTextArr[i].text = PlayerPropertyConfig.GetFullDescription(id, valuePer);
            attrPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(id, valuePer - hero.qualityConfig.StarAddPer);
        }
        //天赋
        HeroUIManager.Instance.RefreshGiftCell(giftBaseCellArr, hero, HeroUIManager.Instance.heroBeforeGiftIDList,
         HeroUIManager.Instance.heroBeforeGiftLevelList);
        var heroConfig = hero.heroConfig;
        taiziBG.SetSprite("herodz" + heroConfig.Quality);
        heroModel.Create(hero.SkinID, heroConfig.UIScale);
        nameText.text = hero.breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, hero.breakLevel);
        nameText.color = UIHelper.GetUIColorByFunc(heroConfig.Quality);
    }
}
Main/System/HeroUI/HeroGiftEatSuccessWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 11a2b53cd2efaff4d917ff992a43ca10
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/HeroUI/HeroGiftEatWin.cs
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
@@ -10,7 +11,7 @@
    [SerializeField] HeroShowBaseCell heroShow;
    [SerializeField] GiftBaseCell[] giftCells;
    [SerializeField] Button addHeroBtn;
    [SerializeField] GameObject addHeroGo;
    [SerializeField] Button addHeroGo;
    [SerializeField] HeroShowBaseCell addHeroShow;
    [SerializeField] GiftBaseCell[] addGiftCells;
    [SerializeField] GameObject addTip;
@@ -18,29 +19,46 @@
    [SerializeField] Text[] addAttrTexts;
    [SerializeField] Text addGiftTip;
    [SerializeField] GameObject eatBtn;
    [SerializeField] Button eatBtn;
    string addHeroGuid;
    protected override void InitComponent()
    {
        addHeroBtn.AddListener(() =>
        {
            UIManager.Instance.OpenWindow<HeroGiftRoleListWin>();
        });
        addHeroGo.AddListener(() =>
        {
            UIManager.Instance.OpenWindow<HeroGiftRoleListWin>();
        });
        eatBtn.AddListener(EatHero);
    }
    protected override void OnPreOpen()
    {
        var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuidForGiftFunc);
        Display(hero);
        HeroUIManager.Instance.SelectEatHeroEvent += Display;
        Display();
    }
    protected override void OnPreClose()
    {
        addHeroGuid = "";
        HeroUIManager.Instance.selectEatHeroGuid = "";
        HeroUIManager.Instance.SelectEatHeroEvent -= Display;
    }
    public void Display(HeroInfo hero)
    public void Display()
    {
        var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuidForGiftFunc);
        heroShow.Init(hero.heroId, hero.SkinID, hero.breakLevel, hero.heroStar, hero.awakeLevel, hero.heroLevel);
        HeroUIManager.Instance.RefreshGiftCell(giftCells, hero);
        if (string.IsNullOrEmpty(addHeroGuid))
        if (string.IsNullOrEmpty(HeroUIManager.Instance.selectEatHeroGuid))
        {
            addHeroBtn.SetActive(true);
            addHeroGo.SetActive(false);
@@ -53,16 +71,47 @@
            addHeroGo.SetActive(true);
            addTip.SetActive(false);
            addAttrGo.SetActive(true);
            var addHero = HeroManager.Instance.GetHero(addHeroGuid);
            var addHero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectEatHeroGuid);
            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);
                int id = PlayerPropertyConfig.basePerAttrs[i];
                addAttrTexts[i].text = PlayerPropertyConfig.GetFullDescription(id, hero.qualityConfig.StarAddPer,
                "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}", true));
            }
            addGiftTip.SetActive(hero.IsFullGift());
            addGiftTip.SetActive(!hero.IsFullGift());
        }
    }
    void EatHero()
    {
        if (HeroUIManager.Instance.selectEatHeroGuid == "")
        {
            SysNotifyMgr.Instance.ShowTip("HeroGift3");
            return;
        }
        var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuidForGiftFunc);
        var eatHero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectEatHeroGuid);
        if (hero == null || eatHero == null)
            return;
        var pack = new CB231_tagCSHeroStarUP();
        pack.ItemIndex = (ushort)hero.itemHero.gridIndex;
        pack.UseItemIndex = (ushort)eatHero.itemHero.gridIndex;
        GameNetSystem.Instance.SendInfo(pack);
        HeroUIManager.Instance.eatHeroIDForResult = hero.heroId;
        HeroUIManager.Instance.selectHeroGuidForGiftFuncForSuccessWin = HeroUIManager.Instance.selectHeroGuidForGiftFunc;
        HeroUIManager.Instance.heroBeforeGiftIDList = new List<int>(hero.talentIDList);
        HeroUIManager.Instance.heroBeforeGiftLevelList = new List<int>(hero.talentLvList);
        //设置个等待回复的标识 显示成功界面
        HeroUIManager.Instance.waitResponse = new WaitHeroFuncResponse()
        {
            guid = HeroUIManager.Instance.selectHeroGuidForGiftFuncForSuccessWin,
            type = HeroFuncType.Gift,
            time = Time.time
        };
    }
}
Main/System/HeroUI/HeroGiftRoleListCell.cs
New file
@@ -0,0 +1,85 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HeroGiftRoleListCell : CellView
{
    [SerializeField] Button addHeroBtn;
    [SerializeField] HeroShowBaseCell addHeroShow;
    [SerializeField] GiftBaseCell[] addGiftCells;
    [SerializeField] Image onTeamImg;
    public void Display(int index)
    {
        addHeroBtn.AddListener(()=> { AddHero(index); });
        var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroEatList[index]);
        addHeroShow.Init(hero.heroId, hero.SkinID, hero.breakLevel, hero.heroStar, hero.awakeLevel, hero.heroLevel, hero.isLock);
        HeroUIManager.Instance.RefreshGiftCell(addGiftCells, hero);
        onTeamImg.SetActive(hero.IsInAnyTeam());
    }
    void AddHero(int index)
    {
        var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroEatList[index]);
        //上阵 锁定 觉醒 的情况
        if (hero.awakeLevel > 0)
        {
            SysNotifyMgr.Instance.ShowTip("HeroReborn1");
            return;
        }
        if (hero.IsInAnyTeamJustOne())
        {
            //阵容至少要有一个武将上阵
            SysNotifyMgr.Instance.ShowTip("HeroFunc3");
            return;
        }
        if (hero.isLock)
        {
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
            Language.Get("herocard66"), (bool isOK) =>
                {
                    if (isOK)
                    {
                        hero.ChangeLockState();
                    }
                });
            return;
        }
        if (hero.IsInAnyTeam())
        {
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
            Language.Get("herocard65"), (bool isOK) =>
                {
                    if (isOK)
                    {
                        hero.LeaveAllTeam();
                    }
                });
            return;
        }
        if (hero.heroStar > 0)
        {
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
            Language.Get("HeroGift13"), (bool isOK) =>
                {
                    if (isOK)
                    {
                        HeroUIManager.Instance.selectEatHeroGuid = HeroUIManager.Instance.heroEatList[index];
                        UIManager.Instance.CloseWindow<HeroGiftRoleListWin>();
                    }
                });
            return;
        }
        HeroUIManager.Instance.selectEatHeroGuid = HeroUIManager.Instance.heroEatList[index];
        UIManager.Instance.CloseWindow<HeroGiftRoleListWin>();
    }
}
Main/System/HeroUI/HeroGiftRoleListCell.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cce54ec2509e8434d997bdc18df0a86d
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/HeroUI/HeroGiftRoleListWin.cs
New file
@@ -0,0 +1,70 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 武将吞噬列表界面
/// </summary>
public class HeroGiftRoleListWin : UIBase
{
    [SerializeField] ScrollerController scroller;
    [SerializeField] GameObject emptyGo;
    protected override void OnPreOpen()
    {
        HeroUIManager.Instance.CacheHeroEatList();
        scroller.OnRefreshCell += Scroller_OnRefreshCell;
        TeamManager.Instance.OnTeamChange += OnTeamChange;
        PackManager.Instance.RefreshItemLockEvent += RefreshItemLockEvent;
        Display();
    }
    protected override void OnPreClose()
    {
        scroller.OnRefreshCell -= Scroller_OnRefreshCell;
        TeamManager.Instance.OnTeamChange -= OnTeamChange;
        PackManager.Instance.RefreshItemLockEvent -= RefreshItemLockEvent;
        HeroUIManager.Instance.heroEatList.Clear();
    }
    public void Display()
    {
        if (HeroUIManager.Instance.heroEatList.Count <= 0)
        {
            emptyGo.SetActive(true);
            scroller.SetActive(false);
            return;
        }
        emptyGo.SetActive(false);
        scroller.SetActive(true);
        scroller.Refresh();
        for (int i = 0; i < HeroUIManager.Instance.heroEatList.Count; i++)
        {
            scroller.AddCell(ScrollerDataType.Header, i);
        }
        scroller.Restart();
    }
    void Scroller_OnRefreshCell(ScrollerDataType type, CellView cellView)
    {
        HeroGiftRoleListCell heroGiftRoleListCell = cellView as HeroGiftRoleListCell;
        heroGiftRoleListCell.Display(cellView.index);
    }
    void OnTeamChange(TeamType type)
    {
        scroller.m_Scorller.RefreshActiveCellViews();
    }
    void RefreshItemLockEvent(PackType type, string guid, bool lockState)
    {
        scroller.m_Scorller.RefreshActiveCellViews();
    }
}
Main/System/HeroUI/HeroGiftRoleListWin.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dba53fa735a5856468c405d877c0f20f
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/HeroUI/HeroHeadBaseCell.cs
@@ -139,6 +139,7 @@
    // 武将小头像,(职业和名称不再此管理,各个界面排版不同)
    public void Init(int heroID, int skinID, int star = 0, int awakelv = 0, int lv = 0, UnityAction onclick = null)
    {
        LoadPrefab();   //存在被卸载的可能,重新加载
        clickBtn.AddListener(onclick);
        var heroConfig = HeroConfig.Get(heroID);
        qualityBG.SetSprite("heroheadBG" + heroConfig.Quality);
Main/System/HeroUI/HeroListWin.cs
@@ -49,6 +49,7 @@
        PackManager.Instance.gridRefreshEvent += GridRefreshEvent;
        PackManager.Instance.RefreshItemEvent += RefreshItemEvent;
        UIManager.Instance.OnCloseWindow += OnCloseWindow;
        HeroManager.Instance.onHeroDeleteEvent += HeroDeleteEvent;
        HeroUIManager.Instance.SortHeroList();
        CreateScroller();
        Refresh();
@@ -60,6 +61,7 @@
        PackManager.Instance.RefreshItemEvent -= RefreshItemEvent;
        PackManager.Instance.gridRefreshEvent -= GridRefreshEvent;
        UIManager.Instance.OnCloseWindow -= OnCloseWindow;
        HeroManager.Instance.onHeroDeleteEvent -= HeroDeleteEvent;
    }
@@ -88,6 +90,15 @@
    }
    void HeroDeleteEvent(int heroID)
    {
        HeroUIManager.Instance.SortHeroList();
        heroListScroller.m_Scorller.RefreshActiveCellViews();
    }
    void RefreshEmptyTip()
    {
        if (HeroUIManager.Instance.heroSortList.Count <= 0)
Main/System/HeroUI/HeroShowBaseCell.cs
@@ -124,6 +124,7 @@
    // 武将模型站台显示
    public void Init(int heroID, int skinID, int breakLevel = 0, int star = 0, int awakelv = 0, int lv = 0, bool isShowLock = false)
    {
        LoadPrefab();   //存在被卸载的可能,重新加载
        var heroConfig = HeroConfig.Get(heroID);
        qualityBG.SetSprite("herodz" + heroConfig.Quality);
        // int skinID = 0;
Main/System/HeroUI/HeroTrainWin.cs
@@ -32,7 +32,7 @@
    [SerializeField] Button awakeBtn;
    [SerializeField] Button closeBtn;   //关闭按钮
    [SerializeField] Button starBtn;   //显示星级文字
    [SerializeField] List<Image> starImgList;
    [SerializeField] Text nameText;
    [SerializeField] UIEffectPlayer nameEffect;
@@ -136,6 +136,13 @@
        starUPBtn.AddListener(StarUP);
        washBtn.AddListener(Wash);
        starBtn.AddListener(() =>
        {
            SmallTipWin.showText = Language.Get("HeroGift14",hero.heroStar);
            SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
            UIManager.Instance.OpenWindow<SmallTipWin>();
        });
    }
@@ -589,31 +596,22 @@
        if (hero.heroStar >= HeroUIManager.Instance.GetMaxStarCount(hero.heroId,  hero.Quality))
        {
            starUPBtn.interactable = false;
            starUPBtn.SetColorful(null, false);
            starUPBtn.SetInteractable(false);
            starUPBtnText.text = Language.Get("HeroGift7");
        }
        else if (hero.IsFullStar())
        {
            starUPBtn.interactable = true;
            starUPBtn.SetColorful(null, false);
            starUPBtn.SetInteractable(true);
            starUPBtn.SetColorful(starUPBtn.GetComponentInChildren<Text>(), true);
            starUPBtnText.text = Language.Get("HeroGift3");
        }
        else
        {
            starUPBtn.interactable = true;
            starUPBtn.SetColorful(null, true);
            starUPBtn.SetInteractable(true);
            starUPBtn.SetColorful(starUPBtn.GetComponentInChildren<Text>(), true);
            starUPBtnText.text = Language.Get("HeroGift3");
        }
        if (hero.heroStar < HeroUIManager.Instance.canWashStarLevel)
        {
            washBtn.SetColorful(washBtn.GetComponentInChildren<Text>(), false);
        }
        else
        {
            washBtn.SetColorful(washBtn.GetComponentInChildren<Text>(), true);
        }
    }
    
Main/System/HeroUI/HeroUIManager.Talent.cs
@@ -4,6 +4,7 @@
using LitJson;
using UnityEngine;
using UnityEngine.UI;
//天赋
public partial class HeroUIManager : GameSystemManager<HeroUIManager>
@@ -17,7 +18,30 @@
    public int[] washByLockUseCounts;
    public int canWashStarLevel;   //达到X星可以洗练
    public string selectHeroGuidForGiftFunc;
    public string selectHeroGuidForGiftFunc;//武将主体GUID
    public int eatHeroIDForResult; //等待吞噬结果武将ID 为了弹成功界面使用
    public string selectHeroGuidForGiftFuncForSuccessWin;   //等待服务器返回的武将GUID 显示成功界面内容
    public List<int> heroBeforeGiftIDList = new List<int>();    //会有重复的ID,不要用字典
    public List<int> heroBeforeGiftLevelList = new List<int>();
    public event Action SelectEatHeroEvent;
    string m_SelectEatHeroGuid; //被吞噬武将GUID
    public string selectEatHeroGuid
    {
        get { return m_SelectEatHeroGuid; }
        set
        {
            m_SelectEatHeroGuid = value;
            SelectEatHeroEvent?.Invoke();
        }
    }
    public List<string> heroEatList = new List<string>();
    void ParseGiftConfig()
    {
@@ -70,9 +94,11 @@
        }
        return HeroQualityConfig.Get(quality).InitStarUpper + addStarCount;
    }
    public void RefreshGiftCell(GiftBaseCell[] giftBaseCells, HeroInfo hero)
    //beforeGiftIDList用于对比变化的天赋格子
    public void RefreshGiftCell(GiftBaseCell[] giftBaseCells, HeroInfo hero, List<int> beforeGiftIDList= null, List<int> beforeGiftLevelList= null)
    {
        int showCount = GetGiftGirdMaxCount(hero.heroId);
        for (int i = 0; i < giftBaseCells.Length; i++)
@@ -88,10 +114,42 @@
            {
                int giftID = hero.talentIDList[i];
                int giftLV = hero.talentLvList[i];
                giftBaseCells[i].Init(giftID, giftLV);
                int state = 0; //0:不显示 1:新增 2:提升
                if (!beforeGiftIDList.IsNullOrEmpty())
                {
                    if (i >= beforeGiftIDList.Count)
                    {
                        state = 1;
                    }
                    else
                    {
                        if (giftID != beforeGiftIDList[i])
                        {
                            state = 1;
                        }
                        else
                        {
                            if (giftLV > beforeGiftLevelList[i])
                            {
                                state = 2;
                            }
                        }
                    }
                }
                giftBaseCells[i].Init(giftID, giftLV, null, state);
            }
            else
            {
                if (!beforeGiftIDList.IsNullOrEmpty())
                {
                    //对比情况下不显示
                    giftBaseCells[i].SetActive(false);
                    continue;
                }
                //非对比的显示
                if (i < normalGiftMaxCnt)
                {
                    giftBaseCells[i].Init(0, 0);
@@ -106,5 +164,46 @@
        }
    }
    public void CacheHeroEatList()
    {
        heroEatList = PackManager.Instance.GetSinglePack(PackType.Hero).GetItemGUIDListById(
            HeroManager.Instance.GetHero(selectHeroGuidForGiftFunc).heroId);
        heroEatList.Remove(selectHeroGuidForGiftFunc);  //排除吞噬主体
        heroEatList.Sort(CmpDeleteHero);
    }
    public void ShowStarImg(int starCount, Image[] starImages, bool noStarShow = true)
    {
        int imgCount = starImages.Length;
        for (int i = 0; i < imgCount; i++)
        {
            if (starCount == 0 && i == 0)
            {
                if (noStarShow)
                {
                    // 无星级 特殊处理 显示一个空星星
                    starImages[i].SetActive(true);
                    starImages[i].SetSprite("herostar" + starCount);
                }
                else
                {
                    starImages[i].SetActive(false);
                }
            }
            else if ((starCount - 1) % imgCount >= i)
            {
                starImages[i].SetActive(true);
                starImages[i].SetSprite("herostar" + (((starCount - 1) / imgCount) + 1) * imgCount);
            }
            else
            {
                starImages[i].SetActive(false);
            }
        }
    }
}
Main/System/HeroUI/HeroUIManager.cs
@@ -79,7 +79,10 @@
        {
            UIManager.Instance.OpenWindow<HeroLVBreakSuccessWin>();
        }
        else if (waitResponse.type == HeroFuncType.Gift)
        {
            UIManager.Instance.OpenWindow<HeroGiftEatSuccessWin>();
        }
        waitResponse = default;
    }
@@ -312,5 +315,6 @@
{
    None = 0,   //无功能
    Break = 1,  //突破
    Gift  = 2,  //天赋吞噬
    
}
Main/System/KnapSack/Logic/SinglePack.cs
@@ -182,6 +182,22 @@
        return list;
    }
    public List<string> GetItemGUIDListById(int itemId)
    {
        var list = new List<string>();
        if (itemIDs.ContainsKey(itemId))
        {
            foreach (var index in itemIDs[itemId])
            {
                var item = items[index];
                list.Add(item.guid);
            }
        }
        return list;
    }
    public long GetCountById(int itemId, bool includeAuction = true)
    {
        long count = 0;
Main/System/KnapSack/New/CommonItemBaisc.cs
@@ -213,6 +213,7 @@
        var config = ItemConfig.Get(itemId);
        if (config == null) return;
        LoadPrefab();   //存在被卸载的可能,重新加载
        itemIcon.SetActive(true);
        bgIcon.SetActive(true);
        itemIcon.SetOrgSprite(config.IconKey);
Main/System/OfficialRank/OfficialTitleCell.cs
@@ -93,6 +93,7 @@
    public void InitUI(int offcialRank, int titleID)
    {
        LoadPrefab();   //存在被卸载的可能,重新加载
        if (titleID == 0)
        {
            officialRankObj.SetActive(true);
Main/System/PhantasmPavilion/AvatarCell.cs
@@ -147,6 +147,7 @@
    {
        if (model == null)
            return;
        LoadPrefab();   //存在被卸载的可能,重新加载
        string img = AvatarHelper.GetAvatarBgColorStr(model.avatarID);
        bgImage.SetSprite(img);
        InitUI(model.avatarID, model.avatarUIEffectID, model.avatarFrameID, model.avatarFrameUIEffectID);
Main/System/SkillUI/SkillBaseCell.cs
@@ -52,6 +52,7 @@
    public void Init(int skillID, UnityAction onclick = null, bool showType = false)
    {
        LoadPrefab();   //存在被卸载的可能,重新加载
        var config = SkillConfig.Get(skillID);
        if (config == null)
        {
Main/System/SkillUI/SkillWordCell.cs
@@ -52,6 +52,7 @@
    public void Init(int skillID, UnityAction onclick = null, bool showType = false)
    {
        LoadPrefab();   //存在被卸载的可能,重新加载
        var config = SkillConfig.Get(skillID);
        if (config == null)
        {