Script::UnitName
function · ui · primitive
- Address
0x517020· 618 bytes, up to0x517289- Signature
int __fastcall (lua_State *L)- Meaning
- Pushes a unit's name and realm; for the string player it pushes the selected character's name and nil
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/unitplayer#the-four-readers
Finding: The four readers in ui: the player token before the player object
UnitName, UnitSex, UnitRace and UnitClass compare their token with the whole string player (SStrCmpI, 0x7fffffff) and, on a match, answer from the record without the resolver or an object.
UnitName pushes the name and then nil (two values; the realm slot is always nil here). UnitSex pushes {2, 3, 1, 6}[sex byte] from the table 0x808be4, with no bound. UnitRace and
UnitClass push the localised name and the token of the ChrRaces or ChrClasses row of the byte, or nil, nil when the id is out of range or its row is missing. The record wins over the object for these
four forever.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 17
- ClntObjMgrObjectPtr objectlayer
- GetPartyPetRecord ui
- Script::GetGUIDFromName ui
- DBCache_ItemStats_C_int_HASHKEY_INT_::GetRecord dbcache
- DBCache::NameCache::GetRecord dbcache
- GetSelectedCharacterName net
- CGGameObject_C::GetRecordName objectlayer
- CGUnit_C::GetUnitName objectlayer
- SStrCmpI storm
- lua_type lua
- lua_isstring lua
- lua_toboolean lua
- lua_tostring lua
- lua_pushnil lua
- lua_pushstring lua
- luaL_error lua
- FrameScript_GetText ui
Calls and jumps by a bare address, from tables/calls.tsv.