From 5bd1640ef40828c819160ba1cf2acb7be4eee83e Mon Sep 17 00:00:00 2001 From: parnic Date: Mon, 19 Jan 2009 04:28:13 +0000 Subject: [PATCH] - made the breakable frame work in one click instead of having to click the ability then the item you wanted to break --- Breakables.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Breakables.lua b/Breakables.lua index 44e3ca0..8bd4b03 100644 --- a/Breakables.lua +++ b/Breakables.lua @@ -232,9 +232,14 @@ function Breakables:FindBreakables() btn:SetHeight(40) btn:EnableMouse(true) btn:RegisterForClicks("AnyUp") - btn:SetAttribute("type1", "item") - btn:SetAttribute("bag1", foundBreakables[i][IDX_BAG]) - btn:SetAttribute("slot1", foundBreakables[i][IDX_SLOT]) + + btn:SetAttribute("type", "macro") + local BreakableAbilityName = GetSpellInfo((CanMill and MillingId) or (CanProspect and ProspectingId) or DisenchantId) + btn:SetAttribute("macrotext", "/cast "..BreakableAbilityName.."\n/use "..foundBreakables[i][IDX_BAG].." "..foundBreakables[i][IDX_SLOT]) + +-- btn:SetAttribute("type1", "item") +-- btn:SetAttribute("bag1", foundBreakables[i][IDX_BAG]) +-- btn:SetAttribute("slot1", foundBreakables[i][IDX_SLOT]) if not btn.text then btn.text = btn:CreateFontString()