From fb0b731371b2e7d77266dc76794d6c54855de789 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 28 Nov 2009 21:04:16 +0100 Subject: [PATCH] Add support for Prospecting --- Molinari.lua | 10 +++++++--- Molinari.toc | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Molinari.lua b/Molinari.lua index 933e57e..cef8a3f 100644 --- a/Molinari.lua +++ b/Molinari.lua @@ -16,7 +16,11 @@ button:SetScript('OnLeave', function(self) end) local macro = '/cast %s\n/use %s %s' -local spell = GetSpellInfo(51005) + +local spells = { + [ITEM_MILLABLE] = GetSpellInfo(51005), + [ITEM_PROSPECTABLE] = GetSpellInfo(31252), +} function button:MODIFIER_STATE_CHANGED(event, key) if(self:IsShown() and (key == 'LALT' or key == 'RALT')) then @@ -31,8 +35,8 @@ end GameTooltip:HookScript('OnTooltipSetItem', function(self) if(self:GetItem() and IsAltKeyDown() and not InCombatLockdown()) then - if(GameTooltipTextLeft2:GetText() == ITEM_MILLABLE) then - + local spell = spells[GameTooltipTextLeft2:GetText()] + if(spell) then button:SetAttribute('macrotext', macro:format(spell, GetMouseFocus():GetParent():GetID(), GetMouseFocus():GetID())) button:SetAllPoints(GetMouseFocus()) button:SetParent(GetMouseFocus()) diff --git a/Molinari.toc b/Molinari.toc index ae6dc3f..5f75c0d 100644 --- a/Molinari.toc +++ b/Molinari.toc @@ -2,6 +2,6 @@ ## Author: p3lim ## Version: Alpha ## Title: Molinari -## Notes: One-click milling +## Notes: One-click Milling/Prospecting! Molinari.lua -- 1.7.9.5