| | |
| | | return modellist;
|
| | | }
|
| | |
|
| | | public int GetTicketId(int firstType, int secondType, int thirdType)
|
| | | {
|
| | | var itemId = 0;
|
| | | var dict = ItemCompoundConfig.GetFirstComposeTypeDict(firstType);
|
| | | Dictionary<int, List<ItemCompoundConfig>> _secondTypeDict = null;
|
| | | dict.TryGetValue(secondType, out _secondTypeDict);
|
| | | if (_secondTypeDict != null)
|
| | | {
|
| | | List<ItemCompoundConfig> modellist = null;
|
| | | _secondTypeDict.TryGetValue(thirdType, out modellist);
|
| | | if (modellist != null && modellist.Count > 0)
|
| | | {
|
| | | int.TryParse(modellist[0].makeID, out itemId);
|
| | | }
|
| | | }
|
| | | return itemId;
|
| | | }
|
| | |
|
| | | public int[] makeIDs { get; private set; }
|
| | | public int[] unfixedItemIDs { get; private set; }
|
| | | public int[] costfixedItemIDs { get; private set; }
|
| | |
| | | {
|
| | | bool isEnough = true;
|
| | | Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> getFirstModel = ItemCompoundConfig.GetFirstComposeTypeDict((int)ComposeFuncType.Ticket);
|
| | | if(getFirstModel.ContainsKey(secondType))
|
| | | if (getFirstModel.ContainsKey(secondType))
|
| | | {
|
| | | if(getFirstModel[secondType].ContainsKey(0))
|
| | | if (getFirstModel[secondType].ContainsKey(0))
|
| | | {
|
| | | ItemCompoundConfig compoundConfig = getFirstModel[secondType][0][0];
|
| | | int[] fixedIDs = ConfigParse.GetMultipleStr<int>(compoundConfig.itemID);
|
| | | int[] fixedCnt = ConfigParse.GetMultipleStr<int>(compoundConfig.itemCount);
|
| | | for(int i= 0; i< fixedIDs.Length; i++)
|
| | | for (int i = 0; i < fixedIDs.Length; i++)
|
| | | {
|
| | | int haveCnt = playerPack.GetItemCountByID(PackType.rptItem,fixedIDs[i]);
|
| | | if(fixedCnt[i] > haveCnt)
|
| | | int haveCnt = playerPack.GetItemCountByID(PackType.rptItem, fixedIDs[i]);
|
| | | if (fixedCnt[i] > haveCnt)
|
| | | {
|
| | | isEnough = false;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | isEnough = false;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | isEnough = false;
|
| | | }
|
| | | return isEnough;
|
| | | }
|
| | |
|
| | | #region 处理跳转界面数据
|
| | | #region 处理跳转界面数据
|
| | |
|
| | | public bool CheckComposeItemById(int itemId)
|
| | | {
|