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

◆ Heal()

void Terraria.Player.Heal ( int amount)
inline

Heals the player for a certain amount.

Parameters
amountThe amount to heal the player by.

Definition at line 33828 of file Player.cs.

33829 {
33830 statLife += amount;
33831 if (Main.myPlayer == whoAmI)
33832 {
33833 HealEffect(amount);
33834 }
33835 if (statLife > statLifeMax2)
33836 {
33838 }
33839 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
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
void HealEffect(int healAmount, bool broadcast=true)
Spawns a T:Terraria.CombatText indicating the player healed healAmount life and syncs it if broadcas...
Definition Player.cs:4980

References Terraria.Player.HealEffect(), Terraria.Main.myPlayer, Terraria.Player.statLife, Terraria.Player.statLifeMax2, and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.BatBat_TryLifeLeeching(), and Terraria.Player.PickupItem().

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