Function: AddProcExt(Spawn, ProcType, DamageType, Chance, HPRatio, BelowHealth, TargetHealth, Item, UseAllSpellTargets)
Description: Add's a proc for a Spell and calls function proc_ext when proc succeeds.
Parameters:
Spawn: Spawn - The spawn or entity involved.ProcType: int8 - See ProcType optionsDamageType: int8 - See DamageType optionsChance: float - Floating point value.HPRatio: int8 - Small integer or boolean flag.BelowHealth: bool - Use HPRatio against health lower than if false (default). Otherwise if health is higher when true.TargetHealth: bool - Use Target's Health for formula, default is false (use self Spawn health). Otherwise when true use Target's health.Item: Item - An item reference.UseAllSpellTargets: int8 - By default 0 (false) use just Spawn, otherwise use all Spell Targets.
Returns: None.
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.