Lua functions

AddThreatTransfer

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

Historical signature: AddThreatTransfer(…) via current binding

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

Function: AddThreatTransfer(caster, target, chance)

Description:

Registers threat transfer from caster to target for the current spell. Requires entity arguments, positive chance and a non-resisted current spell. An existing live transfer is left in place; an expired original relationship may be replaced.

Parameters:

  • caster (Spawn) - Entity transferring threat.
  • target (Spawn) - Entity receiving transferred threat.
  • chance (number) - Positive percentage value stored as the transfer amount.

Returns: None.

Checked example

Active call in a local runtime Lua script. Argument count matches current fixed C++ readers. This is a contextual call pattern, not a tested standalone script.

AddThreatTransfer(Target, Caster, Hate)

Evidence: server/Spells/Fighter/Crusader/Paladin/Amends.lua:11; binding EQ2Emu_lua_AddThreatTransfer.

Current registration: WorldServer/Lua/LuaInterface.cpp.