Script::UnitClass
function · ui · orchestration
- Address
0x518350· 323 bytes, up to0x518492- Signature
int __fastcall (lua_State *L)- Meaning
- Pushes the localised class name and upper-case token of a unit, or two nils
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/unitplayer#race-and-class-of-other-units
Finding: Race and class of other units in ui: the player token before the player object
For any other token UnitRace and UnitClass read the byte of a held unit object ([[obj+0x110]+0x78] race, +0x79 class) and, for an unheld one, the name cache record's +0x138 and +0x140, queried with a null
callback so no name request is sent. The same ChrRaces and ChrClasses lookup then gives the two values, or two nils on any miss. Both raise Usage: UnitRace("unit") and Usage: UnitClass("unit") for a
nil or missing argument, before anything else; UnitRace("target") with no target gives nil, nil.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 10
- ClntObjMgrObjectPtr objectlayer
- Script::GetGUIDFromName ui
- DBCache::NameCache::GetRecord dbcache
- GetSelectedCharacterClass net
- SStrCmpI storm
- lua_isstring lua
- lua_tostring lua
- lua_pushnil lua
- lua_pushstring lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.