Lua functions

AddSpawnSpellBonus

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

Historical signature: AddSpawnSpellBonus(…) via current binding

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

Function: AddSpawnSpellBonus(spawn, type, value)

Description:

Adds an integer bonus owned by the current spell to the specified entity. A resisted spell, zero value or invalid entity does nothing. The current implementation does not apply extra class/race/faction restriction arguments.

Parameters:

  • spawn (Spawn) - Entity receiving the bonus.
  • type (uint16) - Item-stat bonus type.
  • value (int32) - Nonzero bonus value.

Returns: None.

Checked example

Active call in a local runtime Lua script. Class, race, and faction filters are optional; the call requires spell context. This is a contextual call pattern, not a tested standalone script.

AddSpawnSpellBonus(Caster, 0, BuffAmt)

Evidence: server/Spells/Fighter/Crusader/Shadowknight/SiphonStrength.lua:15; binding EQ2Emu_lua_AddSpawnSpellBonus.

Current registration: WorldServer/Lua/LuaInterface.cpp.