WoW:API GetPlayerInfoByGUID: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (I guess it doesn't bend that way)
No edit summary
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
Returns basic information about another player from their GUID.
Returns basic information about another player from their GUID.
  locClass, engClass, locRace, engRace, gender = GetPlayerInfoByGUID("guid")
  locClass, engClass, locRace, engRace, gender, name, server = GetPlayerInfoByGUID("guid")


== Arguments ==
== Arguments ==
;guid : String - The GUID of the player you're querying about.
;guid
: String - The GUID of the player you're querying about.


== Returns ==
== Returns ==
;locClass : String - Class of the character in question (localized)
;locClass
;engClass : String - Class of the character in question (in English)
: String - Class of the character in question (localized)
;locRace : String - Race of the character in question (localized)
;engClass
;engRace : String - Race of the character in question (in English)
: String - Class of the character in question (in English)
; gender : String - Gender of the character in question (2: male, 3: female).
;locRace
: String - Race of the character in question (localized)
;engRace
: String - Race of the character in question (in English)
; gender
: String - Gender of the character in question (2: male, 3: female).
; name
: String - Name of the character in question (first letter uppercased).
; server
: String - Server of the character in question (first letter uppercased). If the character is on the same server then the empty string "".


== Notes ==
== Notes ==
* This function was added in [[Patch 3.2]]
* This function was added in [[Patch 3.2]]
* The information is not encoded in the GUID itself; as such, no data is available until the client has encountered the queried GUID.
* The information is not encoded in the GUID itself; as such, no data is available until the client has encountered the queried GUID.
* You can test it with the below (requiring a target, nil if the target is not a player).
/run print([https://wowwiki.fandom.com/wiki/API_GetPlayerInfoByGUID GetPlayerInfoByGUID](UnitGUID("target")))

Revision as of 21:58, 1 May 2019

WoW API < GetPlayerInfoByGUID

Returns basic information about another player from their GUID.

locClass, engClass, locRace, engRace, gender, name, server = GetPlayerInfoByGUID("guid")

Arguments

guid
String - The GUID of the player you're querying about.

Returns

locClass
String - Class of the character in question (localized)
engClass
String - Class of the character in question (in English)
locRace
String - Race of the character in question (localized)
engRace
String - Race of the character in question (in English)
gender
String - Gender of the character in question (2: male, 3: female).
name
String - Name of the character in question (first letter uppercased).
server
String - Server of the character in question (first letter uppercased). If the character is on the same server then the empty string "".

Notes

  • This function was added in Patch 3.2
  • The information is not encoded in the GUID itself; as such, no data is available until the client has encountered the queried GUID.
  • You can test it with the below (requiring a target, nil if the target is not a player).
/run print(GetPlayerInfoByGUID(UnitGUID("target")))