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

◆ SpawnBoss()

static void Terraria.NPC.SpawnBoss ( int spawnPositionX,
int spawnPositionY,
int Type,
int targetPlayerIndex )
inlinestatic

Definition at line 91149 of file NPC.cs.

91150 {
91151 //IL_015c: Unknown result type (might be due to invalid IL or missing references)
91152 //IL_020c: Unknown result type (might be due to invalid IL or missing references)
91153 //IL_0270: Unknown result type (might be due to invalid IL or missing references)
91154 int num = 200;
91155 if (Type == 127 && mechQueen != -1)
91156 {
91158 Main.npc[mechQueen].ai[3] = mechQueen;
91159 }
91160 else
91161 {
91163 }
91164 if (num == 200)
91165 {
91166 return;
91167 }
91168 Main.npc[num].target = targetPlayerIndex;
91169 Main.npc[num].timeLeft *= 20;
91170 string typeName = Main.npc[num].TypeName;
91171 if (Main.netMode == 2 && num < 200)
91172 {
91173 NetMessage.SendData(23, -1, -1, null, num);
91174 }
91175 if (Type == 134 || Type == 127 || Type == 126 || Type == 125)
91176 {
91178 }
91179 if (Type == 127 && mechQueen == num)
91180 {
91181 if (Main.netMode == 0)
91182 {
91183 Main.NewText(Lang.misc[107].Value, 175, 75);
91184 }
91185 else if (Main.netMode == 2)
91186 {
91187 ChatHelper.BroadcastChatMessage(Lang.misc[107].ToNetworkText(), new Color(175, 75, 255));
91188 }
91189 return;
91190 }
91191 switch (Type)
91192 {
91193 case 125:
91194 if (Main.netMode == 0)
91195 {
91196 Main.NewText(Lang.misc[48].Value, 175, 75);
91197 }
91198 else if (Main.netMode == 2)
91199 {
91200 ChatHelper.BroadcastChatMessage(Lang.misc[48].ToNetworkText(), new Color(175, 75, 255));
91201 }
91202 return;
91203 case 50:
91204 case 82:
91205 case 126:
91206 case 316:
91207 case 398:
91208 case 551:
91209 case 662:
91210 return;
91211 }
91212 if (Main.netMode == 0)
91213 {
91214 Main.NewText(Language.GetTextValue("Announcement.HasAwoken", typeName), 175, 75);
91215 }
91216 else if (Main.netMode == 2)
91217 {
91218 ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", Main.npc[num].GetTypeNetName()), new Color(175, 75, 255));
91219 }
91220 }
static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer=-1)
Definition ChatHelper.cs:51
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
static NetworkText FromKey(string key, params object[] substitutions)
Creates a NetworkText object from a localization key and optional substitutions. The receiving client...
Represents text that will be sent over the network in multiplayer and displayed to the receiving user...
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 IEntitySource GetBossSpawnSource(int targetPlayerIndex)
Definition NPC.cs:91144
static int mechQueen
Definition NPC.cs:1223

References Terraria.Chat.ChatHelper.BroadcastChatMessage(), Terraria.GameContent.Achievements.AchievementsHelper.CheckMechaMayhem(), Terraria.Localization.NetworkText.FromKey(), Terraria.Localization.Language.GetTextValue(), Terraria.Lang.misc, Terraria.Main.netMode, Terraria.Main.NewText(), Terraria.Main.npc, and Terraria.NetMessage.SendData().

Referenced by Terraria.NPC.DoDeathEvents().

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