| | |
| | | {
|
| | | public int thirdType;
|
| | | public ItemCompoundConfig itemCompound = null;
|
| | |
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | indexlist = singlePack.ItemIndexlist(increases[0], increases[1]);
|
| | | return true;
|
| | | }
|
| | |
|
| | | public bool TryGetCountById(NeedMatType matType,ItemCompoundConfig itemCompound,int itemId,out int itemCount)
|
| | | {
|
| | | itemCount = 0;
|
| | | if (itemCompound == null || itemId == 0) return false;
|
| | |
|
| | | switch (matType)
|
| | | {
|
| | | case NeedMatType.IncreaseItem:
|
| | | int[] increases = itemCompound.successRateIncrease;
|
| | | if (increases != null && increases.Length >= 3)
|
| | | {
|
| | | itemCount = increases[1];
|
| | | return true;
|
| | | }
|
| | | break;
|
| | | case NeedMatType.fixedItem:
|
| | | int[] fixedIds = itemCompound.itemID;
|
| | | int[] fixedCounts = itemCompound.itemCount;
|
| | | int[] fixedDisplays = itemCompound.itemDisplay;
|
| | | if (fixedIds != null)
|
| | | {
|
| | | for (int i = 0; i < fixedIds.Length; i++)
|
| | | {
|
| | | if (fixedIds[i] == itemId)
|
| | | {
|
| | | itemCount = fixedCounts[i];
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetIdByDisplay(NeedMatType matType, ItemCompoundConfig itemCompound, int display, out int itemId)
|
| | | {
|
| | | itemId = 0;
|
| | | if (itemCompound == null || display == 0) return false;
|
| | | switch (matType)
|
| | | {
|
| | | case NeedMatType.fixedItem:
|
| | | int[] fixedIds = itemCompound.itemID;
|
| | | int[] fixedDisplays = itemCompound.itemDisplay;
|
| | | if (fixedDisplays != null)
|
| | | {
|
| | | for (int i = 0; i < fixedDisplays.Length; i++)
|
| | | {
|
| | | if (fixedDisplays[i] == display)
|
| | | {
|
| | | itemId = fixedIds[i];
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | return false;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | public bool IsComposeJobLimit(int composeId)
|