Function: SetSpellList(spawn, primary_list, secondary_list = 0, override = false)
Description: Sets an NPC's primary and secondary spell lists and loads a complete replacement for that NPC. Both list settings and the replacement request are captured together. If another configuration, clear or publication supersedes that original request, its late replacement is rejected, including when the configured IDs have returned to the same values. A spell selection already in progress may finish using its captured list values.
Parameters:
spawn(Spawn) - The NPC to configure.primary_list(uint32) - Primary spell-list ID. Zero preserves the current ID unlessoverrideis true.secondary_list(uint32, optional) - Secondary spell-list ID. Defaults to zero and preserves the current ID unlessoverrideis true.override(Bool, optional) - Defaults to false. When true, zero explicitly clears the corresponding list setting.
Returns: None. Invalid or non-NPC spawns log an error.