benilla-re systems structs docs

Script::GetGUIDFromName

function · ui · primitive

Address
0x515970 · 725 bytes, up to 0x515c44
Signature
uint64_t __fastcall (const char *token)
Meaning
Returns the GUID a unit token names, 0 for none, and raises for an unknown token
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/unittokens#the-unit-token

Finding: The unit token in ui: unit tokens and the unit functions' arguments

0x515970(token) returns a GUID in edx:eax, 0 for none, and 0 for a null or empty token. SStrCmpI prefix tests, folding A to Z only, run in this order and the first match wins: player (6 characters), pet (3), target (6), partypet (8), party (5), raidpet (7), raid (4), mouseover (9), and npc (the whole string). player is the GUID in the active player's descriptor; target, mouseover and npc are globals (0xb4e2d8, 0xb4e2c8, 0xb4e2d0). A token matching none raises Unknown unit name: %s. Then any number of target hops: while the GUID is nonzero and text remains, the rest must be target (else GUID 0) and the GUID becomes that unit's target. npctarget raises, since npc is compared whole.

The derivation is in the doc.

Callers 49

Callees 8

Calls and jumps by a bare address, from tables/calls.tsv.