dao::CGameEffect

class

Derives from dao::CDataArrays.

A script’s effect or itemproperty, with its parameters (CDataArrays).

Declared in dao/Structures.h.

Functions

AbilityId()

std::int32_t AbilityId() const

Returns the id of the ability that made the effect, the same value GetEffectAbilityID returns.

Animation()

std::int32_t Animation() const

Returns the effect’s animation, the same value GetEffectAnimation returns.

CGameEffect()

CGameEffect()=delete

CGameEffect()

CGameEffect(const CGameEffect &)=delete

Creator()

ObjectId Creator() const

Returns the object that created the effect.

Duration()

float Duration() const

Returns how long a temporary effect lasts, in seconds.

DurationMs()

std::int32_t DurationMs() const

Returns how long a temporary effect lasts, in milliseconds, or 0 for other duration types.

DurationType()

script::EffectDurationType DurationType() const

Returns the effect’s duration type, one of EFFECT_DURATION_TYPE_* in script.ldf.

Effects from an equipped item have type 4, which script.ldf does not name.

ElapsedMs()

std::int32_t ElapsedMs() const

Returns how long a temporary effect has lasted so far, in milliseconds, or 0 for other duration types.

Flags()

std::uint32_t Flags() const

Returns the effect’s flags, the same value GetEffectFlags returns.

Id()

std::uint32_t Id() const

Returns the effect’s id.

operator=()

CGameEffect & operator=(const CGameEffect &)=delete

Remaining()

float Remaining() const

Returns how long a temporary effect has left, in seconds.

SetRemaining()

void SetRemaining(float seconds)

Sets how long a temporary effect has left, clamped to its duration.

Not yet tested in the game.

Parameter  
seconds the time left. Zero or less ends the effect at its owner’s next update

Type()

script::EffectType Type() const

Returns the effect’s type, one of the scripts’ EFFECT_TYPE_* constants (effect_constants_h.nss).

~CGameEffect()

~CGameEffect()=delete

Fields

Field Type  
kDuration std::size_t = 0x2C offset of the duration, in milliseconds
kElapsed std::size_t = 0x30 offset of the elapsed time, in milliseconds