TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ GetPickedUpByMonsters_Special()

void Terraria.Item.GetPickedUpByMonsters_Special ( int i)
inlineprivate

Definition at line 50735 of file Item.cs.

50736 {
50737 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
50738 //IL_002f: Unknown result type (might be due to invalid IL or missing references)
50739 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
50740 bool flag = false;
50741 bool flag2 = false;
50742 int num = type;
50743 if ((num == 89 || num == 3507) && !NPC.unlockedSlimeCopperSpawn)
50744 {
50745 flag = true;
50746 flag2 = true;
50747 }
50748 if (!flag2)
50749 {
50750 return;
50751 }
50752 bool flag3 = false;
50753 Rectangle hitbox = base.Hitbox;
50754 for (int j = 0; j < 200; j++)
50755 {
50756 NPC nPC = Main.npc[j];
50757 if (nPC.active && flag && nPC.type >= 0 && NPCID.Sets.CanConvertIntoCopperSlimeTownNPC[nPC.type] && ((Rectangle)(ref hitbox)).Intersects(nPC.Hitbox))
50758 {
50759 flag3 = true;
50760 NPC.TransformCopperSlime(j);
50761 break;
50762 }
50763 }
50764 if (flag3)
50765 {
50766 SetDefaults();
50767 active = false;
50768 NetMessage.SendData(21, -1, -1, null, i);
50769 }
50770 }
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
static bool[] CanConvertIntoCopperSlimeTownNPC
If true for a given NPC type (F:Terraria.NPC.type), then that NPC can pick up F:Terraria....
Definition NPCID.cs:238
void SetDefaults(int Type=0)
Definition Item.cs:48800
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
Definition Item.cs:345

References Terraria.Entity.active, Terraria.ID.NPCID.Sets.CanConvertIntoCopperSlimeTownNPC, Terraria.Main.npc, Terraria.NetMessage.SendData(), Terraria.Item.SetDefaults(), Terraria.NPC.TransformCopperSlime(), Terraria.Item.type, and Terraria.NPC.unlockedSlimeCopperSpawn.

Referenced by Terraria.Item.UpdateItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: