From f11a7aae6f821913aa4bc415961db4cb18f3e3b6 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 20 八月 2018 21:27:32 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Compose/New/ComposeWinModel.cs | 38 ++++++++++++++++++++++++++++++++------
1 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/System/Compose/New/ComposeWinModel.cs b/System/Compose/New/ComposeWinModel.cs
index 4cfa451..3e7dc17 100644
--- a/System/Compose/New/ComposeWinModel.cs
+++ b/System/Compose/New/ComposeWinModel.cs
@@ -130,6 +130,24 @@
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; }
@@ -746,28 +764,36 @@
{
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)
{
--
Gitblit v1.8.0