| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetAtkSpeedColor(int atkSpeed, out string color)
|
| | | {
|
| | | color = string.Empty;
|
| | | foreach (var key in atkSpeedColorDict.Keys)
|
| | | {
|
| | | var rangelist = atkSpeedColorDict[key];
|
| | | if (rangelist.Count > 1)
|
| | | {
|
| | | if (atkSpeed >= rangelist[0] && atkSpeed <= rangelist[1])
|
| | | {
|
| | | color = key;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | /// <summary>
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void SetCurrentAttrData(ItemModel itemModel, bool isCompare)
|
| | | {
|
| | | curAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.gridIndex, isCompare
|
| | | , itemModel.packType, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.userData), ItemTipChildType.Normal);
|
| | | }
|
| | |
|
| | |
|
| | | public void SetCompareAttrData(ItemModel itemModel)
|
| | | {
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | |
| | | {
|
| | | EquipTipUtility.Show(curAttrData.guid);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<EquipWin>();
|
| | | }
|
| | | break;
|
| | | case ItemWinType.wingsWin:
|
| | |
| | | return s;
|
| | | }
|
| | |
|
| | | private string SetAttrColor(string attrStr, int atkSpeed, int equipPlace)
|
| | | {
|
| | | string color = string.Empty;
|
| | | bool isColor = TryGetAtkSpeedColor(atkSpeed, out color);
|
| | | if (isColor)
|
| | | {
|
| | | return StringUtility.Contact("<color=#", color, ">", attrStr, "</color>");
|
| | | }
|
| | | return attrStr;
|
| | | }
|
| | |
|
| | | public int GetProValueType(int precentType, int value)
|
| | | {
|
| | | switch (precentType)
|
| | | {
|
| | | case 1:
|
| | | case 2:
|
| | | return Mathf.RoundToInt(value / 100);
|
| | | default:
|
| | | return value;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 设置传奇属性
|
| | |
| | | public ItemTipChildType ChildType { get; private set; } //决定当前面板打开哪个
|
| | | public Dictionary<int, List<int>> useDataDict { get; private set; }
|
| | | public Dictionary<int, int> strengthDataDict { get; private set; }
|
| | | public Dictionary<int, int> washDataDict { get; private set; }
|
| | | public Dictionary<int, int> legendDataDict { get; private set; }
|
| | | public Dictionary<int, int> exhaustedMaxDataDict { get; private set; }
|
| | | public Dictionary<int, int> wingsRefineMatDict { get; private set; }
|