Thread: Macros in nUI
View Single Post
01-13-11, 02:58 PM   #12
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
And nUI Version 5 needed this change to work even the ones that didn't work in the version 6 code I posted earlier.

Code:
			elseif id
			and type == "macro" 
			and id > 0
			then

				local macroSpell,item,spell,helpful;
				
				if not SpellStatus[id] then SpellStatus[id] = {}; end;
				overlay.spellID        	= id;
				overlay.spellStatus    	= SpellStatus[id];
				macroSpell				= GetMacroSpell(id);
				macroItem				= GetMacroItem(id);
				
				if ( macroItem ) then
					item, spell = GetItemInfo(macroItem), GetItemSpell(macroItem)
				elseif ( macroSpell ) then
					spell = GetSpellInfo(macroSpell)
				end
				
				if ( spell ) then
					SpellStatus[id].name, SpellStatus[id].rank   = GetSpellInfo( spell );
				end
__________________