WoW API: GetPetExperience

From AddOn Studio
Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetPetExperience to API GetPetExperience without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < GetPetExperience

Returns the pet's current XP total, and the XP total required for the next level.

currXP, nextXP = GetPetExperience();

Parameters

Returns

currXP
Number - The current XP total
nextXP
Number - The XP total required for the next level

Example

local currXP, nextXP = GetPetExperience();
DEFAULT_CHAT_FRAME("Pet experience: " .. currXP .. " / " .. nextXP);

Result

Pet experience is displayed in the default chat frame.