|
@@ -289,7 +289,8 @@ namespace FL.FGUI
|
|
|
public void ShowOwnerAttr()
|
|
|
{
|
|
|
var list = EpigraphData.Instance.EpiList;
|
|
|
- var map = new Dictionary<int, int>();
|
|
|
+ //var map = new Dictionary<int, int>();
|
|
|
+ var val = 0;
|
|
|
foreach (var epigraph in list)
|
|
|
{
|
|
|
var starTable = epigraphUpTableRepo.GetEpiragphUp(
|
|
@@ -305,51 +306,53 @@ namespace FL.FGUI
|
|
|
|
|
|
if (attrsArray?.Length > 0)
|
|
|
{
|
|
|
- for (int i = 0; i < attrsArray.Length; i += 2)
|
|
|
- {
|
|
|
- if (map.TryGetValue(attrsArray[i], out var attr))
|
|
|
- {
|
|
|
- map.Remove(attrsArray[i]);
|
|
|
- map.Add(attrsArray[i], attr + attrsArray[i + 1]);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- map.Add(attrsArray[i], attrsArray[i + 1]);
|
|
|
- }
|
|
|
- }
|
|
|
+ //for (int i = 0; i < attrsArray.Length; i += 2)
|
|
|
+ //{
|
|
|
+ // if (map.TryGetValue(attrsArray[i], out var attr))
|
|
|
+ // {
|
|
|
+ // map.Remove(attrsArray[i]);
|
|
|
+ // map.Add(attrsArray[i], attr + attrsArray[i + 1]);
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // map.Add(attrsArray[i], attrsArray[i + 1]);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ val += attrsArray[1];
|
|
|
}
|
|
|
}
|
|
|
- if (map.Count > 0)
|
|
|
- {
|
|
|
- var desc = StringBuilderUtils.Acquire();
|
|
|
- int index = 0;
|
|
|
- foreach (var pair in map)
|
|
|
- {
|
|
|
- if (index > 0)
|
|
|
- {
|
|
|
- desc.Append(",");
|
|
|
- index++;
|
|
|
- }
|
|
|
- GetAttributeDesc(pair.Key, pair.Value, ref desc);
|
|
|
- }
|
|
|
- VM.AttrLabel.text = desc.ToString();
|
|
|
- VM.HaveLabel.visible = true;
|
|
|
- VM.AttrLabel.visible = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- VM.HaveLabel.visible = false;
|
|
|
- VM.AttrLabel.visible = false;
|
|
|
- }
|
|
|
+ VM.AttrLabel.SetVar("val", (val / 100).ToString()).FlushVars();
|
|
|
+ //if (map.Count > 0)
|
|
|
+ //{
|
|
|
+ // var desc = StringBuilderUtils.Acquire();
|
|
|
+ // int index = 0;
|
|
|
+ // foreach (var pair in map)
|
|
|
+ // {
|
|
|
+ // if (index > 0)
|
|
|
+ // {
|
|
|
+ // desc.Append(",");
|
|
|
+ // index++;
|
|
|
+ // }
|
|
|
+ // GetAttributeDesc(pair.Key, pair.Value, ref desc);
|
|
|
+ // }
|
|
|
+ // VM.AttrLabel.text = desc.ToString();
|
|
|
+ // VM.HaveLabel.visible = true;
|
|
|
+ // VM.AttrLabel.visible = true;
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // VM.HaveLabel.visible = false;
|
|
|
+ // VM.AttrLabel.visible = false;
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
- private void GetAttributeDesc(int attrType, int attrValue, ref StringBuilder desc)
|
|
|
- {
|
|
|
- var attributeInfo = AttrDescTableRepo.Get(attrType);
|
|
|
- string valStr = attrValue > 0 ? TableUtils.ToRealDouble(attrValue).ToString("F2") : "0";
|
|
|
- desc.Append(attributeInfo?.ShowName);
|
|
|
- desc.Append(valStr);
|
|
|
- desc.Append("%");
|
|
|
- }
|
|
|
+ //private void GetAttributeDesc(int attrType, int attrValue, ref StringBuilder desc)
|
|
|
+ //{
|
|
|
+ // var attributeInfo = AttrDescTableRepo.Get(attrType);
|
|
|
+ // string valStr = attrValue > 0 ? TableUtils.ToRealDouble(attrValue).ToString("F2") : "0";
|
|
|
+ // desc.Append(attributeInfo?.ShowName);
|
|
|
+ // desc.Append(valStr);
|
|
|
+ // desc.Append("%");
|
|
|
+ //}
|
|
|
}
|
|
|
}
|