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

◆ BatBat_TryLifeLeeching()

void Terraria.Player.BatBat_TryLifeLeeching ( Entity entity)
inlineprivate

Definition at line 43435 of file Player.cs.

43436 {
43437 if (_batbatCanHeal && statLife < statLifeMax2 && (!(entity is NPC nPC) || nPC.HittableForOnHitRewards()))
43438 {
43439 _batbatCanHeal = false;
43440 Heal(1);
43441 }
43442 }
int statLifeMax2
The maximum health this player can have, adjusted by buffs and equipment.
Definition Player.cs:2092
int statLife
The current health of this player. Capped at F:Terraria.Player.statLifeMax2. If you increase this v...
Definition Player.cs:2102
bool _batbatCanHeal
Definition Player.cs:2995
void Heal(int amount)
Heals the player for a certain amount.
Definition Player.cs:33828

References Terraria.Player._batbatCanHeal, Terraria.Player.Heal(), Terraria.Player.statLife, and Terraria.Player.statLifeMax2.

Referenced by Terraria.Player.ApplyNPCOnHitEffects(), and Terraria.Player.ItemCheck_MeleeHitPVP().

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