mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-17 16:34:41 +00:00
Spell::Lookup::SpellNameToID walked both spellbooks itself to answer
GetSpellInfo("name"): an exact strcmp on the locale name, a hand
split of "(Rank N)" that also allowed a space before the parenthesis,
and highest rank by last match. Every other name path here
(Spell::Arg, the C_Spell identifiers, the macro parser) already goes
through the engine's resolver, so the same name could resolve in
C_Spell.GetSpellInfo and fail in GetSpellInfo.
The engine's chain is FUN_RESOLVE_SPELL_NAME_TO_BOOK_ID (0x004B3BC0)
-> SplitSpellNameAndResolve (0x004B3950, splits at the last '(') ->
FindBookSpellSlot (0x004B3A10: player then pet book, from the last slot
down, SStrCmpI on name and rank). GetSpellInfo(name) now calls it
through Spell::Arg::NameToSpellID, and SpellNameToID is gone. Names
match case-insensitively, "Name (Rank N)" with a space no longer
matches (as with CastSpellByName), and the Spell::NameResolve forms
("!Name", a bare spellID) resolve too. API.md says so, and the
SpellIdentifier note no longer calls the C_Spell name lookup
case-sensitive.