From 9473a532fb1160cf720af536c8d6d3d3237bf9af Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 12 三月 2019 15:56:31 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Compose/New/ComposeToolsWin.cs | 42 ++++++++++++------------------------------
1 files changed, 12 insertions(+), 30 deletions(-)
diff --git a/System/Compose/New/ComposeToolsWin.cs b/System/Compose/New/ComposeToolsWin.cs
index 7dc2158..c997be6 100644
--- a/System/Compose/New/ComposeToolsWin.cs
+++ b/System/Compose/New/ComposeToolsWin.cs
@@ -40,8 +40,7 @@
[SerializeField] UIEffect composeEffect;
ComposeWinModel _composeWinModel;
- ComposeWinModel composeWinModel
- {
+ ComposeWinModel composeWinModel {
get { return _composeWinModel ?? (_composeWinModel = ModelCenter.Instance.GetModel<ComposeWinModel>()); }
}
@@ -52,11 +51,10 @@
[SerializeField] int initSuccessRate = 10000;
ItemCompoundConfig compoundModel = null;
- private Dictionary<int,List<int>> fixedItemIndexDict = new Dictionary<int, List<int>>();
+ private Dictionary<int, List<int>> fixedItemIndexDict = new Dictionary<int, List<int>>();
PackModel _playerPack;
- PackModel playerPack
- {
+ PackModel playerPack {
get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
}
@@ -157,7 +155,7 @@
}
}
}
-
+
}
composeWinModel.TryGetThirdTypeData((int)ComposeFuncType.Item, curSecondType, curThirdType, out thirdTypeData);
if (thirdTypeData != null)
@@ -211,14 +209,14 @@
{
if (second != 3)
{
- cellCtrl.AddCell(ScrollerDataType.Normal,third);
+ cellCtrl.AddCell(ScrollerDataType.Normal, third);
}
else
{
var makerIds = thirdTypeDatas[0].itemCompound.makeID;
if (composeWinModel.IsComposeJobLimit(makerIds[0]))
{
- cellCtrl.AddCell(ScrollerDataType.Normal,third);
+ cellCtrl.AddCell(ScrollerDataType.Normal, third);
}
}
}
@@ -267,7 +265,7 @@
break;
}
}
- if(curThirdType >= 4)
+ if (curThirdType >= 4)
{
curIndex = curIndex + curThirdType - 2;
}
@@ -414,7 +412,7 @@
curSecondType = 0;
curThirdType = 0;
compoundModel = null;
- if(!WindowJumpMgr.Instance.IsJumpState)
+ if (!WindowJumpMgr.Instance.IsJumpState)
{
preSecondType = 0;
preThirdType = 0;
@@ -444,7 +442,7 @@
}
SetFixedItemIndexDic();
- composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict,composeEffect,1);
+ composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict, composeEffect, 1);
}
private void SetFixedItemIndexDic()
@@ -455,27 +453,11 @@
SinglePack singlePack = playerPack.GetSinglePack(packType);
if (singlePack == null) return;
- int minBindCnt = 0;
- int minNoBindCnt = 0;
- composeWinModel.GetBindOrNoBindMinCnt(out minBindCnt, out minNoBindCnt);
int[] fixedIds = compoundModel.itemID;
int[] fixedCounts = compoundModel.itemCount;
for (int i = 0; i < fixedIds.Length; i++)
{
- List<int> itemIndexlist = null;
- if (minBindCnt >= fixedCounts[i])
- {
- itemIndexlist = singlePack.GetItemIndexsAppointedCount(fixedIds[i],fixedCounts[i], true);
- }
- else if (minNoBindCnt >= fixedCounts[i])
- {
- itemIndexlist = singlePack.GetItemIndexsAppointedCount(fixedIds[i],fixedCounts[i], false);
- }
- else
- {
- itemIndexlist = singlePack.GetItemIndexsAppointedCount(fixedIds[i],fixedCounts[i]);
- }
-
+ var itemIndexlist = singlePack.GetItemIndexsAppointedCount(fixedIds[i], fixedCounts[i]);
if (itemIndexlist != null)
{
fixedItemIndexDict.Add(fixedIds[i], itemIndexlist);
@@ -504,13 +486,13 @@
for (int i = 0; i < fixedIds.Length; i++)
{
- int haveCount = playerPack.GetItemCountByID(packType,fixedIds[i]);
+ int haveCount = playerPack.GetItemCountByID(packType, fixedIds[i]);
int canComposeCount = haveCount / fixedCounts[i];
composeCountlist.Add(canComposeCount);
List<int> itemIndexlist = null;
if (singlePack != null)
{
- itemIndexlist = singlePack.GetItemIndexsAppointedCount(fixedIds[i],fixedCounts[i] * canComposeCount);
+ itemIndexlist = singlePack.GetItemIndexsAppointedCount(fixedIds[i], fixedCounts[i] * canComposeCount);
}
fixedItemIndexDict.Add(fixedIds[i], itemIndexlist);
}
--
Gitblit v1.8.0