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
GUINPCDialogue.cs
Go to the documentation of this file.
1using System;
4using Terraria;
6
7// Token: 0x0200015E RID: 350
8public class GUINPCDialogue
9{
10 // Token: 0x0600098E RID: 2446 RVA: 0x0002BC74 File Offset: 0x00029E74
11 public void LoadRegion()
12 {
13 float y = this.CachedTextSize.Y;
16 }
17
18 // Token: 0x0600098F RID: 2447 RVA: 0x0002BC94 File Offset: 0x00029E94
20 {
21 /*
22An exception occurred when decompiling this method (0600098F)
23
24ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean GUINPCDialogue::IsOver(Microsoft.Xna.Framework.Vector2)
25
26 ---> System.Exception: Basic block has to end with unconditional control flow.
27{
28 Block_0:
29 stloc:string(var_0_06, callgetter:string(GUINPCDialogue::get_DisplayString, ldloc:GUINPCDialogue(this)))
30 call:void(GUINPCDialogue::UpdateText, ldloc:GUINPCDialogue(this), ldloc:string(var_0_06))
31 stloc:float32(var_1_19, ldfld:float32(Vector2::Y, ldfld:Vector2[exp:valuetype Microsoft.Xna.Framework.Vector2&](GUINPCDialogue::CachedTextSize, ldloc:GUINPCDialogue(this))))
32 stloc:bool(var_5_22, callgetter:bool(ControllerActionManager::get_AnyControllerConnected))
33 stloc:int32(var_9_2D, ldfld:int32(GUINPCDialogue::NumberOfOptions, ldloc:GUINPCDialogue(this)))
34 stloc:int32(var_12_35, ldfld:int32(GUINPCDialogue::NumberOfOptions, ldloc:GUINPCDialogue(this)))
35}
36
37 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
38 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
39 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
40 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
41 --- End of inner exception stack trace ---
42 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
43 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
44*/;
45 }
46
47 // Token: 0x06000990 RID: 2448 RVA: 0x0002BCDC File Offset: 0x00029EDC
48 public void Close()
49 {
50 if (!true)
51 {
52 }
53 int myPlayer = Main.myPlayer;
56 bool editSign = Main.editSign;
58 Main.editSign = false;
60 Main.clrInput();
61 }
62
63 // Token: 0x06000991 RID: 2449 RVA: 0x0002BD2C File Offset: 0x00029F2C
64 private void SetupLastLineAddition()
65 {
66 int num = 1;
67 if (num == 0)
68 {
69 }
70 int myPlayer = Main.myPlayer;
71 if (num == 0)
72 {
73 }
76 }
77
78 // Token: 0x06000992 RID: 2450 RVA: 0x0002BD88 File Offset: 0x00029F88
79 private void ClearLastLineAddition()
80 {
81 if (!true)
82 {
83 }
84 }
85
86 // Token: 0x06000993 RID: 2451 RVA: 0x0002BD98 File Offset: 0x00029F98
87 private void UpdateText(string textValue)
88 {
89 bool flag = this.CachedTextValue != textValue;
90 }
91
92 // Token: 0x06000994 RID: 2452 RVA: 0x0002BF60 File Offset: 0x0002A160
94 {
95 int myPlayer = Main.myPlayer;
96 bool editSign = Main.editSign;
97 string textValue = Language.GetTextValue("LegacyInterface.47");
98 }
99
100 // Token: 0x06000995 RID: 2453 RVA: 0x0002C484 File Offset: 0x0002A684
101 public void LoadPanelRegion()
102 {
103 float y = this.CachedTextSize.Y;
106 }
107
108 // Token: 0x06000996 RID: 2454 RVA: 0x0002C4A4 File Offset: 0x0002A6A4
110 {
111 float y = this.CachedTextSize.Y;
113 return rectangle;
114 }
115
116 // Token: 0x06000997 RID: 2455 RVA: 0x0002C4C0 File Offset: 0x0002A6C0
117 public void CloseClicked()
118 {
119 if (!true)
120 {
121 }
122 int myPlayer = Main.myPlayer;
123 int myPlayer2 = Main.myPlayer;
125 bool editSign = Main.editSign;
127 Main.editSign = false;
128 Main.npcChatText = "";
129 }
130
131 // Token: 0x06000998 RID: 2456 RVA: 0x0002C50C File Offset: 0x0002A70C
132 public void Option1Clicked(int healCost)
133 {
134 int num = 1;
135 if (num == 0)
136 {
137 }
138 int myPlayer = Main.myPlayer;
139 bool editSign = Main.editSign;
140 if (num != 0)
141 {
142 int myPlayer2 = Main.myPlayer;
143 string npcChatText = Main.npcChatText;
144 Sign.TextSign(editSign ? 1 : 0, npcChatText);
145 Main.editSign = false;
146 bool netClient = Main.NetClient;
147 Main.clrInput();
149 return;
150 }
151 Main.editSign = true;
152 Main.clrInput();
153 }
154
155 // Token: 0x06000999 RID: 2457 RVA: 0x0002CBBC File Offset: 0x0002ADBC
156 public void HappinessClicked()
157 {
158 if (!true)
159 {
160 }
162 int myPlayer = Main.myPlayer;
163 int myPlayer2 = Main.myPlayer;
164 }
165
166 // Token: 0x0600099A RID: 2458 RVA: 0x0002CBE8 File Offset: 0x0002ADE8
167 public bool CanDryadPlayStardewAnimation(Player player, NPC npc)
168 {
169 bool isAir = player.HeldItem.IsAir;
170 float[] ai = npc.ai;
171 return isAir;
172 }
173
174 // Token: 0x0600099B RID: 2459 RVA: 0x0002CC0C File Offset: 0x0002AE0C
175 public void Option2Clicked()
176 {
177 int num = 1;
178 if (num == 0)
179 {
180 }
181 int myPlayer = Main.myPlayer;
182 if (num == 0)
183 {
184 }
185 int myPlayer2 = Main.myPlayer;
186 if (num == 0)
187 {
188 }
191 int myPlayer3 = Main.myPlayer;
193 int num2 = 5275;
194 int num3 = 1;
195 long num4 = 0L;
196 bool flag = localPlayer2.ConsumeItem(num2, num3 != 0, num4 != 0L);
197 }
198
199 // Token: 0x0600099C RID: 2460 RVA: 0x0002CE1C File Offset: 0x0002B01C
200 private void DrawSign()
201 {
202 if (!true)
203 {
204 }
205 int myPlayer = Main.myPlayer;
206 int myPlayer2 = Main.myPlayer;
207 Tile tile;
208 ushort type = tile.type;
209 }
210
211 // Token: 0x0600099D RID: 2461 RVA: 0x0002CEA0 File Offset: 0x0002B0A0
212 private void DrawNPC()
213 {
214 int num = 1;
215 if (num == 0)
216 {
217 }
218 int myPlayer = Main.myPlayer;
219 Rectangle region = this.GetRegion();
220 if (num == 0)
221 {
222 }
223 int myPlayer2 = Main.myPlayer;
224 }
225
226 // Token: 0x0600099E RID: 2462 RVA: 0x0002CF38 File Offset: 0x0002B138
227 private void DrawPartyHat(NPC n, SpriteEffects spriteEffects, Vector2 position, float scale)
228 {
229 bool flag = n.UsesPartyHat();
230 int y = n.frame.Y;
231 int height = n.frame.Height;
232 if (height == 0)
233 {
234 }
236 if (height == 0)
237 {
238 }
239 int type = n.type;
240 int spriteDirection = n.spriteDirection;
241 }
242
243 // Token: 0x170000F5 RID: 245
244 // (get) Token: 0x0600099F RID: 2463 RVA: 0x0002D02C File Offset: 0x0002B22C
245 private string DisplayString
246 {
247 get
248 {
249 if (!true)
250 {
251 }
252 string npcChatText = Main.npcChatText;
253 int myPlayer = Main.myPlayer;
254 int myPlayer2 = Main.myPlayer;
255 int myPlayer3 = Main.myPlayer;
257 int myPlayer4 = Main.myPlayer;
258 return Main.npcChatText;
259 }
260 }
261
262 // Token: 0x060009A0 RID: 2464 RVA: 0x0002D104 File Offset: 0x0002B304
263 public void Draw()
264 {
265 int myPlayer = Main.myPlayer;
266 int myPlayer2 = Main.myPlayer;
267 string displayString = this.DisplayString;
268 this.UpdateText(displayString);
269 float y = this.CachedTextSize.Y;
273 this._controller.Activate();
274 this.DrawNPC();
275 float y2 = this.CachedTextSize.Y;
276 int myPlayer3 = Main.myPlayer;
277 bool editSign = Main.editSign;
278 }
279
280 // Token: 0x060009A1 RID: 2465 RVA: 0x0002D288 File Offset: 0x0002B488
282 {
283 }
284
285 // Token: 0x0400095C RID: 2396
286 private float CachedLayoutSize;
287
288 // Token: 0x0400095D RID: 2397
289 private float CachedLayoutWrapSize;
290
291 // Token: 0x0400095E RID: 2398
293
294 // Token: 0x0400095F RID: 2399
296
297 // Token: 0x04000960 RID: 2400
298 private string CachedTextValue;
299
300 // Token: 0x04000961 RID: 2401
302
303 // Token: 0x04000962 RID: 2402
304 private string textBlinker;
305
306 // Token: 0x04000963 RID: 2403
307 public int NumberOfOptions;
308
309 // Token: 0x04000964 RID: 2404
310 public bool ShowHappiness;
311
312 // Token: 0x04000965 RID: 2405
314}
class f__AnonymousType0<< Count > j__TPar
static void SetGridItemRegion(Rectangle region)
void SetupLastLineAddition()
void Option1Clicked(int healCost)
bool IsOver(Vector2 cursorPosition)
string CachedTextMultilineValue
void UpdateText(string textValue)
void SetupButtonText(string focusText, Texture2D option1Tex, string focusText3, Texture2D option2Tex, int cost, bool showHappiness)
bool CanDryadPlayStardewAnimation(Player player, NPC npc)
GUIControllerNPCDialogue _controller
Rectangle GetRegion()
void ClearLastLineAddition()
void DrawPartyHat(NPC n, SpriteEffects spriteEffects, Vector2 position, float scale)
bool IsAir
Definition Item.cs:1820
static string GetDryadWorldStatusDialog([Out] bool worldIsEntirelyPure)
Definition Lang.cs:276
static string GetTextValue(string key)
Definition Language.cs:54
static string npcChatText
Definition Main.cs:2463
static int myPlayer
Definition Main.cs:2337
static bool editSign
Definition Main.cs:2393
static bool NetClient
Definition Main.cs:5438
static void CloseKeyboard()
Definition Main.cs:8523
static void clrInput()
Definition Main.cs:8459
static Player LocalPlayer
Definition Main.cs:5267
int spriteDirection
Definition NPC.cs:11489
float[] ai
Definition NPC.cs:11384
bool UsesPartyHat()
Definition NPC.cs:4384
PartyHatColor GetPartyHatColor()
Definition NPC.cs:4409
Rectangle frame
Definition NPC.cs:11441
bool ConsumeItem(int type, bool reverseOrder=false, bool includeVoidBag=false)
Definition Player.cs:3593
static void TextSign(int i, string text)
Definition Sign.cs:32
ushort type
Definition Tile.cs:58