SortSpellBook
function · ui · orchestration
- Address
0x4b2fd0· 100 bytes, up to0x4b3033- Signature
void __fastcall (bool sortBook, bool sortPet)- Meaning
- Sorts the tab list and book, or the pet book, then signals SPELLS_CHANGED
- Confidence
- verified, proof one
- Finding
- ui/spellbook#book-order
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 7
- AddSpellToBook ui
- 0x4b2c50 ui
- Script::UpdateSpells ui
- OnPetSpells ui
- CGPlayer_C::OnActiveArrival objectlayer
- CGPlayer_C::OnVisibleItemChanged objectlayer
- CGPlayer_C::OnLevelChanged objectlayer
Callees 2
- FrameScript_SignalEvent ui
- _qsort crt
Calls and jumps by a bare address, from tables/calls.tsv.