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

◆ DoDeathEvents_BeforeLoot()

void Terraria.NPC.DoDeathEvents_BeforeLoot ( Player closestPlayer)
inlineprivate

Definition at line 84525 of file NPC.cs.

84526 {
84527 if ((uint)(type - 125) <= 1u && AnyNPCs((type == 125) ? 126 : 125))
84528 {
84529 value = 0f;
84530 boss = false;
84531 }
84532 }
bool boss
Set to true if the NPC is a boss. Prevents off-screen despawn. Bosses also need [AutoloadBossHead] an...
Definition NPC.cs:1141
float value
How many copper coins the NPC will drop when killed (100 copper coins = 1 silver coin etc....
Definition NPC.cs:1156
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
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.NPC.AnyNPCs(), Terraria.NPC.boss, Terraria.NPC.type, and Terraria.NPC.value.

Referenced by Terraria.NPC.NPCLoot().

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