tModLoader v2024.05
A mod to make and play Terraria mods
IEntitySource_OnHurt Interface Reference

Used along with EntitySource_Parent. The Victim is also the EntitySource_Parent.Entity (owner of the effect) More...

Inherited by EntitySource_ItemUse_OnHurt, and EntitySource_OnHurt.

Properties

EntityAttacker [get]
 The attacking entity. Note that this may be a Projectile (possibly owned by a player), a Player or even a NPC More...
 
Entity Victim [get]
 The entity being attacked. Normally a Player, but could be an NPC if a mod decides to use this source in such a way More...
 

Detailed Description

Used along with EntitySource_Parent. The Victim is also the EntitySource_Parent.Entity (owner of the effect)

Property Documentation

◆ Attacker

Entity? IEntitySource_OnHurt.Attacker
get

The attacking entity. Note that this may be a Projectile (possibly owned by a player), a Player or even a NPC

Implemented in EntitySource_ItemUse_OnHurt, and EntitySource_OnHurt.

◆ Victim

Entity IEntitySource_OnHurt.Victim
get

The entity being attacked. Normally a Player, but could be an NPC if a mod decides to use this source in such a way

Implemented in EntitySource_ItemUse_OnHurt, and EntitySource_OnHurt.