Wowpedia
Advertisement

Source: FrameXML\ObjectAPI\PlayerLocation.lua

API

Methods

Example

Prints the race and class of your character.

local playerLoc = PlayerLocation:CreateFromUnit("player")

local raceId = C_PlayerInfo.GetRace(playerLoc)
local raceName = C_CreatureInfo.GetRaceInfo(raceId).raceName
local class = C_PlayerInfo.GetClass(playerLoc)
print(raceName, class) -- "Dwarf", "Priest"

Patch changes

External links

Wowpedia: WhatLinksHere
Advertisement