1
0
EQ2Emu/docs/lua_functions/GetCosmeticPet.md

22 lines
538 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 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.
**Example:**
```lua
-- From Spells/AA/SummonAnimatedTome.lua
function remove(Caster, Target)
RemoveSpellBonus(Target)
pet = GetCosmeticPet(Caster)
if pet ~= nil then
DismissPet(pet)
end
```