benilla-re systems structs docs

s_whoSortChain

global · net

Address
0xc2817c · 56 bytes, up to 0xc281b3
Type
uint32_t[14]
Meaning
Holds seven pairs of sort key and direction for the who results
Confidence
verified, proof one
Finding
net/who#who-sort-keys

Finding: Who sort keys in net: who

SortWho(type) maps the text, without case, to a key: name 4, level 1, class 2, group 3, race 5, zone 0, guild 6, and any other text to 4. It moves that key to the front of a seven-slot chain of key and direction pairs. The direction flips only when the key was already first; otherwise it keeps the direction it had and the earlier slots shift down. It then sorts the kept results with qsort and fires WHO_LIST_UPDATE before it returns. The chain starts as keys 0 to 6 with direction 0, set again at each world entry.

The derivation is in the doc.