| | |
| | | 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);
|
| | |
|
| | | }
|