WoW API: GetPetFoodTypes
Jump to navigation
Jump to search
Returns the food types the current pet can eat.
local petFoodList = { GetPetFoodTypes() };
Returns[edit]
multiple Strings (not a table)
Possible strings[edit]
- Meat
- Fish
- Fruit
- Fungus
- Bread
- Cheese
Example[edit]
To print every string from the list into the default chatframe.
local petFoodList = { GetPetFoodTypes() }; if #petFoodList > 0 then local index, foodType; for index, foodType in pairs(petFoodList) do DEFAULT_CHAT_FRAME:AddMessage(foodType); end else DEFAULT_CHAT_FRAME:AddMessage("No pet food types available."); end