AddSpellToBook
function · ui · primitive
- Address
0x4b25b0· 1535 bytes, up to0x4b2bae- Signature
void __fastcall (uint32_t spellId, bool live, uint32_t oldId)- Meaning
- Marks a spell known, prints its learn line and enters it in its tab of the book
- Confidence
- verified, proof one
- Finding
- ui/spellbook#adding-a-spell
Finding: Adding a spell in ui: the spell book
0x4b25b0(id, live, old) adds a learned spell to the book. It rejects an id outside the Spell table and
sets the id's bit in the known set. It records a few spells by their first effect (effects 83, 84, 95
and 116 in four globals, 39 into a table by misc value, 33 into a list) and updates three more lists
(dispel types 0xb71110, ui/reactivespells, ui/petbar#form-list). Past that, a spell with
Attributes & 0x80 goes no further. A spell with
Attributes & 0x20 (a trade skill spell) prints its learn line when live is set and goes no
further. Any other prints its line when live is set, and enters the book unless its CastUI
field (+0xc) is above 0.
The derivation is in the doc.
Callers 2
- ReplaceSpellInBook ui
- CGPlayer_C::LearnSpell objectlayer
Callees 25
- DwordArrayReserve loadingscreen
- 0x4368c0 unassigned
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- GrowableArrayChunk glue
- RoundUpToChunk glue
- CGGameUI::DisplayError ui
- SignalLanguageListChanged ui
- SortSpellBook ui
- ParseSpellRank ui
- SetArrayCapacity4b4f50 ui
- Quantum324b4fe0 ui
- RoundUp4b5020 ui
- ResizeArray4b5040 ui
- FireTutorial ui
- CGUnit_C::FindSkillLineAbility objectlayer
- SMemAlloc storm
- SStrCmp storm
- SStrCopy storm
- SStrPrintf storm
- FindSkillRaceClassInfo spell
- SetSpellCooldownRemaining spell
- FrameScript_SignalEvent ui
- FrameScript_SignalEvent2 ui
- _qsort crt
Calls and jumps by a bare address, from tables/calls.tsv.