hch
2026-07-10 fcbc8a284aab346c04ea5777e0c6c9649983ce43
Main/System/KnapSack/PackManager.cs
@@ -170,6 +170,27 @@
            playerPackDict.Add(packType, new SinglePack(packType));
        }
        // 先删除所有物品 不止登录的时候会发,其他情况补发
        var singlePack = playerPackDict[packType];
        List<string> guidList = new List<string>();
        if (singlePack != null)
        {
            foreach (var item in singlePack.GetAllItems().Values)
            {
                guidList.Add(item.guid);
            }
            singlePack.Clear();
            foreach (var guid in guidList)
            {
                if (itemGUIDDict.ContainsKey(guid))
                {
                    if (itemGUIDDict[guid].packType == packType)
                    {
                        itemGUIDDict.Remove(guid);
                    }
                }
            }
        }
        for (int i = 0; i < packInfo.ItemCount; i++)
        {
@@ -613,7 +634,15 @@
        return PackMaxCountDict[(int)type] - GetSinglePack(type).unlockedGridCount;
    }
    public int GetPackMaxCount(PackType type)
    {
        if (!PackMaxCountDict.ContainsKey((int)type))
        {
            return 0;
        }
        return PackMaxCountDict[(int)type];
    }
    private void UpdateSecond()
    {
        if (isItemChange)