Lua functions

SetSpellData

Registered in this checkout as EQ2Emu_lua_SetSpellData; implementation found at WorldServer/Lua/LuaFunctions.cpp:13393.

Historical signature: SetSpellData(spell, field, fieldvalue)

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: SetSpellData(spell, field, fieldvalue)

Description: Set's the spell data value

Parameters:

  • spell (Spell) - Spell object representing spell.
  • field (string) - String field.
  • fieldvalue (value) - fieldvalue.

Returns: None.

Checked example

Active call in a local runtime Lua script. The value is read from the third argument after spell and field. This is a contextual call pattern, not a tested standalone script.

SetSpellData(Spell, "duration1", newDuration)

Evidence: server/ItemScripts/AbbatoirCoffee.lua:13; binding EQ2Emu_lua_SetSpellData.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.