Lua functions

SpellDamageExt

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

Historical signature: SpellDamageExt(target, type, min_damage, max_damage, crit_mod, no_calcs, override_packet_type, take_power, class_id)

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

Function: SpellDamageExt(target, type, min_damage, max_damage, crit_mod, no_calcs, override_packet_type, take_power, class_id)

Description: Damage a Target inside of a Spell Script, offers power 'damage' support.

Parameters:

  • luaspell (int32) - Integer value luaspell.
  • type (int32) - Integer value type.
  • min_damage (int32) - Integer value min_damage.
  • max_damage (int32) - Integer value max_damage.
  • crit_mod (int32) - Integer value crit_mod.
  • no_calcs (int32) - Integer value no_calcs.
  • override_packet_type (int32) - Integer value override_packet_type.
  • take_power (int32) - Integer value take_power.
  • class_id (uint32) - Integer value class_id.

Returns: None.

Checked example

Active call in a local runtime Lua script. The omitted class, race, and faction filters are empty. The binding also handles arguments dynamically. This is a contextual call pattern, not a tested standalone script.

SpellDamageExt(Target, 5, MinDmg, MaxDmg, 0, 0, 0, true)

Evidence: server/Spells/Mage/Summoner/Necromancer/NPCGrislyMark.lua:15; binding EQ2Emu_lua_SpellDamageExt.

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