Elin Modding Docs Doc
Loading...
Searching...
No Matches
TraitPhone.cs
1using System;
2
3// Token: 0x02000460 RID: 1120
4public class TraitPhone : TraitItem
5{
6 // Token: 0x06001F3B RID: 7995 RVA: 0x000B14F8 File Offset: 0x000AF6F8
7 public override void OnSimulateHour(VirtualDate date)
8 {
9 if (!date.IsRealTime || !this.owner.IsInstalled)
10 {
11 return;
12 }
13 if (EClass.rnd(10) == 0)
14 {
15 EClass._zone.events.Add(new ZoneEventPhone
16 {
17 uidPhone = this.owner.uid
18 }, false);
19 }
20 }
21
22 // Token: 0x06001F3C RID: 7996 RVA: 0x000B154A File Offset: 0x000AF74A
23 public override bool CanUse(Chara c)
24 {
25 return this.ev != null;
26 }
27
28 // Token: 0x06001F3D RID: 7997 RVA: 0x000B1555 File Offset: 0x000AF755
29 public override bool OnUse(Chara c)
30 {
31 SE.Play("electricity_insufficient");
32 Msg.SayNothingHappen();
33 this.ev.Kill();
34 return true;
35 }
36
37 // Token: 0x040010CF RID: 4303
38 public ZoneEventPhone ev;
39}
Definition Chara.cs:12
Definition Msg.cs:7