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

◆ SpawnMechQueen()

static bool Terraria.NPC.SpawnMechQueen ( int onWhichPlayer)
inlinestatic

Definition at line 14718 of file NPC.cs.

14719 {
14720 //IL_008f: Unknown result type (might be due to invalid IL or missing references)
14721 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
14722 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)
14723 //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
14724 //IL_0137: Unknown result type (might be due to invalid IL or missing references)
14725 //IL_014d: Unknown result type (might be due to invalid IL or missing references)
14726 //IL_018e: Unknown result type (might be due to invalid IL or missing references)
14727 //IL_01a4: Unknown result type (might be due to invalid IL or missing references)
14728 //IL_01e2: Unknown result type (might be due to invalid IL or missing references)
14729 //IL_01f8: Unknown result type (might be due to invalid IL or missing references)
14730 if (AnyNPCs(127) || AnyNPCs(134) || AnyNPCs(125) || AnyNPCs(126))
14731 {
14732 return false;
14733 }
14734 if (!Main.remixWorld && !Main.getGoodWorld)
14735 {
14736 return false;
14737 }
14738 if (Main.netMode == 1)
14739 {
14740 NetMessage.SendData(61, -1, -1, null, onWhichPlayer, -16f);
14741 }
14742 else
14743 {
14744 mechQueen = -2;
14746 mechQueen = FindFirstNPC(127);
14747 NewNPC(GetBossSpawnSource(onWhichPlayer), (int)Main.npc[mechQueen].Center.X, (int)Main.npc[mechQueen].Center.Y, 125, 1);
14748 NewNPC(GetBossSpawnSource(onWhichPlayer), (int)Main.npc[mechQueen].Center.X, (int)Main.npc[mechQueen].Center.Y, 126, 1);
14749 int num = NewNPC(GetBossSpawnSource(onWhichPlayer), (int)Main.npc[mechQueen].Center.X, (int)Main.npc[mechQueen].Center.Y, 134, 1);
14750 NewNPC(GetBossSpawnSource(onWhichPlayer), (int)Main.npc[mechQueen].Center.X, (int)Main.npc[mechQueen].Center.Y, 139, 1, 0f, 0f, num, -1f);
14751 NewNPC(GetBossSpawnSource(onWhichPlayer), (int)Main.npc[mechQueen].Center.X, (int)Main.npc[mechQueen].Center.Y, 139, 1, 0f, 0f, num, 1f);
14752 }
14753 return true;
14754 }
static int FindFirstNPC(int Type)
Returns the index within F:Terraria.Main.npc of the the first active NPC in the world of the given NP...
Definition NPC.cs:106632
static bool AnyNPCs(int Type)
Returns true if there are any active NPC in the world of the given NPC type (F:Terraria....
Definition NPC.cs:106615
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
Spawns an NPC into the game world with the given type. This method should not be called on multipla...
Definition NPC.cs:91239
static void SpawnOnPlayer(int plr, int Type)
Definition NPC.cs:90808
static IEntitySource GetBossSpawnSource(int targetPlayerIndex)
Definition NPC.cs:91144
static int mechQueen
Definition NPC.cs:1223

References Terraria.NPC.AnyNPCs(), Terraria.NPC.FindFirstNPC(), Terraria.NPC.GetBossSpawnSource(), Terraria.Main.getGoodWorld, Terraria.NPC.mechQueen, Terraria.Main.netMode, Terraria.NPC.NewNPC(), Terraria.Main.npc, Terraria.Main.remixWorld, Terraria.NetMessage.SendData(), and Terraria.NPC.SpawnOnPlayer().

Referenced by Terraria.MessageBuffer.GetData(), Terraria.Player.ItemCheck_UseBossSpawners(), and Terraria.Main.UpdateTime().

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