Elin Modding Docs Doc
Loading...
Searching...
No Matches
ItemCulture.cs
1using System;
2using System.Collections.Generic;
3
4// Token: 0x02000552 RID: 1362
5public class ItemCulture : UIItem
6{
7 // Token: 0x06002502 RID: 9474 RVA: 0x000D1800 File Offset: 0x000CFA00
8 public void Refresh()
9 {
10 FactionBranch branch = Core.Instance.game.player.chara.currentZone.branch;
11 ElementContainerZone elements = branch.elements;
12 Element e = elements.GetOrCreateElement(this.id);
13 this.button1.SetTooltip(delegate(UITooltip t)
14 {
15 e.WriteNote(t.note, null, null);
16 }, true);
17 Action <>9__2;
18 this.button1.onClick.SetListener(delegate
19 {
20 UIContextMenu uicontextMenu = Core.Instance.ui.CreateContextMenuInteraction();
21 string idLang = "detail";
22 Action action;
23 if ((action = <>9__2) == null)
24 {
25 action = (<>9__2 = delegate()
26 {
27 Core.Instance.ui.AddLayer<LayerInfo>().Set(e, false);
28 });
29 }
30 uicontextMenu.AddButton(idLang, action, true);
31 uicontextMenu.Show();
32 });
33 this.text1.SetText(e.Name);
34 int num = 0;
35 foreach (KeyValuePair<int, Element> keyValuePair in elements.dict)
36 {
37 if (keyValuePair.Value.source.aliasParent == this.id)
38 {
39 num++;
40 }
41 }
42 this.textSkills.SetText(num.ToString() ?? "");
43 this.textLv.SetText(num.ToString() ?? "");
44 this.textHearth.SetText("_hearth".lang(branch.GetHearthIncome(e.source.alias).ToString("F1") ?? "", null, null, null, null));
45 }
46
47 // Token: 0x0400148C RID: 5260
48 public string id;
49
50 // Token: 0x0400148D RID: 5261
51 public UIText textLv;
52
53 // Token: 0x0400148E RID: 5262
54 public UIText textSkills;
55
56 // Token: 0x0400148F RID: 5263
57 public UIText textInvest;
58
59 // Token: 0x04001490 RID: 5264
60 public UIText textHearth;
61}