Elin Modding Docs Doc
Loading...
Searching...
No Matches
LayerLocation.cs
1using System;
2using UnityEngine;
3
4// Token: 0x0200059B RID: 1435
5public class LayerLocation : ELayer
6{
7 // Token: 0x06002761 RID: 10081 RVA: 0x000DF364 File Offset: 0x000DD564
8 public override bool HeaderIsListOf(int id)
9 {
10 return true;
11 }
12
13 // Token: 0x06002762 RID: 10082 RVA: 0x000DF367 File Offset: 0x000DD567
14 public override void OnSwitchContent(Window window)
15 {
16 if (window.windowIndex == 1)
17 {
18 this.RefreshZones();
19 }
20 }
21
22 // Token: 0x06002763 RID: 10083 RVA: 0x000DF378 File Offset: 0x000DD578
23 public void RefreshZones()
24 {
25 UIList uilist = this.listZone;
26 uilist.Clear();
27 BaseList baseList = uilist;
28 UIList.Callback<Spatial, ItemGeneral> callback = new UIList.Callback<Spatial, ItemGeneral>();
29 callback.onClick = delegate(Spatial a, ItemGeneral b)
30 {
31 if (!(a is Zone))
32 {
33 return;
34 }
35 this.info.SetZone(a as Zone);
36 };
37 callback.onInstantiate = delegate(Spatial a, ItemGeneral b)
38 {
39 b.SetSound(null);
40 b.SetMainText(a.Name, null, true);
41 b.Build();
42 };
43 baseList.callbacks = callback;
44 foreach (Spatial spatial in ELayer.game.spatials.map.Values)
45 {
46 if (spatial is Zone && spatial.parent == ELayer.pc.currentZone.Region)
47 {
48 if (this.windows[1].idTab == 0)
49 {
50 if (!spatial.IsPlayerFaction)
51 {
52 continue;
53 }
54 }
55 else if (spatial.IsPlayerFaction)
56 {
57 continue;
58 }
59 uilist.Add(spatial);
60 }
61 }
62 uilist.Refresh(false);
63 }
64
65 // Token: 0x040015DF RID: 5599
66 public UIList listZone;
67
68 // Token: 0x040015E0 RID: 5600
69 public Sprite spriteFaction;
70
71 // Token: 0x040015E1 RID: 5601
72 public Sprite spriteFaith;
73
74 // Token: 0x040015E2 RID: 5602
75 public UIZoneInfo info;
76}
Definition Zone.cs:14