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

◆ CheckLifeRegen()

void Terraria.NPC.CheckLifeRegen ( )
inlineprivate

Definition at line 109586 of file NPC.cs.

109587 {
109588 if (life < lifeMax)
109589 {
109590 friendlyRegen++;
109591 if (dryadWard)
109592 {
109593 friendlyRegen += 10;
109594 }
109595 if (friendlyRegen > 180)
109596 {
109597 friendlyRegen = 0;
109598 life++;
109599 netUpdate = true;
109600 }
109601 }
109602 }
int friendlyRegen
Definition NPC.cs:1205
int lifeMax
The maximum life of this NPC.
Definition NPC.cs:1077
bool dryadWard
Definition NPC.cs:698
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
bool netUpdate
Definition NPC.cs:1130