Elin Modding Docs Doc
Loading...
Searching...
No Matches
ElementContainerFaction.cs
1using System;
2
3// Token: 0x02000307 RID: 775
5{
6 // Token: 0x06001818 RID: 6168 RVA: 0x0009BFB8 File Offset: 0x0009A1B8
7 public bool IsEffective(Thing t)
8 {
9 return t.c_idDeity.IsEmpty() || t.c_idDeity == EClass.pc.idFaith;
10 }
11
12 // Token: 0x06001819 RID: 6169 RVA: 0x0009BFDE File Offset: 0x0009A1DE
13 public void OnEquip(Chara c, Thing t)
14 {
15 if (!c.IsPCFaction)
16 {
17 return;
18 }
19 this.OnEquip(t);
20 }
21
22 // Token: 0x0600181A RID: 6170 RVA: 0x0009BFF0 File Offset: 0x0009A1F0
23 public void OnUnequip(Chara c, Thing t)
24 {
25 if (!c.IsPCFaction)
26 {
27 return;
28 }
29 this.OnUnequip(t);
30 }
31
32 // Token: 0x0600181B RID: 6171 RVA: 0x0009C004 File Offset: 0x0009A204
33 public void OnEquip(Thing t)
34 {
35 if (!this.IsEffective(t))
36 {
37 return;
38 }
39 foreach (Element element in t.elements.dict.Values)
40 {
41 if (element.IsGlobalElement)
42 {
43 base.ModBase(element.id, element.Value).vExp = element.vExp;
44 this.isDirty = true;
45 }
46 }
47 this.CheckDirty();
48 }
49
50 // Token: 0x0600181C RID: 6172 RVA: 0x0009C098 File Offset: 0x0009A298
51 public void OnUnequip(Thing t)
52 {
53 if (!this.IsEffective(t))
54 {
55 return;
56 }
57 foreach (Element element in t.elements.dict.Values)
58 {
59 if (element.IsGlobalElement)
60 {
61 base.ModBase(element.id, -element.Value);
62 this.isDirty = true;
63 }
64 }
65 this.CheckDirty();
66 }
67
68 // Token: 0x0600181D RID: 6173 RVA: 0x0009C124 File Offset: 0x0009A324
69 public void CheckDirty()
70 {
71 if (!this.isDirty)
72 {
73 return;
74 }
75 foreach (Chara chara in EClass.game.cards.globalCharas.Values)
76 {
77 if (chara.IsPCFaction)
78 {
79 chara.Refresh(false);
80 }
81 }
82 if (EClass.core.IsGameStarted)
83 {
84 foreach (Chara chara2 in EClass._map.charas)
85 {
86 if (chara2.IsPCFactionMinion)
87 {
88 chara2.Refresh(false);
89 }
90 }
91 }
92 this.isDirty = false;
93 }
94
95 // Token: 0x0600181E RID: 6174 RVA: 0x0009C1F8 File Offset: 0x0009A3F8
96 public void OnLeaveFaith()
97 {
98 foreach (Chara chara in EClass.game.cards.globalCharas.Values)
99 {
100 if (chara.IsPCFaction)
101 {
102 this.OnRemoveMember(chara);
103 }
104 }
105 }
106
107 // Token: 0x0600181F RID: 6175 RVA: 0x0009C264 File Offset: 0x0009A464
108 public void OnJoinFaith()
109 {
110 foreach (Chara chara in EClass.game.cards.globalCharas.Values)
111 {
112 if (chara.IsPCFaction)
113 {
114 this.OnAddMemeber(chara);
115 }
116 }
117 }
118
119 // Token: 0x06001820 RID: 6176 RVA: 0x0009C2D0 File Offset: 0x0009A4D0
120 public void OnAddMemeber(Chara c)
121 {
122 foreach (BodySlot bodySlot in c.body.slots)
123 {
124 if (bodySlot.thing != null)
125 {
126 this.OnEquip(bodySlot.thing);
127 }
128 }
129 }
130
131 // Token: 0x06001821 RID: 6177 RVA: 0x0009C338 File Offset: 0x0009A538
132 public void OnRemoveMember(Chara c)
133 {
134 foreach (BodySlot bodySlot in c.body.slots)
135 {
136 if (bodySlot.thing != null)
137 {
138 this.OnUnequip(bodySlot.thing);
139 }
140 }
141 }
142
143 // Token: 0x0400109F RID: 4255
144 public bool isDirty;
145}
Definition Chara.cs:12
Definition Thing.cs:10