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

◆ AnyInteractions()

bool Terraria.NPC.AnyInteractions ( )
inline

Returns true if any player has damaged this NPC. Individual player participation can be determined by checking F:Terraria.NPC.playerInteraction directly. Use M:Terraria.NPC.GetWereThereAnyInteractions if F:Terraria.NPC.realLife might be in use.

Returns

Definition at line 84401 of file NPC.cs.

84402 {
84403 if (Main.netMode == 0)
84404 {
84405 if (playerInteraction[Main.myPlayer])
84406 {
84407 return true;
84408 }
84409 }
84410 else
84411 {
84412 for (int i = 0; i < 255; i++)
84413 {
84414 if (playerInteraction[i])
84415 {
84416 return true;
84417 }
84418 }
84419 }
84420 return false;
84421 }
bool[] playerInteraction
Tracks which T:Terraria.Players have damaged this NPC. Damaging boss minions or other parts of a boss...
Definition NPC.cs:529

References Terraria.Main.myPlayer, Terraria.Main.netMode, and Terraria.NPC.playerInteraction.

Referenced by Terraria.NPC.DoDeathEvents(), and Terraria.NPC.NPCLoot().

+ Here is the caller graph for this function: