nw::Effect

struct Effect

Public Functions

Effect(nw::MemoryResource *allocator = nw::kernel::global_allocator())
Effect(EffectType type_, nw::MemoryResource *allocator = nw::kernel::global_allocator())
void clear()

Clears the effect such that it’s as if default constructed.

float get_float(size_t index) const noexcept

Gets a floating point value.

int get_int(size_t index) const noexcept

Gets an integer point value.

StringView get_string(size_t index) const noexcept

Gets a string value.

EffectHandle handle() noexcept

Gets the effect’s handle.

EffectID id() const noexcept

Gets the effect’s ID.

void set_float(size_t index, float value)

Sets a floating point value.

void set_id(EffectID id)

Sets effect’s ID.

void set_int(size_t index, int value)

Sets an integer point value.

void set_string(size_t index, String value)

Sets a string value.

void set_versus(Versus vs)

Sets the versus value.

const Versus &versus() const noexcept

Gets the versus value.

Public Members

EffectType type = EffectType::invalid()
EffectCategory category = EffectCategory::magical
int subtype = -1
ObjectHandle creator
Spell spell_id = Spell::invalid()
float duration = 0.0f
uint32_t expire_day = 0
uint32_t expire_time = 0