WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   OpenRDX: Feature Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=104)
-   -   RDXSS.GetSpellBookId(sname, bkt) (https://www.wowinterface.com/forums/showthread.php?t=42498)

unlimit 01-30-12 07:36 PM

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


All times are GMT -6. The time now is 02:27 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI