s_portraitDisplayTableVtable
global · ui
- Address
0x808dc4· 16 bytes, up to0x808dd3- Type
void *[4]- Meaning
- Holds the display-id portrait table's vtable: free node, new node, destroy, empty
- Confidence
- verified, proof one
- Finding
- ui/portraits#display-id-cache-lifetime
Finding: Display-id cache lifetime in ui: unit portraits
The display-id table (0xc0ce88, buckets 0xc0cea4, mask 0xc0ceac) gains entries from the bake
0x524f60 alone: for a held unit without the player bit 0x10 in its type mask, once the lookup
missed and the model is drawn. The bake runs for SetPortraitTexture on a held unit and for
SetLootPortrait. The key is UNIT_FIELD_DISPLAYID, read again at the insert, so any non-player
unit of that display id fills it, a pet or a creature, and 0x525cb0 then finds it for a pet the
client does not hold. An entry is never redrawn or removed until ClearPortraitCaches runs from
CGGameUI::ShutdownGame when the client leaves the world (ClientDestroyGame); the exit
destructor empties it at process exit.
The derivation is in the doc.