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
NPCKillsTracker.cs
Go to the documentation of this file.
1using System;
3using System.IO;
6using Terraria.Net;
7
9{
10 // Token: 0x0200093D RID: 2365
12 {
13 // Token: 0x0600476E RID: 18286 RVA: 0x0025E620 File Offset: 0x0025C820
15 {
16 }
17
18 // Token: 0x0600476F RID: 18287 RVA: 0x0025E634 File Offset: 0x0025C834
19 public void RegisterKill(NPC npc)
20 {
25 long num = 0L;
26 long num2 = 0L;
28 if (num == 0L)
29 {
30 bool netHost = Main.NetHost;
32 return;
33 }
34 throw new OutOfMemoryException();
35 }
36
37 // Token: 0x06004770 RID: 18288 RVA: 0x0025E6A0 File Offset: 0x0025C8A0
38 public int GetKillCount(NPC npc)
39 {
41 return this.GetKillCount(bestiaryCreditId);
42 }
43
44 // Token: 0x06004771 RID: 18289 RVA: 0x0025E6BC File Offset: 0x0025C8BC
45 public void SetKillCountDirectly(string persistentId, int killCount)
46 {
49 long num = 0L;
51 if (num == 0L)
52 {
53 return;
54 }
55 throw new OutOfMemoryException();
56 }
57
58 // Token: 0x06004772 RID: 18290 RVA: 0x0025E708 File Offset: 0x0025C908
59 public int GetKillCount(string persistentId)
60 {
61 /*
62An exception occurred when decompiling this method (06004772)
63
64ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.GameContent.Bestiary.NPCKillsTracker::GetKillCount(System.String)
65
66 ---> System.Exception: Basic block has to end with unconditional control flow.
67{
68 Block_0:
69 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>(NPCKillsTracker::_killCountsByNpcId, ldloc:NPCKillsTracker(this)))
70}
71
72 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
73 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
74 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
75 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
76 --- End of inner exception stack trace ---
77 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
78 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
79*/;
80 }
81
82 // Token: 0x06004773 RID: 18291 RVA: 0x0025E71C File Offset: 0x0025C91C
89
90 // Token: 0x06004774 RID: 18292 RVA: 0x0025E788 File Offset: 0x0025C988
95
96 // Token: 0x06004775 RID: 18293 RVA: 0x0025E79C File Offset: 0x0025C99C
98 {
99 }
100
101 // Token: 0x06004776 RID: 18294 RVA: 0x0025E7AC File Offset: 0x0025C9AC
106
107 // Token: 0x06004777 RID: 18295 RVA: 0x0025E7C0 File Offset: 0x0025C9C0
109 {
111 if (!true)
112 {
113 }
114 if (!true)
115 {
116 }
117 }
118
119 // Token: 0x0400835F RID: 33631
120 private object _entryCreationLock;
121
122 // Token: 0x04008360 RID: 33632
123 public const int POSITIVE_KILL_COUNT_CAP = 999999999;
124
125 // Token: 0x04008361 RID: 33633
127 }
128}
class f__AnonymousType0<< Count > j__TPar
static void Exit(object obj)
Definition Monitor.cs:47
void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn)
void Load(BinaryReader reader, int gameVersionSaveWasMadeOn)
void SetKillCountDirectly(string persistentId, int killCount)
static NetPacket SerializeKillCount(int npcNetId, int killcount)
static bool NetHost
Definition Main.cs:5544
string GetBestiaryCreditId()
Definition NPC.cs:10657
int netID
Definition NPC.cs:11510