Elin Modding Docs Doc
Loading...
Searching...
No Matches
LayerHire.cs
1using System;
2using UnityEngine.Events;
3
4// Token: 0x0200054C RID: 1356
5public class LayerHire : ELayer
6{
7 // Token: 0x060024DB RID: 9435 RVA: 0x000D0282 File Offset: 0x000CE482
8 public override void OnAfterInit()
9 {
10 this.Refresh();
11 }
12
13 // Token: 0x060024DC RID: 9436 RVA: 0x000D028C File Offset: 0x000CE48C
14 public void Refresh()
15 {
16 this.list.Clear();
17 BaseList baseList = this.list;
18 UIList.Callback<HireInfo, ButtonChara> callback = new UIList.Callback<HireInfo, ButtonChara>();
19 callback.onClick = delegate(HireInfo a, ButtonChara b)
20 {
21 };
22 callback.onInstantiate = delegate(HireInfo a, ButtonChara b)
23 {
24 Chara chara = a.chara;
25 b.SetChara(chara, ButtonChara.Mode.Hire);
26 CalcGold.Hire(chara);
27 b.item.text2.text = (a.Days.ToString() ?? "");
28 b.item.button1.onClick.AddListener(delegate()
29 {
30 a.isNew = false;
31 this.Refresh();
32 ELayer.ui.AddLayerDontCloseOthers<LayerChara>().SetChara(a.chara);
33 });
34 b.item.button2.onClick.AddListener(delegate()
35 {
36 a.isNew = false;
37 a.chara.ShowDialog("_chara", "4-1", "").onKill.AddListener(new UnityAction(this.Refresh));
38 });
39 b.item.image1.SetActive(a.isNew);
40 };
41 callback.onRefresh = null;
42 baseList.callbacks = callback;
43 foreach (HireInfo hireInfo in ELayer.Home.listReserve)
44 {
45 if (!hireInfo.chara.IsHomeMember() && !hireInfo.chara.currentZone.IsPlayerFaction)
46 {
47 this.list.Add(hireInfo);
48 }
49 }
50 this.list.Refresh(false);
51 this.RebuildLayout(true);
52 }
53
54 // Token: 0x060024DD RID: 9437 RVA: 0x000D0374 File Offset: 0x000CE574
55 public override void OnKill()
56 {
57 ELayer.Branch.ClearNewRecruits();
58 }
59
60 // Token: 0x04001461 RID: 5217
61 public UIList list;
62}
Definition Chara.cs:12