GetPowerDisplayDivisor
function · spell · primitive
- Address
0x6e7130· 17 bytes, up to0x6e7140- Signature
int32_t __fastcall (int32_t powerType)- Meaning
- Returns the display divisor of a power type, 1 for a negative type
- Confidence
- verified, proof one
- Finding
- ui/party#reading-a-member-without-its-object
Finding: Reading a member without its object in ui: the party, its leader and its members' records
The Lua getters read the unit's descriptor while its object is held, and otherwise the record found by 0x496400 (party, then raid), then the pet record from 0x496420. A getter
that finds nothing gives 0, or nil for a predicate. Record fields: +0x08 status (1 online, 4 dead, 8 ghost), +0x09 power type, u16 words +0x0a health, +0x0c maximum, +0x0e power, +0x10 maximum power, +0x12 level;
the pet block is the same layout at +0x80, its fields at +0xd8 (power type), +0xdc, +0xde, +0xe0, +0xe2.
| function | held object | record | pet record |
|---|---|---|---|
UnitHealth | +0x40 clamped at 0; 0 when dynamic flags +0x224 bit 0x20 | +0x0a | +0x5c |
UnitHealthMax | +0x58 | +0x0c | +0x5e |
UnitMana | +0x44 + 4*type, divided by the type's display divisor; 0 with the same flag | +0x0e | +0x60 |
UnitManaMax | +0x5c + 4*type, divided | +0x10 | +0x62 |
UnitPowerType | +0x7b byte | +0x09 | +0x58 |
UnitLevel | its own function (unitlevels#unitlevel) | +0x12 | none |
UnitIsConnected | always 1 | +0x08 bit 1, else nil | 1 when found |
UnitIsDead | health at or below 0, or the dynamic flag | +0x08 bit 4 | none |
UnitIsGhost | player type and PLAYER_FLAGS ghost bit | +0x08 bit 8 | none |
UnitIsDeadOrGhost | 0x605f30 or the dynamic flag | +0x08 bits 4 and 8 | none |
The derivation is in the doc.
Callers 7
- Script::UnitMana ui
- Script::UnitManaMax ui
- CGTooltip::BuildSpell ui
- ReadSpellEnergizeLog objectlayer
- HandlePeriodicAuraLog objectlayer
- LogPowerDrain objectlayer
- LogHappinessDrain objectlayer
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.