| | |
| | | if (cfg != null) |
| | | { |
| | | var _itemColor = cfg.ItemColor; |
| | | if (ItemLogicUtility.Instance.IsWing(id))//翅膀 |
| | | { |
| | | Dictionary<int, List<int>> userdata = null; |
| | | if (TryGetUserData(_dict, out userdata)) |
| | | { |
| | | _itemColor = ItemLogicUtility.Instance.GetItemQuality(cfg.ID, userdata); |
| | | } |
| | | } |
| | | |
| | | var itemName = cfg.ItemName; |
| | | if (_dict.ContainsKey("chatsend")) |
| | | { |
| | |
| | | return UIHelper.AppendColor(_itemColor, info, colorType == 1); |
| | | } |
| | | |
| | | static bool TryGetUserData(Dictionary<string, string> href, out Dictionary<int, List<int>> userdata) |
| | | { |
| | | userdata = null; |
| | | if (href.ContainsKey("itemplus")) |
| | | { |
| | | var itemplus = LitJson.JsonMapper.ToObject<ItemTipUtility.CustomItemPlus>(href["itemplus"]); |
| | | userdata = ConfigParse.Analysis(itemplus.UserData); |
| | | } |
| | | else if (href.ContainsKey("userdata")) |
| | | { |
| | | userdata = ConfigParse.Analysis(href["userdata"]); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | } |