| | |
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null) return false;
|
| | |
|
| | | int startLockIndex = singlePack.openGridCount - GetInitGridCount(PackType.rptItem);
|
| | | int startLockIndex = singlePack.openGridCount - playerPack.InitBagGridCnt;
|
| | | FuncConfigConfig _tagFuncModel = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("OpenBagItem");
|
| | | int haveCount = playerPack.GetItemCountByID(PackType.rptItem,itemId);
|
| | | Equation.Instance.Clear();
|
| | |
| | |
|
| | | #region 解锁格子
|
| | |
|
| | | public int GetInitGridCount(PackType type)
|
| | | {
|
| | | FuncConfigConfig initGridCount = null;
|
| | | if (type == PackType.rptItem)
|
| | | initGridCount = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitBagCellCount");
|
| | | else if (type == PackType.rptWarehouse)
|
| | | initGridCount = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitDepotCellCount");
|
| | |
|
| | | return int.Parse(initGridCount.Numerical1);
|
| | | }
|
| | |
|
| | | public void OpenGrid(int chooseGridCount, PackType type)
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(type);
|
| | | int openCount = chooseGridCount - singlePack.openGridCount;
|
| | | int index = chooseGridCount - GetInitGridCount(type);
|
| | | int index = 0;
|
| | | switch(type)
|
| | | {
|
| | | case PackType.rptItem:
|
| | | index = chooseGridCount - playerPack.InitBagGridCnt;
|
| | | break;
|
| | | case PackType.rptWarehouse:
|
| | | index = chooseGridCount - playerPack.InitDepotGridCnt;
|
| | | break;
|
| | | }
|
| | | itemTipsModel.SetExtendGirdModel(openCount,index, type);
|
| | | WindowCenter.Instance.Open<ExtendWin>();
|
| | | }
|