View Single Post
01-30-12, 07:36 PM   #1
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
RDXSS.GetSpellBookId(sname, bkt)

=p Add this in please.

lua Code:
  1. -- Given a spell's full name and Booktype (BOOKTYPE_SPELL or BOOKTYPE_PET), return spell's book numerical ID.
  2. function RDXSS.GetSpellBookId(sname, bkt)
  3.     if not sname then return nil; end
  4.     if not bkt then return nil; end
  5.     for i = 1, MAX_SKILLLINE_TABS do
  6.         local name, texture, offset, numSpells = GetSpellTabInfo(i);
  7.         if not name then break; end
  8.         for s = offset + 1, offset + numSpells do
  9.             if (sname == GetSpellBookItemName(s,bkt)) then
  10.                 return s;
  11.             end
  12.         end
  13.     end
  14.     return 0;
  15. end
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **

Last edited by unlimit : 01-30-12 at 07:52 PM.
  Reply With Quote