Function: SummonDeityPet(spawn, pet_id)
Description: Create a noncombat deity pet from an NPC database definition during a spell callback. The pet uses the owner's level and faction, a configured random pet name, a noncombat brain, and the summoning spell identity. It is not attackable. Owner, pet category, brain and appearance setup finish before publication; construction and retirement each have an explicit allocation owner.
Parameters:
spawn(Spawn) - Player or NPC entity that will own the pet.pet_id(uint32) - Nonzero NPC database spawn ID.
Returns: The created pet Spawn object, or nil for an invalid owner, an existing pet in this category, missing/invalid NPC definition, unavailable or resisted spell, or rejected admission. Failed construction retires its allocation without retaining a dangling pet address.
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.