Script::UnitSex
function · ui · orchestration
- Address
0x517e90· 290 bytes, up to0x517fb1- Signature
int __fastcall (lua_State *L)- Meaning
- Pushes the sex number of a unit; for the string player it reads the selected character's sex byte
- 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 9
- ClntObjMgrObjectPtr objectlayer
- Script::GetGUIDFromName ui
- DBCache::NameCache::GetRecord dbcache
- GetSelectedCharacterSex net
- SStrCmpI storm
- lua_isstring lua
- lua_tostring lua
- lua_pushnumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.