From df95a3a54fa07849feffc7bbd92ed6441699a5ae Mon Sep 17 00:00:00 2001
From: Client_PangDeRong <593317293@qq.com>
Date: 星期一, 13 八月 2018 14:52:51 +0800
Subject: [PATCH] [1556]修改系统广播属性展示错误问题
---
System/KnapSack/Logic/PackModelInterface.cs | 103 ++++++++++----------
System/KnapSack/Logic/ItemTipsModel.cs | 179 +++++++++++++++++------------------
2 files changed, 139 insertions(+), 143 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>();
diff --git a/System/KnapSack/Logic/PackModelInterface.cs b/System/KnapSack/Logic/PackModelInterface.cs
index fe54c49..131d7b0 100644
--- a/System/KnapSack/Logic/PackModelInterface.cs
+++ b/System/KnapSack/Logic/PackModelInterface.cs
@@ -103,75 +103,74 @@
specAttrDic.Clear();
int id = itemId;
ItemConfig itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemId);
- if(useDataDic != null)
+ if (CheckIsCustomItem(itemConfig))
{
- if(useDataDic.ContainsKey((int)ItemUseDataKey.Def_IudetLegendAttrID))
- {
- SetLegendData(useDataDic[(int)ItemUseDataKey.Def_IudetLegendAttrID], useDataDic[(int)ItemUseDataKey.Def_IudetLegendAttrValue]);
- }
-
- if(useDataDic.ContainsKey((int)ItemUseDataKey.Def_IudetOutOfPrintAttrID))
- {
- SetExhaustedData(useDataDic[(int)ItemUseDataKey.Def_IudetOutOfPrintAttrID],useDataDic[(int)ItemUseDataKey.Def_IudetOutOfPrintAttrValue]);
- }
-
+ AppointItemConfig appointItemConfig = ConfigManager.Instance.GetTemplate<AppointItemConfig>(itemId);
+ SetCustomAttrData(appointItemConfig);
+ id = itemConfig.EffectValueA1;
}
else
{
- if (CheckIsCustomItem(itemConfig))
+ if (isPreview)
{
- AppointItemConfig appointItemConfig = ConfigManager.Instance.GetTemplate<AppointItemConfig>(itemId);
- SetCustomAttrData(appointItemConfig);
- id = itemConfig.EffectValueA1;
+ List<int> legendIdlist = new List<int>();
+ List<int> legendValuelist = new List<int>();
+ 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]);
+ }
+ }
+ }
+
+ if (legendIdlist.Count == legendValuelist.Count)
+ {
+ SetLegendData(legendIdlist, legendValuelist);
+ }
}
else
{
- if (isPreview)
+ if (useDataDic != null)
{
- List<int> legendIdlist = new List<int>();
- List<int> legendValuelist = new List<int>();
- if (itemTipsModel.legendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace))
+ if (useDataDic.ContainsKey((int)ItemUseDataKey.Def_IudetLegendAttrID))
{
- 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]);
- }
- }
+ SetLegendData(useDataDic[(int)ItemUseDataKey.Def_IudetLegendAttrID], useDataDic[(int)ItemUseDataKey.Def_IudetLegendAttrValue]);
}
- if (legendIdlist.Count == legendValuelist.Count)
+ if (useDataDic.ContainsKey((int)ItemUseDataKey.Def_IudetOutOfPrintAttrID))
{
- SetLegendData(legendIdlist, legendValuelist);
+ SetExhaustedData(useDataDic[(int)ItemUseDataKey.Def_IudetOutOfPrintAttrID], useDataDic[(int)ItemUseDataKey.Def_IudetOutOfPrintAttrValue]);
}
+
}
}
}
-
return GetEquipScore(id,specAttrDic);
}
--
Gitblit v1.8.0