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
CommonCode.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x02000877 RID: 2167
8 public static class CommonCode
9 {
10 // Token: 0x060043E5 RID: 17381 RVA: 0x0024EA04 File Offset: 0x0024CC04
11 public static void DropItemFromNPC(NPC npc, int itemId, int stack, bool scattered = false)
12 {
13 float x = npc.position.X;
14 float y = npc.position.Y;
15 int width = npc.width;
16 bool wet = npc.wet;
17 if (32640 == 0)
18 {
19 }
20 int width2 = npc.width;
21 float y2 = npc.position.Y;
22 int height = npc.height;
23 }
24
25 // Token: 0x060043E6 RID: 17382 RVA: 0x0024EA7C File Offset: 0x0024CC7C
26 public static void DropItemLocalPerClientAndSetNPCMoneyTo0(NPC npc, int itemId, int stack, bool interactionRequired = true)
27 {
28 if (5456 == 0)
29 {
30 }
31 bool netHost = Main.NetHost;
33 float x = npc.position.X;
34 float y = npc.position.Y;
35 int width = npc.width;
36 bool wet = npc.wet;
37 int num = 32640;
38 if (num == 0)
39 {
40 }
41 int num2 = 54000;
42 if (num == 0)
43 {
44 }
45 if (num != 0)
46 {
47 if (num2 == 0)
48 {
49 }
50 if (num != 0)
51 {
52 if (npc.playerInteraction == null)
53 {
54 }
55 int myPlayer = Main.myPlayer;
56 return;
57 }
58 }
59 }
60
61 // Token: 0x060043E7 RID: 17383 RVA: 0x0024EB94 File Offset: 0x0024CD94
62 public static void DropItemForEachInteractingPlayerOnThePlayer(NPC npc, int itemId, UnifiedRandom rng, int chanceNumerator, int chanceDenominator, int stack = 1, bool interactionRequired = true)
63 {
64 int num = 1;
65 if (num == 0)
66 {
67 }
68 bool netHost = Main.NetHost;
69 if (num == 0)
70 {
71 }
72 if (interactionRequired && num != 0)
73 {
74 bool[] playerInteraction = npc.playerInteraction;
75 int num2 = rng.Next(chanceDenominator);
77 int num3;
79 }
80 }
81
82 // Token: 0x060043E8 RID: 17384 RVA: 0x0024EC08 File Offset: 0x0024CE08
83 public static void ModifyItemDropFromNPC(NPC npc, int itemIndex)
84 {
85 if (!true)
86 {
87 }
88 int type = npc.type;
89 int netID = npc.netID;
90 if (netID == 0)
91 {
92 }
93 if (netID != 0)
94 {
95 int type2 = npc.type;
96 return;
97 }
98 }
99 }
100}
class f__AnonymousType0<< Count > j__TPar
Vector2 position
Definition Entity.cs:460
static void DropItemForEachInteractingPlayerOnThePlayer(NPC npc, int itemId, UnifiedRandom rng, int chanceNumerator, int chanceDenominator, int stack=1, bool interactionRequired=true)
Definition CommonCode.cs:62
static void DropItemFromNPC(NPC npc, int itemId, int stack, bool scattered=false)
Definition CommonCode.cs:11
static void DropItemLocalPerClientAndSetNPCMoneyTo0(NPC npc, int itemId, int stack, bool interactionRequired=true)
Definition CommonCode.cs:26
static void ModifyItemDropFromNPC(NPC npc, int itemIndex)
Definition CommonCode.cs:83
static bool NetHost
Definition Main.cs:5544
static int myPlayer
Definition Main.cs:2337
bool[] playerInteraction
Definition NPC.cs:11141
IEntitySource GetItemSource_Loot()
Definition NPC.cs:7712
int netID
Definition NPC.cs:11510