From b228f5fcc062a5fde8af4fcdeec837bcc2577ecf Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 12 三月 2019 15:20:00 +0800
Subject: [PATCH] 3335 删除部分物品绑定概念。

---
 System/Compose/New/ComposeToolsWin.cs    |   42 +---
 System/Compose/New/ComposeWingsWin.cs    |   12 -
 System/BlastFurnace/BlastFurnaceModel.cs |   72 --------
 System/Compose/New/ComposeEquipWin.cs    |   95 ++++-------
 Lua/Gen/ComposeWinModelWrap.cs           |   36 ----
 Lua/Gen/link.xml                         |    3 
 System/Compose/New/ComposeWinModel.cs    |   49 ------
 System/Compose/New/SelectEquipModel.cs   |    8 -
 Lua/Gen/SnxxzUIEquipTrainModelWrap.cs    |   12 +
 Lua/Gen/ComposeWinModelWrap.cs.meta      |    2 
 System/KnapSack/Logic/SinglePack.cs      |   48 ------
 System/BlastFurnace/RecycleDrugCell.cs   |    2 
 System/Compose/New/ComposeTicketWin.cs   |   60 ++----
 Lua/Gen/XLuaGenAutoRegister.cs.meta      |    2 
 14 files changed, 91 insertions(+), 352 deletions(-)

diff --git a/Lua/Gen/ComposeWinModelWrap.cs b/Lua/Gen/ComposeWinModelWrap.cs
index de04035..d7f2f2a 100644
--- a/Lua/Gen/ComposeWinModelWrap.cs
+++ b/Lua/Gen/ComposeWinModelWrap.cs
@@ -21,7 +21,7 @@
         {
 			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
 			System.Type type = typeof(ComposeWinModel);
-			Utils.BeginObjectRegister(type, L, translator, 0, 47, 10, 7);
+			Utils.BeginObjectRegister(type, L, translator, 0, 46, 10, 7);
 			
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit);
@@ -55,7 +55,6 @@
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendComposeRequest", _m_SendComposeRequest);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendComposeQuest", _m_SendComposeQuest);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsBindByFixedAndUnFixedMat", _m_IsBindByFixedAndUnFixedMat);
-			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetBindOrNoBindMinCnt", _m_GetBindOrNoBindMinCnt);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetComposeSuccessRate", _m_GetComposeSuccessRate);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsComposeTicketByType", _m_IsComposeTicketByType);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckComposeItemById", _m_CheckComposeItemById);
@@ -1139,39 +1138,6 @@
                     
                     
                     return 1;
-                }
-                
-            } catch(System.Exception gen_e) {
-                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
-            }
-            
-        }
-        
-        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
-        static int _m_GetBindOrNoBindMinCnt(RealStatePtr L)
-        {
-		    try {
-            
-                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-            
-            
-                ComposeWinModel gen_to_be_invoked = (ComposeWinModel)translator.FastGetCSObj(L, 1);
-            
-            
-                
-                {
-                    int _minBindCnt;
-                    int _minNoBindCnt;
-                    
-                    gen_to_be_invoked.GetBindOrNoBindMinCnt( out _minBindCnt, out _minNoBindCnt );
-                    LuaAPI.xlua_pushinteger(L, _minBindCnt);
-                        
-                    LuaAPI.xlua_pushinteger(L, _minNoBindCnt);
-                        
-                    
-                    
-                    
-                    return 2;
                 }
                 
             } catch(System.Exception gen_e) {
diff --git a/Lua/Gen/ComposeWinModelWrap.cs.meta b/Lua/Gen/ComposeWinModelWrap.cs.meta
index 75fb60c..90257d2 100644
--- a/Lua/Gen/ComposeWinModelWrap.cs.meta
+++ b/Lua/Gen/ComposeWinModelWrap.cs.meta
@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: e0e359da308439d4e87a7d7ce8fd4cc5
-timeCreated: 1550120588
+timeCreated: 1552375168
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2
diff --git a/Lua/Gen/SnxxzUIEquipTrainModelWrap.cs b/Lua/Gen/SnxxzUIEquipTrainModelWrap.cs
index 09f0299..adc572e 100644
--- a/Lua/Gen/SnxxzUIEquipTrainModelWrap.cs
+++ b/Lua/Gen/SnxxzUIEquipTrainModelWrap.cs
@@ -38,7 +38,7 @@
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMaterialNeed", _m_GetMaterialNeed);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMaxTrainLevel", _m_GetMaxTrainLevel);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCandidatePlaces", _m_GetCandidatePlaces);
-			Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsEquipPlaceTrainable", _m_IsEquipPlaceTrainable);
+			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetEquipPlaceTrainState", _m_GetEquipPlaceTrainState);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUnSavedProperties", _m_GetUnSavedProperties);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTrainedProperties", _m_GetTrainedProperties);
 			
@@ -545,7 +545,7 @@
         }
         
         [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
-        static int _m_IsEquipPlaceTrainable(RealStatePtr L)
+        static int _m_GetEquipPlaceTrainState(RealStatePtr L)
         {
 		    try {
             
@@ -557,7 +557,13 @@
             
                 
                 {
-                    string _equipGuid = LuaAPI.lua_tostring(L, 2);
+                    int _level = LuaAPI.xlua_tointeger(L, 2);
+                    int _place = LuaAPI.xlua_tointeger(L, 3);
+                    
+                        Snxxz.UI.EquipTrainModel.TrainState gen_ret = gen_to_be_invoked.GetEquipPlaceTrainState( _level, _place );
+                        translator.Push(L, gen_ret);
+                    
+                    
                     
                     return 1;
                 }
diff --git a/Lua/Gen/XLuaGenAutoRegister.cs.meta b/Lua/Gen/XLuaGenAutoRegister.cs.meta
index 6e5f2b5..c43163f 100644
--- a/Lua/Gen/XLuaGenAutoRegister.cs.meta
+++ b/Lua/Gen/XLuaGenAutoRegister.cs.meta
@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: ff2dde43802d1d14795873c131842a1e
-timeCreated: 1552374367
+timeCreated: 1552375168
 licenseType: Pro
 MonoImporter:
   serializedVersion: 2
diff --git a/Lua/Gen/link.xml b/Lua/Gen/link.xml
index 34d2280..dbb2f62 100644
--- a/Lua/Gen/link.xml
+++ b/Lua/Gen/link.xml
@@ -230,7 +230,6 @@
 		<type fullname="mapbornConfig" preserve="all"/>
 		<type fullname="mapnpcConfig" preserve="all"/>
 		<type fullname="maptransportConfig" preserve="all"/>
-		<type fullname="PlayerStoneData" preserve="all"/>
 		<type fullname="PlayerDatas" preserve="all"/>
 		<type fullname="Snxxz.UI.RealmModel" preserve="all"/>
 		<type fullname="SnxxzGame" preserve="all"/>
@@ -336,7 +335,6 @@
 		<type fullname="Snxxz.UI.JadeDynastyBossModel" preserve="all"/>
 		<type fullname="Snxxz.UI.JadeDynastyDecomposeModel" preserve="all"/>
 		<type fullname="Snxxz.UI.JadeDynastyEquipModel" preserve="all"/>
-		<type fullname="Snxxz.UI.JadeDynastyGemModel" preserve="all"/>
 		<type fullname="Snxxz.UI.JadeDynastySkillModel" preserve="all"/>
 		<type fullname="Snxxz.UI.JadeDynastyTowerModel" preserve="all"/>
 		<type fullname="Snxxz.UI.FBHelpPointExchageModel" preserve="all"/>
@@ -415,7 +413,6 @@
 		<type fullname="Snxxz.UI.BuySuccessModel" preserve="all"/>
 		<type fullname="StoreModel" preserve="all"/>
 		<type fullname="EquipReinforceModel" preserve="all"/>
-		<type fullname="Snxxz.UI.GemModel" preserve="all"/>
 		<type fullname="GodBeastModel" preserve="all"/>
 		<type fullname="HowToPlayModel" preserve="all"/>
 		<type fullname="Snxxz.UI.WingsRedDotModel" preserve="all"/>
diff --git a/System/BlastFurnace/BlastFurnaceModel.cs b/System/BlastFurnace/BlastFurnaceModel.cs
index 92f18b2..c41bd51 100644
--- a/System/BlastFurnace/BlastFurnaceModel.cs
+++ b/System/BlastFurnace/BlastFurnaceModel.cs
@@ -1073,16 +1073,13 @@
 
         for (int i = 0; i < itemModels.Count; i++)
         {
-            string key = StringUtility.Contact(itemModels[i].itemId, "IsBind", itemModels[i].isBind);
+            string key = itemModels[i].itemId.ToString();
             if (!lookRecycleDict.ContainsKey(key))
             {
                 List<ItemModel> modellist = new List<ItemModel>();
                 modellist.Add(itemModels[i]);
                 lookRecycleDict.Add(key, modellist);
-                if (itemModels[i].isBind == 1)
-                {
-                    AddSelectRecycleDan(itemModels[i]);
-                }
+                AddSelectRecycleDan(itemModels[i]);
             }
             else
             {
@@ -1095,10 +1092,6 @@
 
     private int CompareByDanBindAndLv(ItemModel start, ItemModel end)
     {
-        bool isBindStart = start.isBind == 1 ? true : false;
-        bool isBindEnd = end.isBind == 1 ? true : false;
-        if (isBindStart.CompareTo(isBindEnd) != 0) return -isBindStart.CompareTo(isBindEnd);
-
         int startLv = start.config.LV;
         int endLv = end.config.LV;
         if (startLv.CompareTo(endLv) != 0) return startLv.CompareTo(endLv);
@@ -1111,7 +1104,7 @@
     public event Action RefreshSelectRecycleAct;
     public void AddSelectRecycleDan(ItemModel itemModel)
     {
-        string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.isBind);
+        string key = itemModel.itemId.ToString();
         if (!recycleStrlist.Contains(key))
         {
             recycleStrlist.Add(key);
@@ -1125,7 +1118,7 @@
 
     public void RemoveSelectRecycleDan(ItemModel itemModel)
     {
-        string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.isBind);
+        string key = itemModel.itemId.ToString();
         if (recycleStrlist.Contains(key))
         {
             recycleStrlist.Remove(key);
@@ -1163,8 +1156,6 @@
             return;
         }
         #region 璁剧疆鍥炴敹鏁版嵁
-        int unBindCnt = 0;
-        int sumCnt = 0;
         int getMoney = 0;
         recycleDanDict.Clear();
         for (int i = 0; i < recycleStrlist.Count; i++)
@@ -1175,16 +1166,10 @@
             {
                 for (int j = 0; j < modellist.Count; j++)
                 {
-                    sumCnt += modellist[j].count;
-                    if (modellist[j].isBind == 0)
-                    {
-                        unBindCnt += modellist[j].count;
-                    }
-
                     if (playerPack.CheckIsDrugById(modellist[j].itemId))
                     {
                         AttrFruitConfig fruitConfig = AttrFruitConfig.Get(modellist[j].itemId);
-                        getMoney = getMoney + fruitConfig.RecycleExp * modellist[j].count;
+                        getMoney += fruitConfig.RecycleExp * modellist[j].count;
                     }
 
                     if (!recycleDanDict.ContainsKey(modellist[j].itemPlace))
@@ -1200,56 +1185,11 @@
         }
         #endregion
         SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
-        //if (isOpenPrompting)
-        //{
-        //    ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("BlastFurnace114",sumCnt,getMoney,string.Format("<Img chat={0}/>",StringUtility.Contact("Money_Type_",27))),
-        //        Language.Get("ConfirmCancel102"),(bool isOk, bool isToggle) =>
-        //       {
-        //         if (isOk)
-        //         {
-        //               if(unBindCnt > 0)
-        //               {
-        //                   ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
-        //                  (bool isRecycle) =>
-        //                  {
-        //                     if (isRecycle)
-        //                     {
-        //                         SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
-        //                     }
-        //                 });
-        //               }
-        //               else
-        //               {
-        //                   SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
-        //               }
-        //         }
-        //         isOpenPrompting = !isToggle;
-        //     });
-        //}
-        //else
-        //{
-        //    if (unBindCnt > 0)
-        //    {
-        //       ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
-        //       (bool isRecycle) =>
-        //       {
-        //           if (isRecycle)
-        //           {
-        //               SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
-        //           }
-        //       });
-        //    }
-        //    else
-        //    {
-        //        SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
-        //    }
-        //}
-
     }
 
     public void SendRecycleDrugQuest(List<int> indexs, List<int> nums)
     {
-        CA32A_tagCMRecycleAttrFruit recycleAttrFruit = new CA32A_tagCMRecycleAttrFruit();
+        var recycleAttrFruit = new CA32A_tagCMRecycleAttrFruit();
         recycleAttrFruit.IndexCount = (byte)indexs.Count;
         byte[] indexByte = new byte[indexs.Count];
         ushort[] numShort = new ushort[indexs.Count];
diff --git a/System/BlastFurnace/RecycleDrugCell.cs b/System/BlastFurnace/RecycleDrugCell.cs
index fe948e8..3f96d2f 100644
--- a/System/BlastFurnace/RecycleDrugCell.cs
+++ b/System/BlastFurnace/RecycleDrugCell.cs
@@ -21,7 +21,7 @@
             {
                 itemCell.gameObject.SetActive(true);
                 ItemModel itemModel = list[0];
-                string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.isBind);
+                string key = itemModel.itemId.ToString();
                 if (blastFurnace.recycleStrlist.Contains(key))
                 {
                     selectImg.SetActive(true);
diff --git a/System/Compose/New/ComposeEquipWin.cs b/System/Compose/New/ComposeEquipWin.cs
index dc781cc..50cb631 100644
--- a/System/Compose/New/ComposeEquipWin.cs
+++ b/System/Compose/New/ComposeEquipWin.cs
@@ -59,14 +59,12 @@
         [SerializeField] UIEffect failEffect;
 
         ComposeWinModel _composeWinModel;
-        ComposeWinModel composeWinModel
-        {
+        ComposeWinModel composeWinModel {
             get { return _composeWinModel ?? (_composeWinModel = ModelCenter.Instance.GetModel<ComposeWinModel>()); }
         }
 
         PackModel _playerPack;
-        PackModel playerPack
-        {
+        PackModel playerPack {
             get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
         }
 
@@ -86,8 +84,7 @@
         bool isIncreaseRate = false;
         int successRate = 0;
         SelectEquipModel _selectModel;
-        SelectEquipModel selectModel    
-        {
+        SelectEquipModel selectModel {
             get { return _selectModel ?? (_selectModel = ModelCenter.Instance.GetModel<SelectEquipModel>()); }
         }
         protected override void BindController()
@@ -144,8 +141,8 @@
         #region 鏂扮殑閫昏緫
         private void Display()
         {
-            composeWinModel.TryGetFirstTypeData((int)ComposeFuncType.Equip,out firstTypeData);
-            if (firstTypeData == null ) return;
+            composeWinModel.TryGetFirstTypeData((int)ComposeFuncType.Equip, out firstTypeData);
+            if (firstTypeData == null) return;
 
             isIncreaseRate = false;
             successRate = 0;
@@ -163,7 +160,7 @@
                 composeWinModel.ResetJumpToModel();
             }
 
-            if(composeWinModel.CurComposeModel == null)
+            if (composeWinModel.CurComposeModel == null)
             {
                 curComposeEquipIndex = -1;
             }
@@ -188,17 +185,17 @@
             if (firstTypeData == null) return;
 
             cellCtrl.Refresh();
-            foreach(var second in firstTypeData.secondTypeDict.Keys)
+            foreach (var second in firstTypeData.secondTypeDict.Keys)
             {
-                cellCtrl.AddCell(ScrollerDataType.Header,second);
-                if(second == curSecondType)
+                cellCtrl.AddCell(ScrollerDataType.Header, second);
+                if (second == curSecondType)
                 {
                     var thirdTypeDict = firstTypeData.secondTypeDict[second].thirdTypeDict;
-                    foreach(var third in thirdTypeDict.Keys)
+                    foreach (var third in thirdTypeDict.Keys)
                     {
                         if (third != 0)
                         {
-                            cellCtrl.AddCell(ScrollerDataType.Normal,third);
+                            cellCtrl.AddCell(ScrollerDataType.Normal, third);
                         }
                     }
                 }
@@ -209,7 +206,7 @@
             {
                 CreateEquipTypeLineCell();
                 composeWinModel.TryGetThirdTypeData((int)ComposeFuncType.Equip, curSecondType, curThirdType, out thirdTypeData);
-                if(thirdTypeData != null)
+                if (thirdTypeData != null)
                 {
                     ItemConfig itemConfig = ItemConfig.Get(thirdTypeData.itemCompound.makeID[0]);
                     if (itemConfig != null && itemConfig.ItemColor == 6)
@@ -292,7 +289,7 @@
         {
             curThirdType = 0;
             curSecondType = secondType;
-            composeWinModel.TryGetSecondTypeData((int)ComposeFuncType.Equip,secondType,out secondTypeData);
+            composeWinModel.TryGetSecondTypeData((int)ComposeFuncType.Equip, secondType, out secondTypeData);
             OnClickSecondType();
             CreateTypeCell();
             JumpIndex();
@@ -334,7 +331,7 @@
 
         private void UpdateThirdType(int thirdType)
         {
-            composeWinModel.TryGetThirdTypeData((int)ComposeFuncType.Equip, curSecondType,thirdType, out thirdTypeData);
+            composeWinModel.TryGetThirdTypeData((int)ComposeFuncType.Equip, curSecondType, thirdType, out thirdTypeData);
             curThirdType = thirdType;
             OnClickThirdType();
             CreateTypeCell();
@@ -380,7 +377,7 @@
                 if (thirdTypeDatas.Count > 0)
                 {
                     ItemCompoundConfig tagItemCompound = thirdTypeDatas[0].itemCompound;
-                    UpdateEquipType(tagItemCompound,0);
+                    UpdateEquipType(tagItemCompound, 0);
                     RefreshUI(tagItemCompound);
                     ChangeUIState(false, false, true);
                 }
@@ -420,7 +417,7 @@
             int[] fixedIds = compoundModel.itemID;
             int[] fixedDisplays = compoundModel.itemDisplay;
             int[] unfixedDisplays = compoundModel.unfixedItemDisplay;
-            if(compoundModel.unfixedItemCount <= 3)
+            if (compoundModel.unfixedItemCount <= 3)
             {
                 three_ComposeEquip.SetActive(true);
                 five_ComposeEquip.SetActive(false);
@@ -473,7 +470,7 @@
                 int increaseNeedNum = increases[1];
                 int increaseRate = increases[2] / 100;
                 increaseRateMatCell.gameObject.SetActive(true);
-                increaseRateMatCell.SetDisplay(compoundModel,NeedMatType.IncreaseItem,false,"",increaseId);
+                increaseRateMatCell.SetDisplay(compoundModel, NeedMatType.IncreaseItem, false, "", increaseId);
                 increaseText.text = Language.Get("Compose109", StringUtility.Contact(increaseRate, "%"));
                 int haveIncreaseNum = playerPack.GetItemCountByID(PackType.Item, increaseId);
                 ItemConfig itemConfig = ItemConfig.Get(increaseId);
@@ -511,7 +508,7 @@
             switch (selectType)
             {
                 case SelectItemType.unfixed:
-                    matCell.SetDisplay(compoundModel,NeedMatType.unfixedItem,false,"",0,itemIndex);
+                    matCell.SetDisplay(compoundModel, NeedMatType.unfixedItem, false, "", 0, itemIndex);
                     break;
                 case SelectItemType.addons:
                     matCell.SetDisplay(compoundModel, NeedMatType.addItem, false, "", 0, itemIndex);
@@ -519,12 +516,12 @@
             }
         }
 
-        private void UpdateReduce(ComposeMatCell matCell,NeedMatType matType)
+        private void UpdateReduce(ComposeMatCell matCell, NeedMatType matType)
         {
             switch (matType)
             {
                 case NeedMatType.unfixedItem:
-                    matCell.SetDisplay(compoundModel,matType, false, UIHelper.ReplaceNewLine(Language.Get("ComposeWin_PutInText_2")));
+                    matCell.SetDisplay(compoundModel, matType, false, UIHelper.ReplaceNewLine(Language.Get("ComposeWin_PutInText_2")));
                     break;
                 case NeedMatType.addItem:
                     matCell.SetDisplay(compoundModel, matType, false);
@@ -561,9 +558,9 @@
             List<ComposeWinModel.ComposeThirdTypeData> thirdTypeDatas = null;
             composeWinModel.TryGetThirdTypeData((int)ComposeFuncType.Equip, curSecondType, curThirdType, out thirdTypeDatas);
             EquipTypeLineCell typeLineCell = cell.GetComponent<EquipTypeLineCell>();
-            typeLineCell.Refresh(cell,thirdTypeDatas);
+            typeLineCell.Refresh(cell, thirdTypeDatas);
         }
-    
+
         private void RefreshUI(ItemCompoundConfig compoundModel)
         {
             this.compoundModel = compoundModel;
@@ -592,25 +589,25 @@
             {
                 successRate = compoundModel.successRate;
             }
-            if(isIncreaseRate)
+            if (isIncreaseRate)
             {
                 int[] increases = compoundModel.successRateIncrease;
-                if(increases != null && increases.Length > 1)
+                if (increases != null && increases.Length > 1)
                 {
                     increaseRate = increases[2] / 100;
                 }
             }
-            
-            if(increaseRate > 0)
+
+            if (increaseRate > 0)
             {
-                string extraAddRate = UIHelper.AppendStringColor(TextColType.Green,StringUtility.Contact("+", increaseRate, "%"),true);
+                string extraAddRate = UIHelper.AppendStringColor(TextColType.Green, StringUtility.Contact("+", increaseRate, "%"), true);
                 successRateText.text = Language.Get("HallowsWin_Success", StringUtility.Contact(successRate / 100, "%", extraAddRate));
             }
             else
             {
                 successRateText.text = Language.Get("HallowsWin_Success", StringUtility.Contact(successRate / 100, "%"));
             }
-           
+
         }
 
         private void OnClickOnekeyPutBtn()
@@ -634,7 +631,7 @@
                     var matCell = fixedAndUnfixeds[unfixedDisplay - 1];
                     if (matCell.itemModel == null)
                     {
-                        for(int j = 0; j < unSelectItems.Count; j++)
+                        for (int j = 0; j < unSelectItems.Count; j++)
                         {
                             ItemModel _model = unSelectItems[j];
                             if (!unfixeAddDict.ContainsKey(_model.itemPlace))
@@ -649,18 +646,18 @@
             }
         }
 
-        private int CompareByOverdueTime(ItemModel start,ItemModel end)
+        private int CompareByOverdueTime(ItemModel start, ItemModel end)
         {
             int remainTime1 = 0;
             int remainTime2 = 0;
-            bool isRemain1 = TryGetRemainTime(start,out remainTime1);
-            bool isRemain2 = TryGetRemainTime(end,out remainTime2);
+            bool isRemain1 = TryGetRemainTime(start, out remainTime1);
+            bool isRemain2 = TryGetRemainTime(end, out remainTime2);
             if (isRemain1.CompareTo(isRemain2) != 0) return -isRemain1.CompareTo(isRemain2);
             if (remainTime1.CompareTo(remainTime2) != 0) return -remainTime1.CompareTo(remainTime2);
             return 0;
         }
 
-        private bool TryGetRemainTime(ItemModel model,out int seconds)
+        private bool TryGetRemainTime(ItemModel model, out int seconds)
         {
             seconds = 0;
             if (model.config.EquipPlace != (int)RoleEquipType.Guard1
@@ -702,7 +699,7 @@
                 }
             }
             ItemConfig itemConfig = ItemConfig.Get(compoundModel.makeID[0]);
-            switch((RoleEquipType)itemConfig.EquipPlace)
+            switch ((RoleEquipType)itemConfig.EquipPlace)
             {
                 case RoleEquipType.Guard1:
                     if (!composeWinModel.IsEnoughUnfixedMat(compoundModel))
@@ -712,13 +709,13 @@
                     else
                     {
                         WindowCenter.Instance.Open<GuardComposeConfirmWin>();
-                    }                
+                    }
                     break;
                 default:
                     SetFixedItemIndexDic();
                     composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict, GetPlayUIEffct(), 1, 10000, isIncreaseRate);
                     break;
-            }            
+            }
         }
 
         private void SetFixedItemIndexDic()
@@ -730,27 +727,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);
@@ -763,7 +744,7 @@
         {
             if (compoundModel == null) return null;
 
-             if(compoundModel.unfixedItemCount <= 3)
+            if (compoundModel.unfixedItemCount <= 3)
             {
                 return composeEffect_Three;
             }
diff --git a/System/Compose/New/ComposeTicketWin.cs b/System/Compose/New/ComposeTicketWin.cs
index 95cb9b1..198da50 100644
--- a/System/Compose/New/ComposeTicketWin.cs
+++ b/System/Compose/New/ComposeTicketWin.cs
@@ -28,17 +28,15 @@
         [SerializeField] List<ComposeMatCell> twoMatFixedAndUnfixeds = new List<ComposeMatCell>();
         [Header("鍚堟垚鐗╁搧")]
         [SerializeField] List<ComposeMatCell> makeItems = new List<ComposeMatCell>();
-       
+
         ComposeWinModel _composeWinModel;
-        ComposeWinModel composeWinModel
-        {
+        ComposeWinModel composeWinModel {
             get { return _composeWinModel ?? (_composeWinModel = ModelCenter.Instance.GetModel<ComposeWinModel>()); }
         }
 
-    
+
         PackModel _playerPack;
-        PackModel playerPack
-        {
+        PackModel playerPack {
             get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
         }
 
@@ -51,7 +49,7 @@
         private int preSecondType = 0;
         [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>>();
         AchievementGuideEffect guidEffect = null;
 
         protected override void BindController()
@@ -60,7 +58,7 @@
             cellCtrl.vertical = true;
             cellCtrl.lockType = EnhanceLockType.KeepVertical;
             composeWinModel.ResetModelEvent += ResetModel;
-          
+
         }
 
         protected override void AddListeners()
@@ -110,7 +108,7 @@
             bool isJumpTo = false;
             var achieveId = AchievementGoto.guideAchievementId;
             SuccessConfig successConfig = SuccessConfig.Get(achieveId);
-            if(successConfig != null && successConfig.Type == 69)
+            if (successConfig != null && successConfig.Type == 69)
             {
                 isJumpTo = true;
                 curSecondType = composeWinModel.secondType;
@@ -201,7 +199,7 @@
             else
             {
                 RefreshUI(null);
-                UpdateUIShow(false,true, false,false);
+                UpdateUIShow(false, true, false, false);
             }
         }
 
@@ -329,13 +327,13 @@
             for (int i = 0; i < makeItems.Count; i++)
             {
                 var matCell = makeItems[i];
-                if(makeIds != null && i < makeIds.Length)
+                if (makeIds != null && i < makeIds.Length)
                 {
-                    matCell.SetDisplay(compoundModel, NeedMatType.MakeItem,false,"",makeIds[i]);
+                    matCell.SetDisplay(compoundModel, NeedMatType.MakeItem, false, "", makeIds[i]);
                 }
                 else
                 {
-                    matCell.SetDisplay(compoundModel, NeedMatType.MakeItem,true);
+                    matCell.SetDisplay(compoundModel, NeedMatType.MakeItem, true);
                 }
             }
 
@@ -343,7 +341,7 @@
             int[] fixedDisplays = compoundModel.itemDisplay;
             int[] unfixedIds = compoundModel.unfixedItemID;
             int[] unfixedDisplays = compoundModel.unfixedItemDisplay;
-            if(fixedIds != null && fixedIds.Length < 2)
+            if (fixedIds != null && fixedIds.Length < 2)
             {
                 for (int i = 0; i < oneMatFixedAndUnfixeds.Count; i++)
                 {
@@ -373,7 +371,7 @@
                     }
                 }
             }
-            else if(fixedIds != null)
+            else if (fixedIds != null)
             {
                 for (int i = 0; i < twoMatFixedAndUnfixeds.Count; i++)
                 {
@@ -403,7 +401,7 @@
                     }
                 }
             }
-           
+
             _moneyCountText.text = ItemLogicUtility.Instance.OnChangeCoinsUnit((ulong)compoundModel.money);
         }
 
@@ -412,9 +410,9 @@
             if (compoundModel == null) return null;
 
             int[] fixedIds = compoundModel.itemID;
-            if(fixedIds != null)
+            if (fixedIds != null)
             {
-                if(fixedIds.Length < 2)
+                if (fixedIds.Length < 2)
                 {
                     return oneMatComposeEffect;
                 }
@@ -447,7 +445,7 @@
             composeWinModel.SetCurComposeModel(compoundModel);
             UpdateComposeMat();
         }
-     
+
         private void ClickAllComposeBtn()
         {
             fixedItemIndexDict.Clear();
@@ -489,7 +487,7 @@
                     break;
                 }
             }
-            composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict,GetPlayMatEffect(), composeCnt);
+            composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict, GetPlayMatEffect(), composeCnt);
         }
 
         private void OnClickComposeBtn()
@@ -503,7 +501,7 @@
                 return;
             }
             SetFixedItemIndexDic();
-            composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict,GetPlayMatEffect(),1);
+            composeWinModel.SendComposeRequest(compoundModel, fixedItemIndexDict, GetPlayMatEffect(), 1);
         }
 
         private void SetFixedItemIndexDic()
@@ -514,35 +512,19 @@
             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);
                 }
             }
 
-           
+
         }
 
         private void OnComposeAnswer(HA814_tagMCMakeItemAnswer answer)
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);
             }
diff --git a/System/Compose/New/ComposeWinModel.cs b/System/Compose/New/ComposeWinModel.cs
index 69f7c48..7819202 100644
--- a/System/Compose/New/ComposeWinModel.cs
+++ b/System/Compose/New/ComposeWinModel.cs
@@ -1001,55 +1001,6 @@
         return itemArray;
     }
 
-    public void GetBindOrNoBindMinCnt(out int minBindCnt, out int minNoBindCnt)
-    {
-        minBindCnt = 0;
-        minNoBindCnt = 0;
-        if (CurComposeModel == null) return;
-
-        Dictionary<int, int> bindCntDic = new Dictionary<int, int>();
-        Dictionary<int, int> noBindCntDic = new Dictionary<int, int>();
-        int[] fixedIds = CurComposeModel.itemID;
-        for (int i = 0; i < fixedIds.Length; i++)
-        {
-            var list = playerPack.GetSinglePack(PackType.Item).GetItemsById(fixedIds[i]);
-            if (list != null)
-            {
-                int bindCnt = 0;
-                int noBindCnt = 0;
-                for (int j = 0; j < list.Count; j++)
-                {
-                    if (list[j].isBind == 1)
-                    {
-                        bindCnt += list[j].count;
-
-                    }
-                    else if (list[j].isBind == 0)
-                    {
-                        noBindCnt += list[j].count;
-                    }
-                }
-                bindCntDic.Add(fixedIds[i], bindCnt);
-                noBindCntDic.Add(fixedIds[i], noBindCnt);
-            }
-        }
-
-        List<int> bindCntlist = bindCntDic.Values.ToList();
-        bindCntlist.Sort();
-        if (bindCntlist.Count > 0)
-        {
-            minBindCnt = bindCntlist[0];
-        }
-
-        List<int> noBindCntlist = noBindCntDic.Values.ToList();
-        noBindCntlist.Sort();
-        if (noBindCntlist.Count > 0)
-        {
-            minNoBindCnt = noBindCntlist[0];
-        }
-
-    }
-
     /// <summary>
     /// 璁$畻闄勫姞鏉愭枡澧炲姞鐨勬垚鍔熺巼
     /// </summary>
diff --git a/System/Compose/New/ComposeWingsWin.cs b/System/Compose/New/ComposeWingsWin.cs
index d2f4831..4f0634e 100644
--- a/System/Compose/New/ComposeWingsWin.cs
+++ b/System/Compose/New/ComposeWingsWin.cs
@@ -610,26 +610,16 @@
             var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
             SinglePack singlePack = playerPack.GetSinglePack(packType);
             if (singlePack == null) return;
-            int isBind = 0;
 
-            if(IsComposeBind)
-            {
-                isBind = 1;
-            }
-            else
-            {
-                isBind = 0;
-            }
             int[] fixedIds = compoundModel.itemID;
             int[] fixedCounts = compoundModel.itemCount;
             for (int i = 0; i < fixedIds.Length; i++)
             {
-                List<int> itemIndexlist = singlePack.GetItemIndexsAppointedCount(fixedIds[i], fixedCounts[i],isBind==1);
+                List<int> itemIndexlist = singlePack.GetItemIndexsAppointedCount(fixedIds[i], fixedCounts[i]);
                 if (itemIndexlist != null)
                 {
                     fixedItemIndexDict.Add(fixedIds[i], itemIndexlist);
                 }
-
             }
         }
 
diff --git a/System/Compose/New/SelectEquipModel.cs b/System/Compose/New/SelectEquipModel.cs
index 59760ab..b6066f5 100644
--- a/System/Compose/New/SelectEquipModel.cs
+++ b/System/Compose/New/SelectEquipModel.cs
@@ -177,10 +177,6 @@
         y = end.config.StarLevel;
         if (x.CompareTo(y) != 0) return x.CompareTo(y);
 
-        x = start.isBind;
-        y = end.isBind;
-        if (x.CompareTo(y) != 0) return -x.CompareTo(y);
-
         x = oneKeyPutlist.IndexOf(start);
         y = oneKeyPutlist.IndexOf(end);
         if (x.CompareTo(y) != 0) return x.CompareTo(y);
@@ -190,10 +186,6 @@
 
     public int CompareByCondition(ItemModel start, ItemModel end)
     {
-        int startIsBind = start.isBind;
-        int endIsBind = end.isBind;
-        if (startIsBind.CompareTo(endIsBind) != 0) return startIsBind.CompareTo(endIsBind);
-
         int startQuality = start.config.ItemColor;
         int endQuality = end.config.ItemColor;
         if (startQuality.CompareTo(endQuality) != 0) return startQuality.CompareTo(endQuality);
diff --git a/System/KnapSack/Logic/SinglePack.cs b/System/KnapSack/Logic/SinglePack.cs
index 29d14a7..fed6de2 100644
--- a/System/KnapSack/Logic/SinglePack.cs
+++ b/System/KnapSack/Logic/SinglePack.cs
@@ -162,8 +162,6 @@
                 }
             }
 
-            goalItems.Sort(CompareIsBind);
-
             var itemIndexs = new List<int>();
             var count = 0;
             for (var i = 0; i < goalItems.Count; i++)
@@ -181,52 +179,6 @@
             }
 
             return itemIndexs;
-        }
-
-        /// <summary>
-        /// 寰楀埌鍚屼竴涓猧d鐗╁搧鎸囧畾鏁伴噺鐨勬牸瀛愬簭鍙�
-        /// </summary>
-        /// <param name="itemId"></param>
-        /// <param name="preferBind">浼樺厛鏉′欢锛坱rue 涓虹粦瀹氾紝false涓轰笉缁戝畾锛�</param>
-        /// <returns></returns>
-        public List<int> GetItemIndexsAppointedCount(int itemId, int needCnt, bool preferBind)
-        {
-            var itemPool = new List<ItemModel>();
-            foreach (var item in items.Values)
-            {
-                if (item.itemId == itemId)
-                {
-                    itemPool.Add(item);
-                }
-            }
-
-            var preferCondition = preferBind ? 1 : 0;
-            var indexs = new List<int>();
-            int count = 0;
-            for (int i = 0; count < needCnt && i < itemPool.Count; i++)
-            {
-                if (itemPool[i].isBind == preferCondition)
-                {
-                    indexs.Add(itemPool[i].itemPlace);
-                    count += itemPool[i].count;
-                }
-            }
-
-            for (int i = 0; count < needCnt && i < itemPool.Count; i++)
-            {
-                if (itemPool[i].isBind != preferCondition)
-                {
-                    indexs.Add(itemPool[i].itemPlace);
-                    count += itemPool[i].count;
-                }
-            }
-
-            return indexs;
-        }
-
-        private int CompareIsBind(ItemModel x, ItemModel y)
-        {
-            return -x.isBind.CompareTo(y.isBind);
         }
 
         /// <summary>

--
Gitblit v1.8.0