Elin Modding Docs Doc
Loading...
Searching...
No Matches
ActWait.cs
1using System;
2
3// Token: 0x020001CF RID: 463
4public class ActWait : Act
5{
6 // Token: 0x17000354 RID: 852
7 // (get) Token: 0x06000D35 RID: 3381 RVA: 0x00067520 File Offset: 0x00065720
8 public override bool CanPressRepeat
9 {
10 get
11 {
12 return true;
13 }
14 }
15
16 // Token: 0x17000355 RID: 853
17 // (get) Token: 0x06000D36 RID: 3382 RVA: 0x00067523 File Offset: 0x00065723
18 public override CursorInfo CursorIcon
19 {
20 get
21 {
22 return CursorSystem.Wait;
23 }
24 }
25
26 // Token: 0x06000D37 RID: 3383 RVA: 0x0006752A File Offset: 0x0006572A
27 public override bool Perform()
28 {
29 if (!Act.CC.IsPCParty)
30 {
31 return true;
32 }
33 if (Act.CC.IsPC)
34 {
35 ActWait.Search(Act.CC, true);
36 }
37 return true;
38 }
39
40 // Token: 0x06000D38 RID: 3384 RVA: 0x00067554 File Offset: 0x00065754
41 public static bool SearchMedal(Chara c, Point p)
42 {
43 if (c.isBlind)
44 {
45 return false;
46 }
47 if (p.detail == null || !c.CanSeeSimple(p))
48 {
49 return false;
50 }
51 foreach (Thing thing in p.detail.things)
52 {
53 if (thing.isHidden && thing.id == "medal")
54 {
55 thing.SetHidden(false);
56 c.PlaySound("medal", 1f, true);
57 Msg.Say("spotMedal", c, thing, null, null);
58 return true;
59 }
60 }
61 return false;
62 }
63
64 // Token: 0x06000D39 RID: 3385 RVA: 0x0006760C File Offset: 0x0006580C
65 public static void Search(Chara c, bool manual = false)
66 {
67 if (c.isBlind)
68 {
69 return;
70 }
71 int num = 2 + c.Evalue(402);
72 EClass._map.ForeachSphere(c.pos.x, c.pos.z, (float)num, delegate(Point p)
73 {
74 if (p.detail == null || !c.CanSeeSimple(p))
75 {
76 return;
77 }
78 foreach (Thing thing in p.detail.things)
79 {
80 if (thing.isHidden)
81 {
82 int num2 = EClass.pc.Dist(p);
83 if (thing.id == "medal")
84 {
85 if (!manual)
86 {
87 continue;
88 }
89 if (num2 != 0)
90 {
91 Msg.Say("spotMedalNear");
92 continue;
93 }
94 }
95 else
96 {
97 if (EClass.rnd(c.Evalue(210) * 15 + 20 + c.PER) * (manual ? 2 : 1) <= EClass.rnd(EClass._zone.DangerLv * 8 + 60))
98 {
99 continue;
100 }
101 c.ModExp(210, EClass._zone.DangerLv * 3 / 2 + 100);
102 }
103 bool flag = thing.trait is TraitTrap;
104 thing.SetHidden(false);
105 if (thing.id == "medal")
106 {
107 c.PlaySound("medal", 1f, true);
108 Msg.Say("spotMedal", c, thing, null, null);
109 }
110 else
111 {
112 if (flag)
113 {
114 c.PlaySound("spot_trap", 1f, true);
115 EClass.player.haltMove = true;
116 }
117 else
118 {
119 c.PlaySound("spot", 1f, true);
120 }
121 Msg.Say("spotHidden", c, thing, null, null);
122 }
123 }
124 }
125 });
126 }
127}
Definition Act.2.cs:7
Definition Chara.cs:12
Definition Msg.cs:7
Definition Point.cs:11
Definition Thing.cs:10