World of Warcraft Forever API · PlayerLocationInfo.md, for your AI
C_PlayerInfo (PlayerLocationInfo)
7 functions, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
C_PlayerInfo.GUIDIsPlayer
isPlayer = C_PlayerInfo.GUIDIsPlayer(guid)
Arguments
guid | WOWGUID |
|---|
Returns
isPlayer | bool |
|---|
C_PlayerInfo.GetClass
className, classFilename, classID = C_PlayerInfo.GetClass(playerLocation)
Arguments
playerLocation | PlayerLocation |
|---|
Returns
className | cstring may be nil | |
|---|---|---|
classFilename | cstring may be nil | |
classID | number may be nil |
C_PlayerInfo.GetName
name = C_PlayerInfo.GetName(playerLocation)
May return nothing.
Arguments
playerLocation | PlayerLocation |
|---|
Returns
name | string |
|---|
C_PlayerInfo.GetRace
raceID = C_PlayerInfo.GetRace(playerLocation)
Arguments
playerLocation | PlayerLocation |
|---|
Returns
raceID | number may be nil |
|---|
C_PlayerInfo.GetSex
sex = C_PlayerInfo.GetSex(playerLocation)
Arguments
playerLocation | PlayerLocation |
|---|
Returns
sex | UnitSex may be nil |
|---|
C_PlayerInfo.IsConnected
isConnected = C_PlayerInfo.IsConnected([playerLocation])
Arguments
playerLocation | PlayerLocation may be nil |
|---|
Returns
isConnected | bool may be nil |
|---|
C_PlayerInfo.UnitIsSameServer
unitIsSameServer = C_PlayerInfo.UnitIsSameServer(playerLocation)
Arguments
playerLocation | PlayerLocation |
|---|
Returns
unitIsSameServer | bool |
|---|