| | |
| | |
|
| | | Dictionary<int, Dictionary<int, string>> wingsLegendAttrColorDict { get; set; }
|
| | |
|
| | | public Dictionary<string, Dictionary<LegendAttrType, int>> legendAttrCntPreviewDict { get; private set; } // key 品质+星级 value 属性条目数
|
| | | public Dictionary<int, Dictionary<LegendAttrType, List<int>>> legendAttrIDPreviewDict { get; private set; } // key 装备位 value 属性类型,属性ID
|
| | | public Dictionary<int, Dictionary<int, int>> legendAttrColorValuePreviewDict { get; private set; } // key 属性ID value 装备品质,属性数值
|
| | | public Dictionary<int, Dictionary<int, int>> legendAttrLvValuePreviewDict { get; private set; } // key 属性ID value 装备阶级,属性数值
|
| | |
|
| | | public Dictionary<int, int> wingsLegendAttrCntPreviewDict { get; private set; } //key 阶数 value属性数
|
| | | public Dictionary<int, Dictionary<int, List<int>>> wingsLegendAttrValuePreviewDict { get; private set; } //key 阶数 value 属性ID 属性数值
|
| | | public Dictionary<int, Dictionary<LegendAttrType, List<int>>> dogzLegendAttrIDPreviewDict { get; private set; } // key 装备位 value 属性类型,属性ID
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig legendAttrCountPreview = FuncConfigConfig.Get("LegendAttrCountPreview");
|
| | | JsonData legendAttrCntData = JsonMapper.ToObject(legendAttrCountPreview.Numerical1);
|
| | | legendAttrCntPreviewDict = new Dictionary<string, Dictionary<LegendAttrType, int>>();
|
| | | foreach (var color in legendAttrCntData.Keys)
|
| | | {
|
| | | foreach (var star in legendAttrCntData[color].Keys)
|
| | | {
|
| | | Dictionary<LegendAttrType, int> legendCntDic = new Dictionary<LegendAttrType, int>();
|
| | | legendAttrCntPreviewDict.Add(StringUtility.Contact(color, star), legendCntDic);
|
| | | if (legendAttrCntData[color][star].IsArray)
|
| | | {
|
| | | int i = 0;
|
| | | for (i = 0; i < legendAttrCntData[color][star].Count; i++)
|
| | | {
|
| | | legendCntDic.Add((LegendAttrType)i, int.Parse(legendAttrCntData[color][star][i].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig dogzlegendAttrCountPreview = FuncConfigConfig.Get("DogzLegendAttrCountPreview");
|
| | | JsonData dogzlegendAttrCntData = JsonMapper.ToObject(dogzlegendAttrCountPreview.Numerical1);
|
| | | dogzLegendAttrCntPreviewDict = new Dictionary<string, Dictionary<LegendAttrType, int>>();
|
| | |
| | | for (i = 0; i < dogzlegendAttrCntData[color][star].Count; i++)
|
| | | {
|
| | | legendCntDic.Add((LegendAttrType)i, int.Parse(dogzlegendAttrCntData[color][star][i].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig legendAttrRulePreview = FuncConfigConfig.Get("LegendAttrRulePreview");
|
| | | JsonData legendAttrRuleData = JsonMapper.ToObject(legendAttrRulePreview.Numerical1);
|
| | | legendAttrIDPreviewDict = new Dictionary<int, Dictionary<LegendAttrType, List<int>>>();
|
| | | foreach (var itemPlace in legendAttrRuleData.Keys)
|
| | | {
|
| | | Dictionary<LegendAttrType, List<int>> legendIdDic = new Dictionary<LegendAttrType, List<int>>();
|
| | | legendAttrIDPreviewDict.Add(int.Parse(itemPlace.ToString()), legendIdDic);
|
| | | if (legendAttrRuleData[itemPlace].IsArray)
|
| | | {
|
| | | int i = 0;
|
| | | for (i = 0; i < legendAttrRuleData[itemPlace].Count; i++)
|
| | | {
|
| | | if (legendAttrRuleData[itemPlace][i].IsArray)
|
| | | {
|
| | | List<int> attrIdlist = new List<int>();
|
| | | legendIdDic.Add((LegendAttrType)i, attrIdlist);
|
| | | int j = 0;
|
| | | for (j = 0; j < legendAttrRuleData[itemPlace][i].Count; j++)
|
| | | {
|
| | | attrIdlist.Add(int.Parse(legendAttrRuleData[itemPlace][i][j].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig legendAttrColorValuePreview = FuncConfigConfig.Get("LegendAttrValueByColorPreview");
|
| | | JsonData legendAttrColorData = JsonMapper.ToObject(legendAttrColorValuePreview.Numerical1);
|
| | | legendAttrColorValuePreviewDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | foreach (var attrID in legendAttrColorData.Keys)
|
| | | {
|
| | | Dictionary<int, int> legendValueDic = new Dictionary<int, int>();
|
| | | legendAttrColorValuePreviewDict.Add(int.Parse(attrID.ToString()), legendValueDic);
|
| | | if (legendAttrColorData[attrID].IsArray)
|
| | | {
|
| | | int i = 0;
|
| | | for (i = 0; i < legendAttrColorData[attrID].Count; i++)
|
| | | {
|
| | | if (legendAttrColorData[attrID][i].IsArray)
|
| | | {
|
| | | legendValueDic.Add(int.Parse(legendAttrColorData[attrID][i][0].ToString()), int.Parse(legendAttrColorData[attrID][i][1].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig dogzlegendAttrColorValuePreview = FuncConfigConfig.Get("DogzLegendAttrValueByColorPreview");
|
| | | JsonData dogzlegendAttrColorData = JsonMapper.ToObject(dogzlegendAttrColorValuePreview.Numerical1);
|
| | | dogzLegendAttrColorValuePreviewDict = new Dictionary<int, Dictionary<int, int>>();
|
| | |
| | | if (dogzlegendAttrColorData[attrID][i].IsArray)
|
| | | {
|
| | | legendValueDic.Add(int.Parse(dogzlegendAttrColorData[attrID][i][0].ToString()), int.Parse(dogzlegendAttrColorData[attrID][i][1].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig legendAttrLvValuePreview = FuncConfigConfig.Get("LegendAttrValueByClassLVPreview");
|
| | | JsonData legendAttrLvData = JsonMapper.ToObject(legendAttrLvValuePreview.Numerical1);
|
| | | legendAttrLvValuePreviewDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | foreach (var attrID in legendAttrLvData.Keys)
|
| | | {
|
| | | Dictionary<int, int> legendValueDic = new Dictionary<int, int>();
|
| | | legendAttrLvValuePreviewDict.Add(int.Parse(attrID.ToString()), legendValueDic);
|
| | | if (legendAttrLvData[attrID].IsArray)
|
| | | {
|
| | | int i = 0;
|
| | | for (i = 0; i < legendAttrLvData[attrID].Count; i++)
|
| | | {
|
| | | if (legendAttrLvData[attrID][i].IsArray)
|
| | | {
|
| | | legendValueDic.Add(int.Parse(legendAttrLvData[attrID][i][0].ToString()), int.Parse(legendAttrLvData[attrID][i][1].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | guardDesDict = new Dictionary<int, List<string>>();
|
| | | FuncConfigConfig guardDesFunc = FuncConfigConfig.Get("GuardianTips");
|
| | |
| | | {
|
| | | var quality = attrData.itemConfig.ItemColor;
|
| | | var starLevel = attrData.itemConfig.StarLevel;
|
| | | var count = ItemLegendPropertyUtility.GetEquipPropertyCount(quality, starLevel);
|
| | | var count = LegendPropertyUtility.GetEquipPropertyCount(quality, starLevel);
|
| | | if (starLevel > 2)
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MustTitle", count);
|
| | |
| | |
|
| | | public string GetWingsLegendAttrCntPreview(ItemAttrData attrData)
|
| | | {
|
| | | string s = "";
|
| | | var description = "";
|
| | | if (attrData.isCustom)
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MustTitle", attrData.legendDataDict.Count);
|
| | | description = Language.Get("LegendAttPreview_MustTitle", attrData.legendDataDict.Count);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (wingsLegendAttrCntPreviewDict.ContainsKey(attrData.itemConfig.LV))
|
| | | int attrCnt = LegendPropertyUtility.GetWingPropertyCount(attrData.itemConfig.LV);
|
| | | if (attrCnt > 0)
|
| | | {
|
| | | int attrCnt = wingsLegendAttrCntPreviewDict[attrData.itemConfig.LV];
|
| | | if (attrCnt > 1)
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MustTitle", attrCnt);
|
| | | description = Language.Get("LegendAttPreview_MustTitle", attrCnt);
|
| | | }
|
| | | else
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MightTitle", attrCnt);
|
| | | description = Language.Get("LegendAttPreview_MightTitle", attrCnt);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return s;
|
| | | return description;
|
| | | }
|
| | |
|
| | | //即将丢弃
|
| | |
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId])));
|
| | | }
|
| | | else if (wingsLegendAttrCntPreviewDict.ContainsKey(itemConfig.LV))
|
| | | else
|
| | | {
|
| | | int minValue = 0;
|
| | | int maxValue = 0;
|
| | | if (wingsLegendAttrValuePreviewDict.ContainsKey(itemConfig.LV))
|
| | | var count = LegendPropertyUtility.GetWingPropertyCount(itemConfig.LV);
|
| | | if (count > 0)
|
| | | {
|
| | | if (wingsLegendAttrValuePreviewDict[itemConfig.LV].ContainsKey(attrId))
|
| | | int minValue = LegendPropertyUtility.GetWingPropertyMinValue(itemConfig.LV, attrId);
|
| | | int maxValue = LegendPropertyUtility.GetWingPropertyMaxValue(itemConfig.LV, attrId);
|
| | | var minDescription = GetProValueTypeStr(playerProModel, minValue);
|
| | | var maxDescription = GetProValueTypeStr(playerProModel, maxValue);
|
| | | var description = StringUtility.Contact("[", minDescription, "~", maxDescription, "]");
|
| | | if (count > 1)
|
| | | {
|
| | | List<int> attrValuelist = wingsLegendAttrValuePreviewDict[itemConfig.LV][attrId];
|
| | | minValue = attrValuelist[0];
|
| | | maxValue = attrValuelist[attrValuelist.Count - 1];
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", description));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name.Replace("%s", description));
|
| | | }
|
| | | }
|
| | | if (wingsLegendAttrCntPreviewDict[itemConfig.LV] > 1)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", StringUtility.Contact("[", GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)), "]")));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name.Replace("%s", StringUtility.Contact("[", GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)), "]")));
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[attrId]));
|
| | | }
|
| | | else if (wingsLegendAttrCntPreviewDict.ContainsKey(itemConfig.LV))
|
| | | else
|
| | | {
|
| | | int minValue = 0;
|
| | | int maxValue = 0;
|
| | | if (wingsLegendAttrValuePreviewDict.ContainsKey(itemConfig.LV))
|
| | | var count = LegendPropertyUtility.GetWingPropertyCount(itemConfig.LV);
|
| | | if (count > 0)
|
| | | {
|
| | | if (wingsLegendAttrValuePreviewDict[itemConfig.LV].ContainsKey(attrId))
|
| | | int minValue = LegendPropertyUtility.GetWingPropertyMinValue(itemConfig.LV, attrId);
|
| | | int maxValue = LegendPropertyUtility.GetWingPropertyMaxValue(itemConfig.LV, attrId);
|
| | | var minDescription = GetProValueTypeStr(playerProModel, minValue);
|
| | | var maxDescription = GetProValueTypeStr(playerProModel, maxValue);
|
| | | var description = StringUtility.Contact("[+", minDescription, "~", maxDescription, "]");
|
| | | if (count > 1)
|
| | | {
|
| | | List<int> attrValuelist = wingsLegendAttrValuePreviewDict[itemConfig.LV][attrId];
|
| | | minValue = attrValuelist[0];
|
| | | maxValue = attrValuelist[attrValuelist.Count - 1];
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, description);
|
| | | }
|
| | | }
|
| | | if (wingsLegendAttrCntPreviewDict[itemConfig.LV] > 1)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, "[+", StringUtility.Contact(GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)), "]"));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name, "[+", StringUtility.Contact(GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)), "]"));
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name, description);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private int GetLegendType(int id)
|
| | | {
|
| | | return (int)ItemLegendPropertyUtility.GetEquipPropertyType(id);
|
| | | return (int)LegendPropertyUtility.GetEquipPropertyType(id);
|
| | | }
|
| | |
|
| | | private int GetDogzLegendType(int id)
|
| | |
| | | values = new List<int>();
|
| | | var equipPlace = itemConfig.EquipPlace;
|
| | |
|
| | | if (ItemLegendPropertyUtility.HasEquipPlace(equipPlace))
|
| | | if (LegendPropertyUtility.HasEquipPlace(equipPlace))
|
| | | {
|
| | | ids.AddRange(ItemLegendPropertyUtility.GetEquipPlaceProperties(equipPlace));
|
| | | ids.AddRange(LegendPropertyUtility.GetEquipPlaceProperties(equipPlace));
|
| | | }
|
| | |
|
| | | for (var i = ids.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var propertyId = ids[i];
|
| | | if (ItemLegendPropertyUtility.GetEquipPropertyType(propertyId) == LegendAttrType.Normal)
|
| | | if (LegendPropertyUtility.GetEquipPropertyType(propertyId) == LegendAttrType.Normal)
|
| | | {
|
| | | ids.RemoveAt(i);
|
| | | }
|
| | |
| | | for (var i = 0; i < ids.Count; i++)
|
| | | {
|
| | | var propertyId = ids[i];
|
| | | var qualityPropertyValue = ItemLegendPropertyUtility.GetEquipQualityPropertyValue(propertyId, itemConfig.ItemColor);
|
| | | var qualityPropertyValue = LegendPropertyUtility.GetEquipQualityPropertyValue(propertyId, itemConfig.ItemColor);
|
| | | if (qualityPropertyValue != 0)
|
| | | {
|
| | | values.Add(qualityPropertyValue);
|
| | | }
|
| | | else
|
| | | {
|
| | | var levelPropertyValue = ItemLegendPropertyUtility.GetEquipLevelPropertyValue(propertyId, itemConfig.LV);
|
| | | var levelPropertyValue = LegendPropertyUtility.GetEquipLevelPropertyValue(propertyId, itemConfig.LV);
|
| | | if (levelPropertyValue != 0)
|
| | | {
|
| | | values.Add(levelPropertyValue);
|