terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
DontStarveDarknessDamageDealer.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x020007B7 RID: 1975
9 {
10 // Token: 0x0600405A RID: 16474 RVA: 0x00243038 File Offset: 0x00241238
11 public static void Reset()
12 {
13 if (!true)
14 {
15 }
17 }
18
19 // Token: 0x0600405B RID: 16475 RVA: 0x00243050 File Offset: 0x00241250
20 private static void ResetTimer()
21 {
22 if (!true)
23 {
24 }
25 }
26
27 // Token: 0x0600405C RID: 16476 RVA: 0x00243060 File Offset: 0x00241260
28 private static int GetDarknessDamagePerHit()
29 {
30 return 250;
31 }
32
33 // Token: 0x0600405D RID: 16477 RVA: 0x00243074 File Offset: 0x00241274
35 {
36 return 120;
37 }
38
39 // Token: 0x0600405E RID: 16478 RVA: 0x00243084 File Offset: 0x00241284
40 private static int GetDarknessTimeForMessage()
41 {
42 return 60;
43 }
44
45 // Token: 0x0600405F RID: 16479 RVA: 0x00243094 File Offset: 0x00241294
46 public static void Update(Player player)
47 {
48 int num = 1;
49 bool deadOrGhost = player.DeadOrGhost;
50 if (num == 0)
51 {
52 }
53 bool shimmering;
54 if (num == 0)
55 {
56 shimmering = player.shimmering;
57 if (!shimmering)
58 {
59 if (!shimmering)
60 {
61 }
63 int num2 = 120;
65 bool immune = player.immune;
66 if (!immune)
67 {
68 if (!immune)
69 {
70 }
71 if (!immune)
72 {
73 }
75 }
76 return;
77 }
78 }
79 if (!shimmering)
80 {
81 }
83 }
84
85 // Token: 0x06004060 RID: 16480 RVA: 0x002430F4 File Offset: 0x002412F4
86 private static void UpdateDarknessState(Player player)
87 {
88 if (!true)
89 {
90 }
92 string textValue = Language.GetTextValue("Game.DarknessSafe");
93 int num = 50;
94 int num2 = 200;
95 int num3 = 50;
96 Main.NewText(textValue, (byte)num, (byte)num2, (byte)num3);
98 }
99
100 // Token: 0x06004061 RID: 16481 RVA: 0x0024315C File Offset: 0x0024135C
101 private static bool IsPlayerSafe(Player player)
102 {
103 /*
104An exception occurred when decompiling this method (06004061)
105
106ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.DontStarveDarknessDamageDealer::IsPlayerSafe(Terraria.Player)
107
108 ---> System.Exception: Basic block has to end with unconditional control flow.
109{
110 Block_2:
111 brtrue(IL_0000, ldloc:bool(var_12_67))
112}
113
114 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
115 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
116 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
117 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
118 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
119 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
120 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
121 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
122 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
123 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
124 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
125 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
126 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
127 --- End of inner exception stack trace ---
128 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
129 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
130*/;
131 }
132
133 // Token: 0x06004062 RID: 16482 RVA: 0x002431DC File Offset: 0x002413DC
135 {
136 }
137
138 // Token: 0x06004063 RID: 16483 RVA: 0x002431F0 File Offset: 0x002413F0
139 // Note: this type is marked as 'beforefieldinit'.
141 {
142 }
143
144 // Token: 0x04007E1E RID: 32286
146
147 // Token: 0x04007E1F RID: 32287
148 public static int darknessTimer;
149
150 // Token: 0x04007E20 RID: 32288
151 public static int darknessHitTimer;
152
153 // Token: 0x04007E21 RID: 32289
154 public static bool saidMessage;
155
156 // Token: 0x04007E22 RID: 32290
157 public static bool lastFrameWasTooBright;
158 }
159}
class f__AnonymousType0<< Count > j__TPar
static PlayerDeathReason ByOther(int type)
static string GetTextValue(string key)
Definition Language.cs:54
static void NewText(string newText, byte R=255, byte G=255, byte B=255)
Definition Main.cs:17778