Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API UnitTokenFromGUID

Last wiki revision 2023-08-15

Finds a unit token that maps to the supplied unit GUID. unitToken = UnitTokenFromGUID(unitGUID)

  • unitGUID: : GUID - A unit GUID to query.
  • unitToken: : UnitId - A unit token that matches the supplied unit GUID if one can be found, or nil if not.
  • The return from this function is inherently unstable and may change during processing of UI events or across frames. If storing the result of this function in a table or upvalue, you should confirm before using the stored unit token that it still maps to the unit GUID that was initially requested.
  • Internally this function will iterate over a list of unit tokens to find a matching candidate. Unit tokens will be tested in the order given below, returning the first one that matches.
  • player
  • vehicle
  • pet
  • party<font color="#ecbc2a">&lt;x&gt;
  • partypet<font color="#ecbc2a">&lt;x&gt;
  • raid<font color="#ecbc2a">&lt;x&gt;
  • raidpet<font color="#ecbc2a">&lt;x&gt;
  • nameplate<font color="#ecbc2a">&lt;x&gt;
  • arena<font color="#ecbc2a">&lt;x&gt;
  • arenapet<font color="#ecbc2a">&lt;x&gt;
  • boss<font color="#ecbc2a">&lt;x&gt;
  • target
  • focus
  • npc
  • mouseover
  • softenemy
  • softfriend
  • softinteract

Source

https://warcraft.wiki.gg/wiki/API_UnitTokenFromGUID · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.