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
UnlockableNPCEntryIcon.cs
Go to the documentation of this file.
1using System;
8
10{
11 // Token: 0x02000943 RID: 2371
13 {
14 // Token: 0x0600479B RID: 18331 RVA: 0x0025ED5C File Offset: 0x0025CF5C
15 public UnlockableNPCEntryIcon(int npcNetId, float ai0 = 0f, float ai1 = 0f, float ai2 = 0f, float ai3 = 0f, [Optional] string overrideNameKey)
16 {
18 int npcNetId2 = this._npcNetId;
19 float[] ai4 = this._npcCache.ai;
21 }
22
23 // Token: 0x0600479C RID: 18332 RVA: 0x0025ED94 File Offset: 0x0025CF94
25 {
26 /*
27An exception occurred when decompiling this method (0600479C)
28
29ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.GameContent.Bestiary.IEntryIcon Terraria.GameContent.Bestiary.UnlockableNPCEntryIcon::CreateClone()
30
31 ---> System.Exception: Basic block has to end with unconditional control flow.
32{
33 Block_0:
34 stloc:int32(var_0_06, ldfld:int32(UnlockableNPCEntryIcon::_npcNetId, ldloc:UnlockableNPCEntryIcon(this)))
35 stloc:string(var_1_0D, ldfld:string(UnlockableNPCEntryIcon::_overrideNameKey, ldloc:UnlockableNPCEntryIcon(this)))
36}
37
38 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
39 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
40 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
41 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
42 --- End of inner exception stack trace ---
43 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
44 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
45*/;
46 }
47
48 // Token: 0x0600479D RID: 18333 RVA: 0x0025EDB0 File Offset: 0x0025CFB0
50 {
51 int num = 1;
52 if (num == 0)
53 {
54 }
55 int npcNetId = this._npcNetId;
56 NPC npcCache = this._npcCache;
57 npcCache.rotation = (float)num;
58 npcCache.scale = (float)num;
59 if (num != 0)
60 {
61 }
62 if (num != 0)
63 {
64 }
65 if (num == 0)
66 {
67 }
68 }
69
70 // Token: 0x0600479E RID: 18334 RVA: 0x0025EE98 File Offset: 0x0025D098
72 {
73 if (this._npcCache.noGravity)
74 {
75 Point point;
76 Vector2 vector = point.ToVector2();
77 float x = this._positionOffsetCache.X;
78 float y = this._positionOffsetCache.Y;
79 return;
80 }
81 float x2 = this._positionOffsetCache.X;
82 float y2 = this._positionOffsetCache.Y;
83 NPC npcCache = this._npcCache;
84 float x3 = npcCache.position.X;
85 float y3 = npcCache.position.Y;
86 }
87
88 // Token: 0x0600479F RID: 18335 RVA: 0x0025EF24 File Offset: 0x0025D124
90 {
91 int num = 1;
92 if (num == 0)
93 {
94 }
95 int npcNetId = this._npcNetId;
96 float[] ai;
97 if (num == 0)
98 {
99 NPC npcCache = this._npcCache;
100 float x = npcCache.position.X;
101 float y = npcCache.position.Y;
102 float rotation = npcCache.rotation;
103 if (npcCache == null)
104 {
105 }
106 ai = this._npcCache.ai;
107 }
108 int num2 = this.lastFrameVisualsUpdated;
109 if (ai == null)
110 {
111 }
112 if (ai == null)
113 {
114 }
115 int npcNetId2 = this._npcNetId;
116 NPC npcCache2 = this._npcCache;
117 }
118
119 // Token: 0x060047A0 RID: 18336 RVA: 0x0025F034 File Offset: 0x0025D234
120 private void SimulateFirstHover(float velocity)
121 {
122 if (this._firstUpdateDone)
123 {
124 return;
125 }
126 NPC npcCache = this._npcCache;
128 npcCache.SetFrameSize();
129 NPC npcCache2 = this._npcCache;
130 int direction = npcCache2.direction;
131 npcCache2.velocity.X = (float)direction;
132 npcCache2.FindFrame();
133 }
134
135 // Token: 0x060047A1 RID: 18337 RVA: 0x0025F080 File Offset: 0x0025D280
136 public void Draw(BestiaryUICollectionInfo providedInfo, SpriteBatch spriteBatch, EntryIconDrawSettings settings)
137 {
139 if (customTexture != null)
140 {
141 Vector2 center = this._npcCache.Center;
142 if (customTexture == null)
143 {
144 }
146 if (customTexture == null)
147 {
148 }
150 if (customTexture == null)
151 {
152 }
153 float scale = this._npcCache.scale;
154 return;
155 }
156 bool townNPC = this._npcCache.townNPC;
157 if (townNPC)
158 {
160 if (!townNPC)
161 {
162 npcCache = this._npcCache;
163 }
164 int type = npcCache.type;
165 if (npcCache == null)
166 {
167 }
168 NPC npcCache2 = this._npcCache;
169 if (townNPC)
170 {
171 }
172 return;
173 }
174 bool behindTiles = this._npcCache.behindTiles;
175 int num = 1;
176 if (num == 0)
177 {
178 }
179 int value = num.m_value;
180 }
181
182 // Token: 0x060047A2 RID: 18338 RVA: 0x0025F128 File Offset: 0x0025D328
183 public string GetHoverText(BestiaryUICollectionInfo providedInfo)
184 {
186 bool flag = string.IsNullOrWhiteSpace(this._overrideNameKey);
188 }
189
190 // Token: 0x060047A3 RID: 18339 RVA: 0x000021DB File Offset: 0x000003DB
191 public bool GetUnlockState(BestiaryUICollectionInfo providedInfo)
192 {
193 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
194 }
195
196 // Token: 0x0400836E RID: 33646
198
199 // Token: 0x0400836F RID: 33647
200 private int _npcNetId;
201
202 // Token: 0x04008370 RID: 33648
203 private NPC _npcCache;
204
205 // Token: 0x04008371 RID: 33649
206 private bool _firstUpdateDone;
207
208 // Token: 0x04008372 RID: 33650
210
211 // Token: 0x04008373 RID: 33651
213
214 // Token: 0x04008374 RID: 33652
215 private string _overrideNameKey;
216 }
217}
class f__AnonymousType0<< Count > j__TPar
Vector2 Center
Definition Entity.cs:134
Vector2 position
Definition Entity.cs:460
string GetHoverText(BestiaryUICollectionInfo providedInfo)
void AdjustSpecialSpawnRulesForVisuals(EntryIconDrawSettings settings)
void Draw(BestiaryUICollectionInfo providedInfo, SpriteBatch spriteBatch, EntryIconDrawSettings settings)
void Update(BestiaryUICollectionInfo providedInfo, Rectangle hitbox, EntryIconDrawSettings settings)
UnlockableNPCEntryIcon(int npcNetId, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, [Optional] string overrideNameKey)
bool GetUnlockState(BestiaryUICollectionInfo providedInfo)
static string GetNPCNameValue(int netID)
Definition Lang.cs:93
static string GetTextValue(string key)
Definition Language.cs:54
bool noGravity
Definition NPC.cs:11468
float[] ai
Definition NPC.cs:11384
void SetFrameSize()
Definition NPC.cs:4434
float scale
Definition NPC.cs:11453
bool behindTiles
Definition NPC.cs:11492
int netID
Definition NPC.cs:11510
bool townNPC
Definition NPC.cs:11519
static Vector2 Size(this Asset< Texture2D > tex)
Definition Utils.cs:736