Lua Player NonCombatPets

LuaPlayer : NonCombatPets
Returns all non-combat pets following this unit as LuaUnit objects.

NOTE: This function returns a C# List<?> that has not been marshalled. It is recommended that you marshal the results into a Lua table using the provided toTable function, as shown in the example below.

NOTE: It is possible for a pet returned by this function to no longer be valid. If needed, you should verify that by checking IsValid.

Example
-- Get the pets. local pets = toTable(myPlayer.NonCombatPets);

-- Loop through each pet and print it to the log! for k, v in pairs(pets) do Info("Pet: " .. v.DisplayName); end