Historical signature: GetCharmedPet(Spawn)
Parameter and behavior details in the historical explanation are under review against the current implementation.
Function: GetCharmedPet(Spawn)
Description:
Returns the NPC that the given player or NPC has charmed, if any. When a player charms an NPC (through a spell), that NPC becomes a pet under their control — this function retrieves it.
Parameters:
spawn (Spawn) - Spawn object representing spawn.
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.
pet = GetCharmedPet(Caster)
Evidence: server/Spells/Scout/Bard/Troubador/BriasEntrancingSonnet.lua:21; binding EQ2Emu_lua_GetCharmedPet.
Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.