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

◆ DoDeathEvents_CelebrateBossDeath()

void Terraria.NPC.DoDeathEvents_CelebrateBossDeath ( string typeName)
inlineprivate

Definition at line 84627 of file NPC.cs.

84628 {
84629 //IL_007a: Unknown result type (might be due to invalid IL or missing references)
84630 //IL_0156: Unknown result type (might be due to invalid IL or missing references)
84631 //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
84632 if (type == 125 || type == 126)
84633 {
84634 if (Main.netMode == 0)
84635 {
84636 Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Plural", Language.GetTextValue("Enemies.TheTwins")), 175, 75);
84637 }
84638 else if (Main.netMode == 2)
84639 {
84640 ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Plural", NetworkText.FromKey("Enemies.TheTwins")), new Color(175, 75, 255));
84641 }
84642 }
84643 else if (type == 398)
84644 {
84645 if (Main.netMode == 0)
84646 {
84647 Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Single", Language.GetTextValue("Enemies.MoonLord")), 175, 75);
84648 }
84649 else if (Main.netMode == 2)
84650 {
84651 ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Single", NetworkText.FromKey("Enemies.MoonLord")), new Color(175, 75, 255));
84652 }
84653 }
84654 else if (Main.netMode == 0)
84655 {
84656 Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Single", typeName), 175, 75);
84657 }
84658 else if (Main.netMode == 2)
84659 {
84660 ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Single", GetTypeNetName()), new Color(175, 75, 255));
84661 }
84662 }
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...
NetworkText GetTypeNetName()
Definition NPC.cs:2289
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990

References Terraria.Chat.ChatHelper.BroadcastChatMessage(), Terraria.Localization.NetworkText.FromKey(), Terraria.Localization.Language.GetTextValue(), Terraria.NPC.GetTypeNetName(), Terraria.Main.netMode, Terraria.Main.NewText(), and Terraria.NPC.type.

Referenced by Terraria.NPC.DoDeathEvents().

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