TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.DataStructures.EntitySource_OnHit Class Reference

Use the interface, T:Terraria.DataStructures.IEntitySource_OnHit instead when checking entity sources in OnSpawn

More...

+ Inheritance diagram for Terraria.DataStructures.EntitySource_OnHit:
+ Collaboration diagram for Terraria.DataStructures.EntitySource_OnHit:

Public Member Functions

 EntitySource_OnHit (Entity attacker, Entity victim, string? context=null)
 

Static Package Functions

static ? IEntitySource GetGoreFallback ()
 
static FallbackSourceRef PushFallback (IEntitySource source)
 

Properties

Entity Attacker [get]
 The attacking entity. Note that this may be a T:Terraria.Projectile (possibly owned by a player), a T:Terraria.Player or even a T:Terraria.NPC
 
Entity Victim [get]
 The entity being attacked. Normally an NPC, but could be an Player if a mod decides to use this source in such a way.
 
Entity Entity [get]
 The entity which is the source of the effect or action. In many cases, it makes sense to consider buffs or effects applied to the parent entity, and make changes to the spawned entity.
 
string? Context [get]
 Additional context identifier, particularly useful for set bonuses or accessory affects. See T:Terraria.ID.ItemSourceID and T:Terraria.ID.ProjectileSourceID for vanilla uses.
 

Static Private Attributes

static ? IEntitySource _goreFallback
 

Detailed Description

Use the interface, T:Terraria.DataStructures.IEntitySource_OnHit instead when checking entity sources in OnSpawn

Recommend setting P:Terraria.DataStructures.IEntitySource.Context to indicate the effect. Many vanilla set bonuses or accessories use this source.

Definition at line 8 of file EntitySource_OnHit.cs.


The documentation for this class was generated from the following file: