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
TownNPCProfiles.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x020007FA RID: 2042
8 public class TownNPCProfiles
9 {
10 // Token: 0x0600418A RID: 16778 RVA: 0x00247F14 File Offset: 0x00246114
11 public bool GetProfile(int npcId, [Out] ITownNPCProfile profile)
12 {
13 /*
14An exception occurred when decompiling this method (0600418A)
15
16ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.TownNPCProfiles::GetProfile(System.Int32,Terraria.GameContent.ITownNPCProfile)
17
18 ---> System.Exception: Basic block has to end with unconditional control flow.
19{
20 Block_0:
21 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<int32, class Terraria.GameContent.ITownNPCProfile>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<int32, class Terraria.GameContent.ITownNPCProfile>(TownNPCProfiles::_townNPCProfiles, ldloc:TownNPCProfiles(this)))
22}
23
24 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
25 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
26 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
27 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
28 --- End of inner exception stack trace ---
29 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
30 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
31*/;
32 }
33
34 // Token: 0x0600418B RID: 16779 RVA: 0x00247F28 File Offset: 0x00246128
36 {
37 string text2;
38 string text = "Images/TownNPCs/Shimmered/" + text2;
40 }
41
42 // Token: 0x0600418C RID: 16780 RVA: 0x00247F48 File Offset: 0x00246148
44 {
45 string text2;
46 string text = "Images/TownNPCs/Shimmered/" + text2;
48 }
49
50 // Token: 0x0600418D RID: 16781 RVA: 0x00247F68 File Offset: 0x00246168
51 public static int GetHeadIndexSafe(NPC npc)
52 {
53 if (!true)
54 {
55 }
56 return NPC.TypeToDefaultHeadIndex(int.MinValue);
57 }
58
59 // Token: 0x0600418E RID: 16782 RVA: 0x00247F8C File Offset: 0x0024618C
61 {
62 long num = 0L;
63 long num2 = 0L;
65 long num3 = 0L;
66 long num4 = 0L;
68 long num5 = 0L;
69 long num6 = 0L;
71 long num7 = 0L;
72 long num8 = 0L;
74 long num9 = 0L;
75 long num10 = 0L;
77 long num11 = 0L;
78 long num12 = 0L;
80 long num13 = 0L;
81 long num14 = 0L;
83 long num15 = 0L;
84 long num16 = 0L;
86 long num17 = 0L;
88 long num18 = 0L;
91 ITownNPCProfile townNPCProfile12 = TownNPCProfiles.LegacyWithSimpleShimmer("Demolitionist", 4, 59, true, true);
93 long num19 = 0L;
98 long num20 = 0L;
102 long num21 = 0L;
105 ITownNPCProfile townNPCProfile23 = TownNPCProfiles.LegacyWithSimpleShimmer("TaxCollector", 23, 70, true, true);
108 long num22 = 0L;
110 ITownNPCProfile townNPCProfile27 = TownNPCProfiles.LegacyWithSimpleShimmer("TravelingMerchant", 21, 80, true, true);
111 if (("Siamese" == null || "Siamese" != null) && ("Black" == null || "Black" != null) && ("OrangeTabby" == null || "OrangeTabby" != null) && ("RussianBlue" == null || "RussianBlue" != null) && ("Silver" == null || "Silver" != null) && ("White" == null || "White" != null) && ("Labrador" == null || "Labrador" != null) && ("PitBull" == null || "PitBull" != null) && ("Beagle" == null || "Beagle" != null) && ("Corgi" == null || "Corgi" != null) && ("Dalmation" == null || "Dalmation" != null) && ("Husky" == null || "Husky" != null) && ("White" == null || "White" != null) && ("Angora" == null || "Angora" != null) && ("Dutch" == null || "Dutch" != null) && ("Flemish" == null || "Flemish" != null) && ("Lop" == null || "Lop" != null) && ("Silver" == null || "Silver" != null))
112 {
113 return;
114 }
115 throw new ArrayTypeMismatchException();
116 }
117
118 // Token: 0x0600418F RID: 16783 RVA: 0x002482F0 File Offset: 0x002464F0
119 // Note: this type is marked as 'beforefieldinit'.
121 {
122 }
123
124 // Token: 0x0400806D RID: 32877
125 private const string DefaultNPCFileFolderPath = "Images/TownNPCs/";
126
127 // Token: 0x0400806E RID: 32878
128 private const string ShimmeredNPCFileFolderPath = "Images/TownNPCs/Shimmered/";
129
130 // Token: 0x0400806F RID: 32879
131 private static readonly int[] CatHeadIDs;
132
133 // Token: 0x04008070 RID: 32880
134 private static readonly int[] DogHeadIDs;
135
136 // Token: 0x04008071 RID: 32881
137 private static readonly int[] BunnyHeadIDs;
138
139 // Token: 0x04008072 RID: 32882
140 private static readonly int[] SlimeHeadIDs;
141
142 // Token: 0x04008073 RID: 32883
144
145 // Token: 0x04008074 RID: 32884
147 }
148}
class f__AnonymousType0<< Count > j__TPar
Dictionary< int, ITownNPCProfile > _townNPCProfiles
static ITownNPCProfile TransformableWithSimpleShimmer(string subPath, int headIdNormal, int headIdShimmered, bool uniqueCreditTexture=true, bool uniqueCreditTextureShimmered=true)
bool GetProfile(int npcId, [Out] ITownNPCProfile profile)
static ITownNPCProfile LegacyWithSimpleShimmer(string subPath, int headIdNormal, int headIdShimmered, bool uniquePartyTexture=true, bool uniquePartyTextureShimmered=true)
static int TypeToDefaultHeadIndex(int type)
Definition NPC.cs:1002