| | |
| | | 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
|
| | | public Dictionary<int, Dictionary<int, int>> dogzLegendAttrColorValuePreviewDict { get; private set; } // key 属性ID value 装备品质,属性数值
|
| | | public Dictionary<string, Dictionary<LegendAttrType, int>> dogzLegendAttrCntPreviewDict { get; private set; } // key 品质+星级 value 属性条目数
|
| | | public Dictionary<int, List<int>> dogzLegendAttrTypeDict { get; private set; }
|
| | | public Dictionary<int, List<string>> guardDesDict { get; private set; }
|
| | |
|
| | | public Dictionary<int, PetInfoConfig> unlockPetDict { get; private set; }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig dogzlegendAttrColor = Config.Instance.Get<FuncConfigConfig>("DogzLegendAttrColor");
|
| | | dogzLegendAttrTypeDict = new Dictionary<int, List<int>>();
|
| | | if (dogzlegendAttrColor != null)
|
| | | {
|
| | | JsonData jsonData = JsonMapper.ToObject(dogzlegendAttrColor.Numerical1);
|
| | | foreach (var key in jsonData.Keys)
|
| | | {
|
| | | List<int> attrIDlist = new List<int>();
|
| | | dogzLegendAttrTypeDict.Add(int.Parse(key), attrIDlist);
|
| | | for (int i = 0; i < jsonData[key].Count; i++)
|
| | | {
|
| | | attrIDlist.Add((int)jsonData[key][i]);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig legendAttrCountPreview = Config.Instance.Get<FuncConfigConfig>("LegendAttrCountPreview");
|
| | | JsonData legendAttrCntData = JsonMapper.ToObject(legendAttrCountPreview.Numerical1);
|
| | | legendAttrCntPreviewDict = new Dictionary<string, Dictionary<LegendAttrType, int>>();
|
| | |
| | | for (i = 0; i < legendAttrCntData[color][star].Count; i++)
|
| | | {
|
| | | legendCntDic.Add((LegendAttrType)i, int.Parse(legendAttrCntData[color][star][i].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig dogzlegendAttrCountPreview = Config.Instance.Get<FuncConfigConfig>("DogzLegendAttrCountPreview");
|
| | | JsonData dogzlegendAttrCntData = JsonMapper.ToObject(dogzlegendAttrCountPreview.Numerical1);
|
| | | dogzLegendAttrCntPreviewDict = new Dictionary<string, Dictionary<LegendAttrType, int>>();
|
| | | foreach (var color in dogzlegendAttrCntData.Keys)
|
| | | {
|
| | | foreach (var star in dogzlegendAttrCntData[color].Keys)
|
| | | {
|
| | | Dictionary<LegendAttrType, int> legendCntDic = new Dictionary<LegendAttrType, int>();
|
| | | dogzLegendAttrCntPreviewDict.Add(StringUtility.Contact(color, star), legendCntDic);
|
| | | if (dogzlegendAttrCntData[color][star].IsArray)
|
| | | {
|
| | | int i = 0;
|
| | | for (i = 0; i < dogzlegendAttrCntData[color][star].Count; i++)
|
| | | {
|
| | | legendCntDic.Add((LegendAttrType)i, int.Parse(dogzlegendAttrCntData[color][star][i].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig dogzlegendAttrRulePreview = Config.Instance.Get<FuncConfigConfig>("DogzLegendAttrRulePreview");
|
| | | JsonData dogzlegendAttrRuleData = JsonMapper.ToObject(dogzlegendAttrRulePreview.Numerical1);
|
| | | dogzLegendAttrIDPreviewDict = new Dictionary<int, Dictionary<LegendAttrType, List<int>>>();
|
| | | foreach (var itemPlace in dogzlegendAttrRuleData.Keys)
|
| | | {
|
| | | Dictionary<LegendAttrType, List<int>> legendIdDic = new Dictionary<LegendAttrType, List<int>>();
|
| | | dogzLegendAttrIDPreviewDict.Add(int.Parse(itemPlace.ToString()), legendIdDic);
|
| | | if (dogzlegendAttrRuleData[itemPlace].IsArray)
|
| | | {
|
| | | int i = 0;
|
| | | for (i = 0; i < dogzlegendAttrRuleData[itemPlace].Count; i++)
|
| | | {
|
| | | if (dogzlegendAttrRuleData[itemPlace][i].IsArray)
|
| | | {
|
| | | List<int> attrIdlist = new List<int>();
|
| | | legendIdDic.Add((LegendAttrType)i, attrIdlist);
|
| | | int j = 0;
|
| | | for (j = 0; j < dogzlegendAttrRuleData[itemPlace][i].Count; j++)
|
| | | {
|
| | | attrIdlist.Add(int.Parse(dogzlegendAttrRuleData[itemPlace][i][j].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig legendAttrColorValuePreview = Config.Instance.Get<FuncConfigConfig>("LegendAttrValueByColorPreview");
|
| | | JsonData legendAttrColorData = JsonMapper.ToObject(legendAttrColorValuePreview.Numerical1);
|
| | | legendAttrColorValuePreviewDict = new Dictionary<int, Dictionary<int, int>>();
|
| | |
| | | if (legendAttrColorData[attrID][i].IsArray)
|
| | | {
|
| | | legendValueDic.Add(int.Parse(legendAttrColorData[attrID][i][0].ToString()), int.Parse(legendAttrColorData[attrID][i][1].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig dogzlegendAttrColorValuePreview = Config.Instance.Get<FuncConfigConfig>("DogzLegendAttrValueByColorPreview");
|
| | | JsonData dogzlegendAttrColorData = JsonMapper.ToObject(dogzlegendAttrColorValuePreview.Numerical1);
|
| | | dogzLegendAttrColorValuePreviewDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | foreach (var attrID in dogzlegendAttrColorData.Keys)
|
| | | {
|
| | | Dictionary<int, int> legendValueDic = new Dictionary<int, int>();
|
| | | dogzLegendAttrColorValuePreviewDict.Add(int.Parse(attrID.ToString()), legendValueDic);
|
| | | if (dogzlegendAttrColorData[attrID].IsArray)
|
| | | {
|
| | | int i = 0;
|
| | | for (i = 0; i < dogzlegendAttrColorData[attrID].Count; i++)
|
| | | {
|
| | | if (dogzlegendAttrColorData[attrID][i].IsArray)
|
| | | {
|
| | | legendValueDic.Add(int.Parse(dogzlegendAttrColorData[attrID][i][0].ToString()), int.Parse(dogzlegendAttrColorData[attrID][i][1].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | return s;
|
| | | }
|
| | |
|
| | | public string GetDogzLegendAttrCntPreview(ItemAttrData attrData)
|
| | | {
|
| | | string s = "";
|
| | | if (attrData.isCustom)
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MustTitle", attrData.legendDataDict.Count);
|
| | | }
|
| | | else
|
| | | {
|
| | | int attrCnt = 0;
|
| | | string attrCntKey = StringUtility.Contact(attrData.itemConfig.ItemColor, attrData.itemConfig.StarLevel);
|
| | | if (dogzLegendAttrCntPreviewDict.ContainsKey(attrCntKey))
|
| | | {
|
| | | foreach (var key in dogzLegendAttrCntPreviewDict[attrCntKey].Keys)
|
| | | {
|
| | | switch (key)
|
| | | {
|
| | | case LegendAttrType.Normal:
|
| | | attrCnt += dogzLegendAttrCntPreviewDict[attrCntKey][key];
|
| | | break;
|
| | | case LegendAttrType.Pursuit:
|
| | | attrCnt += dogzLegendAttrCntPreviewDict[attrCntKey][key];
|
| | | break;
|
| | | case LegendAttrType.Fixed:
|
| | | attrCnt += dogzLegendAttrCntPreviewDict[attrCntKey][key];
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.StarLevel > 2)
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MustTitle", attrCnt);
|
| | | }
|
| | | else
|
| | | {
|
| | | s = Language.Get("LegendAttPreview_MightTitle", attrCnt);
|
| | | }
|
| | | }
|
| | |
|
| | | return s;
|
| | | }
|
| | |
|
| | | public string GetWingsLegendAttrCntPreview(ItemAttrData attrData)
|
| | | {
|
| | | string s = "";
|
| | |
| | | attrDict.Add(idlist[i], valuelist[i]);
|
| | | }
|
| | |
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.retWing)
|
| | | switch (itemConfig.EquipPlace)
|
| | | {
|
| | | case 11:
|
| | | break;
|
| | | case 1:
|
| | | case 2:
|
| | | case 3:
|
| | | case 4:
|
| | | case 5:
|
| | | case 6:
|
| | | case 7:
|
| | | case 8:
|
| | | case 9:
|
| | | case 10:
|
| | | case 12:
|
| | | idlist.Sort(CompareLegendAttrType);
|
| | | break;
|
| | | case 101:
|
| | | case 102:
|
| | | case 103:
|
| | | case 104:
|
| | | case 105:
|
| | | idlist.Sort(CompareDogzLegendAttrType);
|
| | | break;
|
| | | }
|
| | |
|
| | | for (i = 0; i < idlist.Count; i++)
|
| | |
| | |
|
| | | }
|
| | |
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.retWing)
|
| | | switch (itemConfig.EquipPlace)
|
| | | {
|
| | | s = GetTextColorByLegendType(GetLegendType(idlist[i]), s);
|
| | | }
|
| | | else
|
| | | {
|
| | | case 11:
|
| | | foreach (var key in wingsLegendAttrColorDict.Keys)
|
| | | {
|
| | | if (key == idlist[i])
|
| | |
| | | break;
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 1:
|
| | | case 2:
|
| | | case 3:
|
| | | case 4:
|
| | | case 5:
|
| | | case 6:
|
| | | case 7:
|
| | | case 8:
|
| | | case 9:
|
| | | case 10:
|
| | | case 12:
|
| | | s = GetTextColorByLegendType(GetLegendType(idlist[i]), s);
|
| | | break;
|
| | | case 101:
|
| | | case 102:
|
| | | case 103:
|
| | | case 104:
|
| | | case 105:
|
| | | s = GetTextColorByLegendType(GetDogzLegendType(idlist[i]), s);
|
| | | break;
|
| | | }
|
| | |
|
| | | if (attrSB.Length <= 0)
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | private int CompareDogzLegendAttrType(int start, int end)
|
| | | {
|
| | | int type1 = GetDogzLegendType(start);
|
| | | int type2 = GetDogzLegendType(end);
|
| | | if (type1.CompareTo(type2) != 0) return type1.CompareTo(type2);
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private int GetLegendType(int id)
|
| | | {
|
| | | foreach (var key in equipLegendAttrTypeDict.Keys)
|
| | | {
|
| | | if (equipLegendAttrTypeDict[key].Contains(id))
|
| | | {
|
| | | return key;
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private int GetDogzLegendType(int id)
|
| | | {
|
| | | foreach (var key in dogzLegendAttrTypeDict.Keys)
|
| | | {
|
| | | if (dogzLegendAttrTypeDict[key].Contains(id))
|
| | | {
|
| | | return key;
|
| | | }
|
| | |
| | | {
|
| | | legendIdlist = new List<int>();
|
| | | legendValuelist = new List<int>();
|
| | | if (itemTipsModel.legendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace))
|
| | | if (itemTipsModel.dogzLegendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace))
|
| | | {
|
| | | foreach (var attrType in itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace].Keys)
|
| | | foreach (var attrType in itemTipsModel.dogzLegendAttrIDPreviewDict[itemConfig.EquipPlace].Keys)
|
| | | {
|
| | | switch (attrType)
|
| | | {
|
| | | case LegendAttrType.Pursuit:
|
| | | legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | legendIdlist.AddRange(itemTipsModel.dogzLegendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | case LegendAttrType.Fixed:
|
| | | legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | legendIdlist.AddRange(itemTipsModel.dogzLegendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | int i = 0;
|
| | | for (i = 0; i < legendIdlist.Count; i++)
|
| | | {
|
| | | if (itemTipsModel.legendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i]))
|
| | | if (itemTipsModel.dogzLegendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i]))
|
| | | {
|
| | | if (itemTipsModel.legendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.ItemColor))
|
| | | if (itemTipsModel.dogzLegendAttrColorValuePreviewDict[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]);
|
| | | legendValuelist.Add(itemTipsModel.dogzLegendAttrColorValuePreviewDict[legendIdlist[i]][itemConfig.ItemColor]);
|
| | | }
|
| | | }
|
| | | }
|