ModifierEvent
A modifier event (damage taken, ability cast, modifier gained/lost, ...) fired by the game. Passed to IDeadworksPlugin.OnModifierEvent. Observe-only.
public sealed class ModifierEvent
Namespace: DeadworksManaged.Api
Source: Events/ModifierEvent.cs#L10
Notes
*Broadcast events are not delivered through this hook.
Properties
ModifierEvent.Event
Which event this is.
Signature
public required EModifierEvent Event { get; init; }
Source: Events/ModifierEvent.cs#L12
ModifierEvent.Caster
The entity that raised the event, if any.
Signature
public CBaseEntity? Caster { get; init; }
Source: Events/ModifierEvent.cs#L15
ModifierEvent.Target
The target of the event, if any.
Signature
public CBaseEntity? Target { get; init; }
Source: Events/ModifierEvent.cs#L18
ModifierEvent.CastEntity
The entity spawned by the event (projectile, bullet, ...), if any. Meaning depends on Event.
Signature
public CBaseEntity? CastEntity { get; init; }
Source: Events/ModifierEvent.cs#L21
ModifierEvent.EventData
Raw pointer to the event-specific payload. Only valid inside the callback. Use Damage or Ability when available, or Read<T> if you know the layout.
Signature
public required nint EventData { get; init; }
Source: Events/ModifierEvent.cs#L27
ModifierEvent.Damage
Damage details for PreDamageTaken, DamageTaken and HealthTaken; null for other events.
Signature
public ModifierDamageEventData? Damage { get; }
Source: Events/ModifierEvent.cs#L30
ModifierEvent.Ability
Ability details for AbilityCastStarted, AbilityPreExecuted and AbilityExecuted; null for other events.
Signature
public ModifierAbilityEventData? Ability { get; }
Source: Events/ModifierEvent.cs#L35
Methods
ModifierEvent.Read()
Reads a value at offset bytes into EventData. Unchecked.
Signature
public unsafe T Read<T>(int offset) where T : unmanaged
Source: Events/ModifierEvent.cs#L40
ModifierEvent.ReadEntity()
Reads an entity handle at offset bytes into EventData, or null if invalid.
Signature
public CBaseEntity? ReadEntity(int offset)
Source: Events/ModifierEvent.cs#L43