262 幻境阁系统-客户端 性能优化,在不需要排序列表的时候就不排序
6个文件已修改
23 ■■■■ 已修改文件
Main/System/PhantasmPavilion/PhantasmPavilionChatBoxCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/PhantasmPavilionFaceCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/PhantasmPavilionFacePicCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/PhantasmPavilionManager.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/PhantasmPavilionModelCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/PhantasmPavilionTitleCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/PhantasmPavilionChatBoxCell.cs
@@ -9,7 +9,7 @@
    public void Display(int rowIndex)
    {
        List<int> showItemList = manager.ShowItemList(type);
        List<int> showItemList = manager.ShowItemList(type, isSort: true);
        if (showItemList.IsNullOrEmpty() || !manager.TryGetRowCountMax(type, out int rowCountMax))
            return;
        for (int i = 0; i < items.Count; i++)
Main/System/PhantasmPavilion/PhantasmPavilionFaceCell.cs
@@ -9,7 +9,7 @@
    public void Display(int rowIndex)
    {
        List<int> showItemList = manager.ShowItemList(type);
        List<int> showItemList = manager.ShowItemList(type, isSort: true);
        if (showItemList.IsNullOrEmpty() || !manager.TryGetRowCountMax(type, out int rowCountMax))
            return;
        for (int i = 0; i < items.Count; i++)
Main/System/PhantasmPavilion/PhantasmPavilionFacePicCell.cs
@@ -9,7 +9,7 @@
    public void Display(int rowIndex)
    {
        List<int> showItemList = manager.ShowItemList(type);
        List<int> showItemList = manager.ShowItemList(type, isSort: true);
        if (showItemList.IsNullOrEmpty() || !manager.TryGetRowCountMax(type, out int rowCountMax))
            return;
        for (int i = 0; i < items.Count; i++)
Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
@@ -80,14 +80,10 @@
        CheckTimeOut();
    }
    private void OnRefreshItemEvent(PackType type, int index, int itemID)
    {
        if (type != PackType.Item)
            return;
        //要与策划约定类型,避免频繁刷新
        if (ItemConfig.Get(itemID).Type != 146)
            return;
        UpdateRedPoint();
@@ -116,7 +112,7 @@
        if (!TryGetRowCountMax(type, out int rowCountMax) || type != nowType)
            return 0;
        int id = selectId;
        List<int> list = ShowItemList(type, tabType);
        List<int> list = ShowItemList(type, tabType, isSort: true);
        if (list.IsNullOrEmpty() || !list.Contains(id))
            return 0;
        int index = list.IndexOf(id);
@@ -346,9 +342,9 @@
        return result == id;
    }
    public List<int> ShowItemList(PhantasmPavilionType type, int tabType = 0)
    public List<int> ShowItemList(PhantasmPavilionType type, int tabType = 0, bool isSort = false)
    {
        var resList = new List<int>();
        List<int> resList = new List<int>();
        switch (type)
        {
            case PhantasmPavilionType.Model:
@@ -361,7 +357,10 @@
                resList = GetTableKeys(type);
                break;
        }
        if (isSort)
        {
        resList.Sort((int a, int b) => Cmp(a, b, type));
        }
        return resList;
    }
Main/System/PhantasmPavilion/PhantasmPavilionModelCell.cs
@@ -9,7 +9,7 @@
    public void Display(int rowIndex, CellView cellView)
    {
        int tabType = cellView.info.Value.infoInt1;
        List<int> showItemList = manager.ShowItemList(type, tabType);
        List<int> showItemList = manager.ShowItemList(type, tabType, isSort: true);
        if (showItemList.IsNullOrEmpty() || !manager.TryGetRowCountMax(type, out int rowCountMax))
            return;
        for (int i = 0; i < items.Count; i++)
Main/System/PhantasmPavilion/PhantasmPavilionTitleCell.cs
@@ -9,7 +9,7 @@
    public void Display(int rowIndex,CellView cellView)
    {
        int tabType = cellView.info.Value.infoInt1;
        List<int> showItemList = manager.ShowItemList(type, tabType);
        List<int> showItemList = manager.ShowItemList(type, tabType, isSort: true);
        if (showItemList.IsNullOrEmpty() || !manager.TryGetRowCountMax(type, out int rowCountMax))
            return;
        for (int i = 0; i < items.Count; i++)