Lua functions

SetSpellDataIndex

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

Historical signature: SetSpellDataIndex(spell, idx, value, value2)

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

Function: SetSpellDataIndex(spell, idx, value, value2)

Description: Set's the spell data index value

Parameters:

  • spell (Spell) - Spell object representing spell.
  • idx (uint32) - Integer value idx.
  • value (int32) - Integer value value.
  • value2 (int32) - Integer value value2.

Returns: None.

Checked example

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

SetSpellDataIndex(Spell, 1, MinDmg)

Evidence: server/Spells/Commoner/BlightoftheMorning.lua:24; binding EQ2Emu_lua_SetSpellDataIndex.

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