| | |
| | | |
| | | //读表数据 |
| | | public Dictionary<int, int> PackMaxCountDict = new Dictionary<int, int>(); //背包类型:背包格子最大数量 |
| | | public Dictionary<int, int> PackInitCountDict = new Dictionary<int, int>(); //背包类型:初始数量 |
| | | public int initBagGridCount { get; private set; } //初始物品背包格子数 |
| | | public int[] itemPackSortTyps { get; private set; } //背包物品的按类型排序 |
| | | public List<string> composeItemGuidList = new List<string>(); //合成列表物品guid |
| | |
| | | } |
| | | } |
| | | |
| | | //购买所需信息 [货币类型,货币数量,购买格数] |
| | | public int[] BuyPackGirdNeedData(PackType packType) |
| | | { |
| | | return null; |
| | | var curPackGirdCnt = GetSinglePack(packType).unlockedGridCount; |
| | | if (curPackGirdCnt >= PackMaxCountDict[(int)packType]) |
| | | return null; |
| | | |
| | | int buyTimes = 0; |
| | | PackGirdServerBuyCountDict.TryGetValue((int)packType, out buyTimes); |
| | | var moneyType = openGirdMoneyDict[(int)packType]; |
| | | var moneyCntList = openGirdMoneyValueDict[(int)packType]; |
| | | var money = moneyCntList[Math.Min(buyTimes, moneyCntList.Length - 1)]; |
| | | var girdCntList = openGirdCountDict[(int)packType]; |
| | | var buyGirdCnt = girdCntList[Math.Min(buyTimes, girdCntList.Length - 1)]; |
| | | return new[] {moneyType, money, buyGirdCnt}; |
| | | } |
| | | |
| | | public void BuyPackGird(PackType packType) |
| | | { |
| | | var netPack = new C0741_tagCOpenPackCount(); |
| | | netPack.PackType = (byte)packType; |
| | | GameNetSystem.Instance.SendInfo(netPack); |
| | | } |
| | | |
| | | public void UpdateUnlockedGridCount(H0724_tagRolePackCanUseCount useCount) |
| | |
| | | autoUseItemIDs = JsonMapper.ToObject<int[]>(FuncConfigConfig.Get("AutoUseItem").Numerical1); |
| | | var config= FuncConfigConfig.Get("InitBagCellCount"); |
| | | initBagGridCount = int.Parse(config.Numerical1); |
| | | PackInitCountDict = ConfigParse.ParseIntDict(config.Numerical2); |
| | | |
| | | config = FuncConfigConfig.Get("PackageSortPriority"); |
| | | itemPackSortTyps = ConfigParse.GetMultipleStr<int>(config.Numerical1); |