mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Backport C_SpellBook.GetSpellBookItemInfo(slotIndex, spellBank) -> table, reusing Spell::Info's DBC reader. slotIndex is 1-based across the book; spellBank is Enum.SpellBookSpellBank (0 = Player, 1 = Pet), resolved via Spell::Lookup::SpellbookSlotToID. Returns nil for an empty/out-of-range slot, matching retail. Fields map from Spell.dbc: itemType is Spell (player) or PetAction (pet) - vanilla's book holds only real spells, so None/FutureSpell/Flyout never occur; actionID == spellID (no override system); name/subName from the localized Name/Rank; isPassive from Attributes; isOffSpec always false. iconID is the icon PATH string (vanilla has no fileID), the same deviation as C_Spell.GetSpellInfo.iconID; skillLineIndex is omitted. Also register the two Enum tables the return contract references (non-destructively, like the other Enum.* additions) so info.itemType == Enum.SpellBookItemType.Spell comparisons work: Enum.SpellBookSpellBank and Enum.SpellBookItemType. Document in docs/API.md (SpellBook section + both Enum entries) and list in README.