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

◆ GetPickedUpByMonsters_Special()

void Terraria.Item.GetPickedUpByMonsters_Special ( int i)
inlineprivate

Definition at line 49018 of file Item.cs.

49019 {
49020 bool flag = false;
49021 bool flag2 = false;
49022 int num = type;
49023 if ((num == 89 || num == 3507) && !NPC.unlockedSlimeCopperSpawn)
49024 {
49025 flag = true;
49026 flag2 = true;
49027 }
49028 if (!flag2)
49029 {
49030 return;
49031 }
49032 bool flag3 = false;
49033 Rectangle hitbox = base.Hitbox;
49034 for (int j = 0; j < 200; j++)
49035 {
49036 NPC nPC = Main.npc[j];
49037 if (nPC.active && flag && nPC.type >= 0 && nPC.type < NPCID.Count && NPCID.Sets.CanConvertIntoCopperSlimeTownNPC[nPC.type] && hitbox.Intersects(nPC.Hitbox))
49038 {
49039 flag3 = true;
49040 NPC.TransformCopperSlime(j);
49041 break;
49042 }
49043 }
49044 if (flag3)
49045 {
49046 SetDefaults();
49047 active = false;
49048 NetMessage.SendData(21, -1, -1, null, i);
49049 }
49050 }
static bool[] CanConvertIntoCopperSlimeTownNPC
Definition NPCID.cs:4103
static readonly short Count
Definition NPCID.cs:11744
void SetDefaults(int Type=0)
Definition Item.cs:47332

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

Referenced by Terraria.Item.UpdateItem().