Function: RemoveSkillBonus(spawn)
Description:
Removes the skill-bonus row for the current spell ID from its Player or NPC targets in an active, bound spell context. A resisted spell removes nothing. Otherwise it removes the spell-ID-zero row from spawn. NPC removal reverses the current and maximum skill adjustments recorded in that row.
Parameters:
spawn(Spawn) - Player or NPC used when there is no active, bound spell context.
Returns: None.
Bonus storage: Removal detaches an owned row with all its child skill values before applying NPC adjustments. The transfer and record cleanup require no temporary allocation. Internal value snapshots remain valid after removal; the function does not return a snapshot to Lua.
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.