少年修仙传客户端代码仓库
10268 【越南】【砍树】【英语】新增自选界面 限制箱子单次使用上限60000
1个文件已修改
9 ■■■■■ 已修改文件
System/KnapSack/New/ChooseItemsModel.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/New/ChooseItemsModel.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using vnxbqy.UI;
public class ChooseItems
{
@@ -14,7 +15,7 @@
    public int boxChooseCount = 0;    // 每个宝箱可以在列表中选择x个
    public int totalItemCount = 0;   // 总共能选x个材料
    public int chooseKeyBoardItemId = 0;    //当前键盘输入哪个ItemId的数量
    public readonly int MaxBoxCount = 60000;     //箱子单次使用上限,堆叠上限目前单次使用60000
    //<物品ID,数量>  用户选中物品字典
    public Dictionary<int, ChooseItems> userChooseItemDict = new Dictionary<int, ChooseItems>();
    public Dictionary<int, int> showDict = new Dictionary<int, int>();
@@ -187,7 +188,9 @@
    {
        if (!TryInitData()) 
            return;
        this.openBoxCount = openBoxCount;
        this.openBoxCount = Mathf.Min(packModel.GetItemCountByID(PackType.Item, boxModel.itemId), MaxBoxCount);
        if (this.openBoxCount < 1)
            return;
        this.boxChooseCount = boxChooseCount;
        totalItemCount = openBoxCount * boxChooseCount;
        WindowCenter.Instance.Open<ChooseItemsWin>();
@@ -199,7 +202,7 @@
    {
        if (!TryInitData())
            return;
        this.openBoxCount = packModel.GetItemCountByID(PackType.Item, boxModel.itemId);
        this.openBoxCount = Mathf.Min(packModel.GetItemCountByID(PackType.Item, boxModel.itemId), MaxBoxCount);
        if (this.openBoxCount < 1)
            return;
        this.boxChooseCount = 1;