CompareBookSpells
function · ui · primitive
- Address
0x4b30c0· 228 bytes, up to0x4b31a3- Signature
int __cdecl (uint32_t *a, uint32_t *b)- Meaning
- Orders two book spells by tab position, name, numeric rank and rank string
- Confidence
- verified, proof one
- Finding
- ui/spellbook#book-order
- Test
ui::sortcmp_4b30c0
Finding: Book order in ui: the spell book
0x4b2fd0(sortBook, sortPet) sorts the tab list with 0x4b3040 and the book with 0x4b30c0 when
sortBook is nonzero, sorts the pet book with 0x4b30c0 when sortPet is nonzero, and always signals
SPELLS_CHANGED (260). Tabs: General (key 0) first, then by the localized SkillLine name with
SStrCmp. Spells: by their tab's position in the tab list, then by name (+0x1e0), then by rank, then
by the rank string (+0x204). The rank is the first run of digits in the rank string, or the spell level
(+0x74) when it has none; two nonzero ranks compare numerically and end the comparison, and the rank
strings are compared only when either rank is 0. UpdateSpells (0x4b43e0) calls 0x4b2fd0(0, 0), so it
signals only.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 3
- GetSpellTabPosition ui
- ParseSpellRank ui
- SStrCmp storm
Calls and jumps by a bare address, from tables/calls.tsv.