benilla-re systems structs docs

CGPlayer_C::LearnSpell

function · objectlayer · primitive

Address
0x5e9c20 · 955 bytes, up to 0x5e9fda
Signature
void __thiscall (CGPlayer_C *this, uint32_t spell, int32_t x, uint32_t a3, uint32_t notify)
Meaning
Records a known spell on its skill line, spell-book tab, effect slot or weapon proficiency
Confidence
verified, proof one
Finding
objectlayer/playercombat#learning-a-spell

Finding: Learning a spell in objectlayer: player spells and combat

0x5e9c20(spell, x, a3, notify) records a spell the player knows. An id above the store's bound prints NOSPELLIDFOUND|%d and stops. With notify it first calls 0x4b25b0(spell, a3, 0). A spell with Attributes 0x20 is added to its skill line's node in the table +0x1c74; one with a tab above 0 to that tab's array at +0x1cd0, once. Otherwise effect 0x2f stores it by its misc value at +0x1d10, effect 0x65 makes it the feed-pet spell, and any effect 0x3c records it under its weapon proficiency in +0x1c9c. Effect 0x28 as the first also stores it in 0xc4d770.

The derivation is in the doc.

Callers 3

Callees 18

Calls and jumps by a bare address, from tables/calls.tsv.