Thread: Macros in nUI
View Single Post
01-13-11, 08:24 AM   #11
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 6,006
Okay, seemingly easy as pie for the most part. probably needs some more work as not all macros worked but here goes.


Code:
				if buttonDetail.isPetButton then 
					spellName          = GetPetActionInfo( button:GetID() );
					spellType, spellId = spellName and GetSpellBookItemInfo( spellName, "pet" );
					caster             = UnitExists( "vehicle" ) and "vehicle" or "pet";
				else                    
					spellType, spellId = GetActionInfo( button.action );
					spellName          = spellId and GetSpellInfo( spellId );
					caster             = "player";
					
					if spellType == "macro" then
						spellName 		   = spellId and GetMacroSpell( spellId );
					end				end

				if spellId then
					start, duration, enable = GetSpellCooldown( spellId );
				end
Attached Images
File Type: jpg WoWScrnShot_011311_142147.jpg (324.1 KB, 897 views)
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 70 - Resto Druid
Gamaliel - 70 - Disc Priest
Lienae - 70 - Resto Shaman
Velandryn - 70 - Prot Paladin (TR)
+ 5 at 60+
+ 2 at 40+

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818