tModLoader v2024.09
A mod to make and play Terraria mods
EntitySource_Buff Class Reference

Intended for mods to use when spawning projectiles periodically from buffs.

More...

Inherits EntitySource_Parent.

Public Member Functions

 EntitySource_Buff (Entity entity, int buffId, int buffIndex, string? context=null)
 
- Public Member Functions inherited from EntitySource_Parent
 EntitySource_Parent (Entity entity, string? context=null)
 

Properties

int BuffId [get]
 The type of the buff (BuffID or ModContent.BuffType)
 
int BuffIndex [get]
 The index of the buff in the entity's buffType and buffTime arrays.
 
- Properties inherited from EntitySource_Parent
string? Context [get]
 Additional context identifier, particularly useful for set bonuses or accessory affects. See ItemSourceID and ProjectileSourceID for vanilla uses More...
 
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.
 
- Properties inherited from IEntitySource
string? Context [get]
 Additional context identifier, particularly useful for set bonuses or accessory affects. See ItemSourceID and ProjectileSourceID for vanilla uses More...
 

Detailed Description

Intended for mods to use when spawning projectiles periodically from buffs.

Note that this can be used for both NPCs and Players