Thread Tools Display Modes
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

WoWInterface » Featured Projects » OpenRDX » OpenRDX Support » OpenRDX: Feature Requests » RDXSS.GetSpellBookId(sname, bkt)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off