Lua API
On this page

Enchantment

Inherits from

Represents an enchantment on a player

Fields:

CasterId number

read only

The id of the object who cast this enchantment (player / equipment / etc)

Category SpellCategory

read only

The category of this enchantment

ClientReceivedAt DateTime

read only

The datetime that the client recieved this enchantment from the server.

DegradeLimit number

read only

?

DegradeModifier number

read only

?

Duration number

read only

The total duration in seconds this enchantment should last for

Effect SpellFlags

read only

The spell flags for this enchantment

ExpiresAt DateTime

read only

The datetime this enchantment will expire. All times are in UTC. Formula is: (Duration 0) ? DateTime.MaxValue : ClientReceivedAt + TimeSpan.FromSeconds(Duration) - TimeSpan.FromSeconds(StartTime)

Flags EnchantmentFlags

read only

Enchantment flags

HasSpellSetId boolean

read only

Tru if this enchantment has a spell set associated with it

LastTimeDegraded number

read only

?

Layer number

read only

Layer of this enchantment. Higher layer values take priority.

LayeredId LayeredSpellId

read only

The full layered id of this enchantment

Power number

read only

The spell power / difficulty of this enchantment spell

SpellId number

read only

Spell id of this enchantment

SpellSetId number

read only

The spell set id this enchantment comes from. Only valid if HasSpellSetId is true.

StartTime number

read only

The time in seconds that the enchantment has been active before we heard about it from the server.

StatKey number

read only

The stat key this enchantment affects. Could be of type AttributeID, VitalID, or SkillID depending on Flags

StatValue number

read only

The stat value modifier of this enchantment

Methods:

GetPropertyKeys() : string[]

Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts

Returns:string[]

ToString() : string

Returns a string that represents the current object.

Returns:string