From 498ec5c5d03765bbd87c3f75cbe68dd0d413baf9 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 13 八月 2018 15:27:18 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/KnapSack/Logic/ItemTipsModel.cs |  179 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 88 insertions(+), 91 deletions(-)

diff --git a/System/KnapSack/Logic/ItemTipsModel.cs b/System/KnapSack/Logic/ItemTipsModel.cs
index 964511a..c768a91 100644
--- a/System/KnapSack/Logic/ItemTipsModel.cs
+++ b/System/KnapSack/Logic/ItemTipsModel.cs
@@ -1648,118 +1648,115 @@
             this.ChildType = childType;
             this.isCustom = false;
             this.extraInfos = null;
-            if (type == PackType.rptEquip)
-            {
-                Dictionary<int, EquipmentInitialization> p_strengInfoDict = strengthengmodel._EqInfo;
-                if (p_strengInfoDict.ContainsKey(index))
-                {
-                    SetStrengthData(strengthengmodel.StrengthenTheCeiling(index), strengthengmodel.GameDefineIndex(index));
-                }
-
-                WashProCount washPro = washModel.GetWashEquipInfo(index);
-                if (washPro != null)
-                {
-                    SetWashModel(washModel.OnGetWashType(index), washPro.XLAttrLV, washModel.WashProValues(index));
-                }
-                SetGemModel(PlayerStoneData.Instance.GetStoneInfo(index));
-                SetSuitData(itemId,index);
-            } 
-            
-            SetLegendData(GetUseDataModel(17), GetUseDataModel(19));
-            SetExhaustedData(GetUseDataModel(21),GetUseDataModel(23));
-            SetWingsRefineMat(GetUseDataModel((int)ItemUseDataKey.Def_IudetWingMaterialItemID),GetUseDataModel((int)ItemUseDataKey.Def_IudetWingMaterialItemCount));
             isHavePutLimit = true;
-
-            if (GetUseDataModel(20) != null)
+            this.isCustom = CheckIsCustomItem();
+            if(isCustom)
             {
-                if (GetUseDataModel(20)[0] == 1)
+                AppointItemConfig appointItemConfig = ConfigManager.Instance.GetTemplate<AppointItemConfig>(itemId);
+                if (appointItemConfig != null)
                 {
-                    isHavePutLimit = false;
+                    if (appointItemConfig.CancelUseLimit == 1)
+                    {
+                        isHavePutLimit = false;
+                    }
+                    SetCustomAttrData(appointItemConfig);
                 }
+                this.itemId = itemConfig.EffectValueA1;
+                this.itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(this.itemId);
             }
             else
             {
-                this.isCustom = CheckIsCustomItem();
-                if (this.isCustom)
+                if (isPreview)
                 {
-                    AppointItemConfig appointItemConfig = ConfigManager.Instance.GetTemplate<AppointItemConfig>(itemId);
-                    if (appointItemConfig != null)
+                    List<int> legendIdlist = new List<int>();
+                    List<int> legendValuelist = new List<int>();
+                    if (itemConfig.EquipPlace != (int)RoleEquipType.retWing)
                     {
-                        if (appointItemConfig.CancelUseLimit == 1)
+                        if (itemTipsModel.legendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace))
                         {
-                            isHavePutLimit = false;
+                            foreach (var attrType in itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace].Keys)
+                            {
+                                switch (attrType)
+                                {
+                                    case LegendAttrType.Pursuit:
+                                        legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
+                                        break;
+                                    case LegendAttrType.Fixed:
+                                        legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
+                                        break;
+                                }
+                            }
                         }
-                        SetCustomAttrData(appointItemConfig);
+                        int i = 0;
+                        for (i = 0; i < legendIdlist.Count; i++)
+                        {
+                            if (itemTipsModel.legendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i]))
+                            {
+                                if (itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.ItemColor))
+                                {
+                                    legendValuelist.Add(itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]][itemConfig.ItemColor]);
+                                }
+                            }
+                            else if (itemTipsModel.legendAttrLvValuePreviewDict.ContainsKey(legendIdlist[i]))
+                            {
+                                if (itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.LV))
+                                {
+                                    legendValuelist.Add(itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]][itemConfig.LV]);
+                                }
+                            }
+                        }
                     }
-                    this.itemId = itemConfig.EffectValueA1;
-                    this.itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(this.itemId);
+                    else
+                    {
+                        if (itemTipsModel.wingsLegendAttrValuePreviewDict.ContainsKey(itemConfig.LV))
+                        {
+                            Dictionary<int, List<int>> attrIdDict = itemTipsModel.wingsLegendAttrValuePreviewDict[itemConfig.LV];
+                            foreach (var attrId in attrIdDict.Keys)
+                            {
+                                legendIdlist.Add(attrId);
+                                legendValuelist.Add(attrIdDict[attrId][0]);
+                            }
 
-                  
+                        }
+                    }
+
+                    if (legendIdlist.Count == legendValuelist.Count)
+                    {
+                        SetLegendData(legendIdlist, legendValuelist);
+                    }
                 }
                 else
                 {
-                    if(isPreview)
+                    if (GetUseDataModel(20) != null)
                     {
-                        List<int> legendIdlist = new List<int>();
-                        List<int> legendValuelist = new List<int>();
-                        if(itemConfig.EquipPlace != (int)RoleEquipType.retWing)
+                        if (GetUseDataModel(20)[0] == 1)
                         {
-                            if (itemTipsModel.legendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace))
-                            {
-                                foreach (var attrType in itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace].Keys)
-                                {
-                                    switch (attrType)
-                                    {
-                                        case LegendAttrType.Pursuit:
-                                            legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
-                                            break;
-                                        case LegendAttrType.Fixed:
-                                            legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
-                                            break;
-                                    }
-                                }
-                            }
-                            int i = 0;
-                            for (i = 0; i < legendIdlist.Count; i++)
-                            {
-                                if (itemTipsModel.legendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i]))
-                                {
-                                    if (itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.ItemColor))
-                                    {
-                                        legendValuelist.Add(itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]][itemConfig.ItemColor]);
-                                    }
-                                }
-                                else if (itemTipsModel.legendAttrLvValuePreviewDict.ContainsKey(legendIdlist[i]))
-                                {
-                                    if (itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.LV))
-                                    {
-                                        legendValuelist.Add(itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]][itemConfig.LV]);
-                                    }
-                                }
-                            }
-                        }
-                        else
-                        {
-                            if(itemTipsModel.wingsLegendAttrValuePreviewDict.ContainsKey(itemConfig.LV))
-                            {
-                                Dictionary<int, List<int>> attrIdDict = itemTipsModel.wingsLegendAttrValuePreviewDict[itemConfig.LV];
-                                foreach (var attrId in  attrIdDict.Keys)
-                                {
-                                    legendIdlist.Add(attrId);
-                                    legendValuelist.Add(attrIdDict[attrId][0]);
-                                }
-                               
-                            }
-                        }
-
-                        if (legendIdlist.Count == legendValuelist.Count)
-                        {
-                            SetLegendData(legendIdlist,legendValuelist);
+                            isHavePutLimit = false;
                         }
                     }
+
+                    if (type == PackType.rptEquip)
+                    {
+                        Dictionary<int, EquipmentInitialization> p_strengInfoDict = strengthengmodel._EqInfo;
+                        if (p_strengInfoDict.ContainsKey(index))
+                        {
+                            SetStrengthData(strengthengmodel.StrengthenTheCeiling(index), strengthengmodel.GameDefineIndex(index));
+                        }
+
+                        WashProCount washPro = washModel.GetWashEquipInfo(index);
+                        if (washPro != null)
+                        {
+                            SetWashModel(washModel.OnGetWashType(index), washPro.XLAttrLV, washModel.WashProValues(index));
+                        }
+                        SetGemModel(PlayerStoneData.Instance.GetStoneInfo(index));
+                        SetSuitData(itemId, index);
+                    }
+
+                    SetLegendData(GetUseDataModel(17), GetUseDataModel(19));
+                    SetExhaustedData(GetUseDataModel(21), GetUseDataModel(23));
+                    SetWingsRefineMat(GetUseDataModel((int)ItemUseDataKey.Def_IudetWingMaterialItemID), GetUseDataModel((int)ItemUseDataKey.Def_IudetWingMaterialItemCount));
                 }
             }
-
             this.score = modelInterface.SetEquipScore(id,useDataDict,isPreview);
             PetEatEquipConfig petEatConfig = PetEatEquipConfig.GetEquipColorAndEquipClass(itemConfig.ItemColor,itemConfig.LV);//浠欑洘浠撳簱瑁呭绉垎鍏戞崲琛�
             this.unionWarehouseScore = 0;
@@ -1768,7 +1765,7 @@
                 this.unionWarehouseScore = petEatConfig.integrate;
             }
 
-            if(itemTipsModel.randomRuneIds.Contains(id))
+            if(itemTipsModel.randomRuneIds.Contains(this.itemId))
             {
                 Dictionary<int, List<int>> unlockRuneDict = runeModel.GetAllUnlockRuneIdlist();
                 List<string> extraInfos = new List<string>();

--
Gitblit v1.8.0