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

◆ GetLifeStats()

void Terraria.NPC.GetLifeStats ( out int statLife,
out int statLifeMax )
inline

Definition at line 2294 of file NPC.cs.

2295 {
2296 statLife = life;
2297 statLifeMax = lifeMax;
2298 if (realLife != -1)
2299 {
2300 statLife = Main.npc[realLife].life;
2301 statLifeMax = Main.npc[realLife].lifeMax;
2302 }
2303 }
int lifeMax
The maximum life of this NPC.
Definition NPC.cs:1077
int life
The current life of the NPC. Automatically set to the value of F:Terraria.NPC.lifeMax at the end of S...
Definition NPC.cs:1072
int realLife
Stores the index (the F:Terraria.Entity.whoAmI) of a single NPC. This NPC will then share a health po...
Definition NPC.cs:604

References Terraria.NPC.life, Terraria.NPC.lifeMax, Terraria.Main.npc, and Terraria.NPC.realLife.

Referenced by Terraria.NPC.GetLifePercent().

+ Here is the caller graph for this function: