| | |
| | | {
|
| | |
|
| | | FuncConfigConfig exhaustedFunc;
|
| | |
|
| | | Dictionary<int, Dictionary<int, string>> wingsLegendAttrColorDict { get; set; }
|
| | |
|
| | | 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 装备品质,属性数值
|
| | | Dictionary<string, Dictionary<LegendAttrType, int>> dogzLegendAttrCntPreviewDict { get; set; } // key 品质+星级 value 属性条目数
|
| | | Dictionary<int, List<int>> dogzLegendAttrTypeDict { get; set; }
|
| | |
|
| | | public Dictionary<int, List<string>> guardDesDict { get; private set; }
|
| | |
|
| | | public Dictionary<int, PetInfoConfig> unlockPetDict { get; private set; }
|
| | |
| | |
|
| | | FuncConfigConfig EquipOutWordID = FuncConfigConfig.Get("EquipOutWordID");
|
| | | PeerlessEquipIds = ConfigParse.GetMultipleStr<int>(EquipOutWordID.Numerical1);
|
| | |
|
| | | FuncConfigConfig legendAttrColor = FuncConfigConfig.Get("LegendAttrColor");
|
| | | wingsLegendAttrColorDict = new Dictionary<int, Dictionary<int, string>>();
|
| | | if (legendAttrColor != null)
|
| | | {
|
| | | JsonData jsonData2 = JsonMapper.ToObject(legendAttrColor.Numerical2);
|
| | | foreach (var key in jsonData2.Keys)
|
| | | {
|
| | | Dictionary<int, string> colorDict = new Dictionary<int, string>();
|
| | | wingsLegendAttrColorDict.Add(int.Parse(key), colorDict);
|
| | | foreach (var key2 in jsonData2[key].Keys)
|
| | | {
|
| | | colorDict.Add(int.Parse(key2), jsonData2[key][key2][0].ToString());
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig dogzlegendAttrColor = FuncConfigConfig.Get("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 dogzlegendAttrCountPreview = FuncConfigConfig.Get("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 = FuncConfigConfig.Get("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 dogzlegendAttrColorValuePreview = FuncConfigConfig.Get("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()));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | guardDesDict = new Dictionary<int, List<string>>();
|
| | | FuncConfigConfig guardDesFunc = FuncConfigConfig.Get("GuardianTips");
|
| | |
| | | }
|
| | | 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;
|
| | | }
|
| | | }
|
| | | }
|
| | | var quality = attrData.itemConfig.ItemColor;
|
| | | var starLevel = attrData.itemConfig.StarLevel;
|
| | | var count = LegendPropertyUtility.GetDogzPropertyCount(quality, starLevel, LegendAttrType.Normal);
|
| | | count += LegendPropertyUtility.GetDogzPropertyCount(quality, starLevel, LegendAttrType.Pursuit);
|
| | | count += LegendPropertyUtility.GetDogzPropertyCount(quality, starLevel, LegendAttrType.Fixed);
|
| | |
|
| | | 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);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | switch (itemConfig.EquipPlace)
|
| | | {
|
| | | case 11:
|
| | | foreach (var key in wingsLegendAttrColorDict.Keys)
|
| | | {
|
| | | if (key == attrId)
|
| | | {
|
| | | foreach (var key2 in wingsLegendAttrColorDict[key].Keys)
|
| | | {
|
| | | if (attrDict[attrId] < key2)
|
| | | {
|
| | | s = string.Format("<color=#{0}>{1}</color>", wingsLegendAttrColorDict[key][key2], s);
|
| | | break;
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | s = string.Format("<color=#{0}>{1}</color>", LegendPropertyUtility.GetWingPropertyColor(attrId, attrDict[attrId]), s);
|
| | | break;
|
| | | case 1:
|
| | | case 2:
|
| | |
| | |
|
| | | private int GetDogzLegendType(int id)
|
| | | {
|
| | | foreach (var key in dogzLegendAttrTypeDict.Keys)
|
| | | {
|
| | | if (dogzLegendAttrTypeDict[key].Contains(id))
|
| | | {
|
| | | return key;
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | return (int)LegendPropertyUtility.GetDogzPropertyType(id);
|
| | | }
|
| | |
|
| | | private string GetTextColorByLegendType(int type, string msg)
|
| | |
| | | {
|
| | | legendIdlist = new List<int>();
|
| | | legendValuelist = new List<int>();
|
| | | if (itemTipsModel.dogzLegendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace))
|
| | |
|
| | | var place = itemConfig.EquipPlace;
|
| | | if (LegendPropertyUtility.HasDogzPlace(place))
|
| | | {
|
| | | foreach (var attrType in itemTipsModel.dogzLegendAttrIDPreviewDict[itemConfig.EquipPlace].Keys)
|
| | | var ids = LegendPropertyUtility.GetDogzPlaceProperties(place);
|
| | | for (var i = ids.Count - 1; i >= 0; i--)
|
| | | {
|
| | | switch (attrType)
|
| | | if (LegendPropertyUtility.GetDogzPropertyType(ids[i]) == LegendAttrType.Normal)
|
| | | {
|
| | | case LegendAttrType.Pursuit:
|
| | | legendIdlist.AddRange(itemTipsModel.dogzLegendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | case LegendAttrType.Fixed:
|
| | | legendIdlist.AddRange(itemTipsModel.dogzLegendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | ids.RemoveAt(i);
|
| | | }
|
| | | }
|
| | |
|
| | | legendIdlist.AddRange(ids);
|
| | | }
|
| | | int i = 0;
|
| | | for (i = 0; i < legendIdlist.Count; i++)
|
| | |
|
| | | for (var i = 0; i < legendIdlist.Count; i++)
|
| | | {
|
| | | if (itemTipsModel.dogzLegendAttrColorValuePreviewDict.ContainsKey(legendIdlist[i]))
|
| | | {
|
| | | if (itemTipsModel.dogzLegendAttrColorValuePreviewDict[legendIdlist[i]].ContainsKey(itemConfig.ItemColor))
|
| | | {
|
| | | legendValuelist.Add(itemTipsModel.dogzLegendAttrColorValuePreviewDict[legendIdlist[i]][itemConfig.ItemColor]);
|
| | | }
|
| | | }
|
| | | var propertyId = legendIdlist[i];
|
| | | var value = LegendPropertyUtility.GetDogzQualityPropertyValue(propertyId, itemConfig.ItemColor);
|
| | | legendValuelist.Add(value);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void SetJadeDynastyEquipLegendAttrPreview(out List<int> legendIdlist, out List<int> legendValuelist)
|