| | |
| | | public static string StrengthAttrShift_RecordKey = ""; |
| | | public const string RecordKnapsackTitle = "RecordKnapsackTitle"; |
| | | |
| | | Dictionary<int, int> DrugToDungeonDict { get; set; } //key 丹药ID,value副本ID |
| | | Dictionary<int, int[]> DungeonToDrugDict { get; set; } //key 副本ID,value丹药ID列表 |
| | | //public List<AttrFruitConfig> makeDruglist { get; private set; } |
| | | Dictionary<int, Dictionary<int, int>> decomposeAttrDict = new Dictionary<int, Dictionary<int, int>>(); |
| | | |
| | | string RoleEquipLocalSave = ""; |
| | | List<int> LocalSavePlaceArray { get; set; } |
| | | Dictionary<int, List<int>> sharedUseCountItemDict { get; set; } |
| | |
| | | } |
| | | |
| | | public event Action<PackType> refrechPackEvent; //刷新整个背包数据 |
| | | public event Action<PackType, string> CreateItemEvent; //得到新物品,可能批量创建注意效率 |
| | | public event Action<PackType, string> DeleteItemEvent; //删除物品,可能批量删除注意效率 |
| | | public event Action<PackType, int, int> refreshItemCountEvent; // 慎用会卡(单个)最新物品数量刷新(旧的弃用)在得到新物品、物品数量的改变,清理该物品时均会触发 int 位置索引 int物品id |
| | | public event Action<PackType> gridRefreshEvent; //背包空格刷新 |
| | | public event Action<PackType, int, int> itemCntAddEvent; //物品数量增加 int 位置索引 int物品id |
| | |
| | | PackType type = (PackType)clearPack.PackIndex; |
| | | SinglePack singlePack = null; |
| | | playerPackDict.TryGetValue(type, out singlePack); |
| | | List<string> guidList = new List<string>(); |
| | | if (singlePack != null) |
| | | { |
| | | singlePack.Clear(); |
| | | foreach (var item in singlePack.GetAllItems().Values) |
| | | { |
| | | guidList.Add(item.guid); |
| | | } |
| | | singlePack.Clear(); |
| | | foreach (var guid in guidList) |
| | | { |
| | | DeleteItemDictByGUID(type, guid); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public void RemoveItem(H0709_tagClearItem clearItem) |
| | |
| | | { |
| | | itemGUIDDict[itemModel.guid] = itemModel; |
| | | GetItemEventCtrl(itemModel, showNewItem); |
| | | if (showNewItem) |
| | | { |
| | | CreateItemEvent?.Invoke(itemModel.packType, itemModel.guid); |
| | | } |
| | | } |
| | | |
| | | void DeleteItemDictByGUID(PackType type, string guid) |
| | |
| | | if (itemGUIDDict[guid].packType == type) |
| | | { |
| | | itemGUIDDict.Remove(guid); |
| | | DeleteItemEvent?.Invoke(type, guid); |
| | | } |
| | | } |
| | | } |