hch
2025-11-26 b6012660fb854274539a032294bb9dbb0b75053c
Main/System/HeroUI/HeroDeleteWin.cs
@@ -41,6 +41,10 @@
        HeroUIManager.Instance.SortHeroDeleteList();
        heroSelectBehaviour.Display(0, HeroUIManager.Instance.selectHeroDeleteListJob, HeroUIManager.Instance.selectHeroDeleteListCountry, SelectJobCountry);
        RefreshEmptyTip();
        //外部选中
        HeroUIManager.Instance.SelectDeleteHero(HeroManager.Instance.GetHero(HeroUIManager.Instance.jumpDeleteHeroGuid));
        CreateScroller();
    }
@@ -51,6 +55,7 @@
        PackManager.Instance.RefreshItemLockEvent -= RefreshItemLockEvent;
        ItemLogicUtility.Instance.OnGetItemShowEvent -= OnGetItemShowEvent;
        HeroUIManager.Instance.selectDeleteHeroList.Clear();
        HeroUIManager.Instance.jumpDeleteHeroGuid = "";
    }
    void CreateScroller()
@@ -64,6 +69,7 @@
            }
        }
        scroller.Restart();
        scroller.JumpIndex(FindJumpIndexByHero(HeroUIManager.Instance.jumpDeleteHeroGuid));
    }
    void OnRefreshCell(ScrollerDataType type, CellView cell)
@@ -236,8 +242,21 @@
    }
    void OnGetItemShowEvent()
    {
    {
        HeroUIManager.Instance.SortHeroDeleteList();
        CreateScroller();
    }
    int FindJumpIndexByHero(string guid)
    {
        var hero = HeroManager.Instance.GetHero(guid);
        if (hero == null)
            return -1;
        if (hero.Quality > HeroUIManager.Instance.jumpDeleteHeroQuality && !HeroUIManager.Instance.isJumpDeleteHero)
        {
            return -1;
        }
        return HeroUIManager.Instance.heroDeleteSortList.IndexOf(guid) / 5 - 1;
    }
}