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

◆ NotifyNPCKilled()

static void Terraria.GameContent.Achievements.AchievementsHelper.NotifyNPCKilled ( NPC npc)
inlinestatic

Definition at line 189 of file AchievementsHelper.cs.

190 {
191 if (Main.netMode == 0)
192 {
193 if (npc.playerInteraction[Main.myPlayer])
194 {
195 NotifyNPCKilledDirect(Main.player[Main.myPlayer], npc.netID);
196 }
197 return;
198 }
199 for (int i = 0; i < 255; i++)
200 {
201 if (npc.playerInteraction[i])
202 {
203 NetMessage.SendData(97, i, -1, null, npc.netID);
204 }
205 }
206 }
static void NotifyNPCKilledDirect(Player player, int npcNetID)

References Terraria.Main.myPlayer, Terraria.NPC.netID, Terraria.Main.netMode, Terraria.GameContent.Achievements.AchievementsHelper.NotifyNPCKilledDirect(), Terraria.Main.player, Terraria.NPC.playerInteraction, and Terraria.NetMessage.SendData().

Referenced by Terraria.NPC.CountKillForAchievements().