Lua functions

Resurrect

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

Historical signature: Resurrect(hp_perc, power_perc, send_window, target, heal_name, crit_mod, no_calcs, revive_spell_id, revive_spell_tier)

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

Function: Resurrect(hp_perc, power_perc, send_window, target, heal_name, crit_mod, no_calcs, revive_spell_id, revive_spell_tier)

Description: Resurrect the spell targets.

After an offer is consumed for execution, its original actor's corpse-removal registration is selected before healing callbacks. Once ordinary revival setters begin, normal return or unwinding cancels only that registration. A newer deadline created during callbacks survives the older cleanup. An old actor cannot cancel a replacement actor's deadline under a reused runtime ID. Cancellation also supersedes a matching in-progress removal claim, so error rollback cannot reopen that cancelled registration.

Parameters:

  • hp_perc (float) - Float value hp_perc.
  • power_perc (float) - Float value power_perc.
  • send_window (uint32) - Integer value send_window.
  • target (Spawn, optional) - Original Player to resurrect. Omitted or nil uses the captured spell target list. An explicitly supplied expired, invalid or non-Player target produces no offer; it does not select the default list.
  • heal_name (string) - String heal_name.
  • crit_mod (uint32) - Integer value crit_mod.
  • no_calcs (uint32) - Integer value no_calcs.
  • revive_spell_id (uint32) - Integer value revive_spell_id.
  • revive_spell_tier (uint32) - Integer value revive_spell_tier.

Returns: None.

Connection lifetime: Each player or group-member connection resolved by this function is retained through the native call. A disconnect or reconnect during a callback cannot destroy that retained connection or switch the ongoing call to a replacement. A later Lua call resolves the current connection. This does not extend the lifetime of unrelated spawn or item userdata.

Spell caster lifetime: When this function reads a spell's caster, it retains that allocation for the native operation. Retirement or callback reentry cannot replace its caster with a different allocation at the same address or runtime ID. A known expired or cleared caster is not rediscovered through a replacement connection. An actor already owned by the active callback remains usable through that callback. See Lua actor lifetime.

Original spell targets: When this function uses a spell's target list, it snapshots references to the originally selected actor allocations. It skips unavailable or departed targets instead of selecting another actor with a reused runtime ID. Accepted actors remain physically retained through the active protected callback, including Lua errors; saved userdata and target records do not keep them alive between callbacks. Explicit Spawn arguments retain their existing selection behavior. See Lua actor lifetime.

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.

Resurrect(15, 15, 1, nil, "", 0, 0, 5162, 1)

Evidence: server/Spells/Commoner/FavorofthePhoenix.lua:12; binding EQ2Emu_lua_Resurrect.

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