| | |
| | | }
|
| | | else
|
| | | {
|
| | | int attrCnt = 0;
|
| | | string attrCntKey = StringUtility.Contact(attrData.itemConfig.ItemColor, attrData.itemConfig.StarLevel);
|
| | | if (legendAttrCntPreviewDict.ContainsKey(attrCntKey))
|
| | | var quality = attrData.itemConfig.ItemColor;
|
| | | var starLevel = attrData.itemConfig.StarLevel;
|
| | | var count = ItemLegendPropertyUtility.GetEquipPropertyCount(quality, starLevel);
|
| | | if (starLevel > 2)
|
| | | {
|
| | | foreach (var key in legendAttrCntPreviewDict[attrCntKey].Keys)
|
| | | {
|
| | | switch (key)
|
| | | {
|
| | | case LegendAttrType.Normal:
|
| | | attrCnt += legendAttrCntPreviewDict[attrCntKey][key];
|
| | | break;
|
| | | case LegendAttrType.Pursuit:
|
| | | attrCnt += legendAttrCntPreviewDict[attrCntKey][key];
|
| | | break;
|
| | | case LegendAttrType.Fixed:
|
| | | attrCnt += legendAttrCntPreviewDict[attrCntKey][key];
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.StarLevel > 2)
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MustTitle", attrCnt);
|
| | | s = Language.Get("LegendAttPreview_MustTitle", count);
|
| | | }
|
| | | else
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MightTitle", attrCnt);
|
| | | s = Language.Get("LegendAttPreview_MightTitle", count);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | this.extraInfos = extraInfos;
|
| | | }
|
| | |
|
| | | private void SetWingsLegendAttrPreview(out List<int> legendIdlist, out List<int> legendValuelist)
|
| | | private void SetWingsLegendAttrPreview(out List<int> ids, out List<int> values)
|
| | | {
|
| | | legendIdlist = new List<int>();
|
| | | legendValuelist = new List<int>();
|
| | | ids = new List<int>();
|
| | | values = new List<int>();
|
| | |
|
| | | 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]);
|
| | | ids.Add(attrId);
|
| | | values.Add(attrIdDict[attrId][0]);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void SetEquipLegendAttrPreview(out List<int> legendIdlist, out List<int> legendValuelist)
|
| | | private void SetEquipLegendAttrPreview(out List<int> ids, out List<int> values)
|
| | | {
|
| | | legendIdlist = new List<int>();
|
| | | legendValuelist = new List<int>();
|
| | | string attrCntKey = StringUtility.Contact(itemConfig.ItemColor, itemConfig.StarLevel);
|
| | | if (itemTipsModel.legendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace))
|
| | | {
|
| | | foreach (var attrType in itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace].Keys)
|
| | | {
|
| | | int attrCnt = 0;
|
| | | if (itemTipsModel.legendAttrCntPreviewDict.ContainsKey(attrCntKey))
|
| | | {
|
| | | attrCnt = itemTipsModel.legendAttrCntPreviewDict[attrCntKey][attrType];
|
| | | }
|
| | | if (attrCnt > 0)
|
| | | {
|
| | | switch (attrType)
|
| | | {
|
| | | case LegendAttrType.Pursuit:
|
| | | legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | case LegendAttrType.Fixed:
|
| | | legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | }
|
| | | }
|
| | | ids = new List<int>();
|
| | | values = new List<int>();
|
| | | var equipPlace = itemConfig.EquipPlace;
|
| | |
|
| | | if (ItemLegendPropertyUtility.HasEquipPlace(equipPlace))
|
| | | {
|
| | | ids.AddRange(ItemLegendPropertyUtility.GetEquipPlaceProperties(equipPlace));
|
| | | }
|
| | |
|
| | | for (var i = ids.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var propertyId = ids[i];
|
| | | if (ItemLegendPropertyUtility.GetEquipPropertyType(propertyId) == LegendAttrType.Normal)
|
| | | {
|
| | | ids.RemoveAt(i);
|
| | | }
|
| | | }
|
| | | int i = 0;
|
| | | for (i = 0; i < legendIdlist.Count; i++)
|
| | |
|
| | | for (var i = 0; i < ids.Count; i++)
|
| | | {
|
| | | if (itemTipsModel.legendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i]))
|
| | | var propertyId = ids[i];
|
| | | var qualityPropertyValue = ItemLegendPropertyUtility.GetEquipQualityPropertyValue(propertyId, itemConfig.ItemColor);
|
| | | if (qualityPropertyValue != 0)
|
| | | {
|
| | | if (itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.ItemColor))
|
| | | {
|
| | | legendValuelist.Add(itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]][itemConfig.ItemColor]);
|
| | | }
|
| | | values.Add(qualityPropertyValue);
|
| | | }
|
| | | else if (itemTipsModel.legendAttrLvValuePreviewDict.ContainsKey(legendIdlist[i]))
|
| | | else
|
| | | {
|
| | | if (itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.LV))
|
| | | var levelPropertyValue = ItemLegendPropertyUtility.GetEquipLevelPropertyValue(propertyId, itemConfig.LV);
|
| | | if (levelPropertyValue != 0)
|
| | | {
|
| | | legendValuelist.Add(itemTipsModel.legendAttrLvValuePreviewDict[legendIdlist[i]][itemConfig.LV]);
|
| | | values.Add(levelPropertyValue);
|
| | | }
|
| | | }
|
| | | }
|