Lua functions

GetSpellDisplayEffect

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

Historical signature: GetSpellDisplayEffect(spell, idx, field)

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

Function: GetSpellDisplayEffect(spell, idx, field)

Description: Reads a copied display-effect record from the spell; edits to the stored record cannot invalidate the selected description during this operation.

Parameters:

  • spell (Spell) - Lua spell object whose backing template owns the effect.
  • idx (int32) - Zero-based effect index. Negative/out-of-range indexes are rejected without truncation.
  • field (string) - Case-insensitive description, bullet or percentage.

Returns: Description string or integer bullet/percentage. Missing spell/data/index or an unknown field returns no values.

Record ownership: The backing template owns child values directly; readers receive copies and setters publish prepared edits. The instance must be admitted as described below; child-value ownership and VM execution are separate contracts. See Lua actor lifetime.

Checked example

No checked example is published for this function yet. No active script call with the current C++ argument count was found.

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