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

◆ OnHit()

void Terraria.Player.OnHit ( float x,
float y,
Entity victim )
inline

Definition at line 7222 of file Player.cs.

7223 {
7224 if (Main.myPlayer == whoAmI)
7225 {
7226 OnHit_Inner(x, y, victim);
7227 PlayerLoader.OnHitAnything(this, x, y, victim);
7228 }
7229 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
static void OnHitAnything(Player player, float x, float y, Entity victim)
This is where all ModPlayer hooks are gathered and called.
void OnHit_Inner(float x, float y, Entity victim)
Definition Player.cs:7231

References Terraria.Main.myPlayer, Terraria.Player.OnHit_Inner(), Terraria.ModLoader.PlayerLoader.OnHitAnything(), and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.ItemCheck_MeleeHitPVP(), Terraria.Player.ProcessHitAgainstNPC(), and Terraria.Player.StrikeNPCDirect().

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