Lua functions

GetCosmeticPet

Registered in this checkout as EQ2Emu_lua_GetCosmeticPet; implementation found at WorldServer/Lua/LuaFunctions.cpp:5889.

Historical signature: GetCosmeticPet(Spawn)

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: GetCosmeticPet(Spawn)

Description: Returns the cosmetic pet (fun pet) entity of the given player if one is currently summoned.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

Returns: Spawn – The cosmetic pet spawn if active, or nil if the player has no cosmetic pet out.

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 = GetCosmeticPet(Caster)

Evidence: server/Spells/AA/SummonAnimatedTome.lua:19; binding EQ2Emu_lua_GetCosmeticPet.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.