Quantcast
WoWInterface: SVN - Molinari - Path Comparison - /trunk Rev 13 and /trunk Rev 14

WoWInterface SVN Molinari

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 13 to Rev 14
    Reverse comparison

Rev 13 → Rev 14

Molinari/Molinari.toc
2,6 → 2,6
## Author: p3lim
## Version: 30100.wowi:revision
## Title: Molinari
## Notes: One-click milling!
## Notes: One-click milling/prospecting!
 
Molinari.lua
Molinari/Molinari.lua
26,32 → 26,34
 
--]]
 
local milling, prospecting = GetSpellInfo(51005), GetSpellInfo(31252)
if(not GetSpellInfo(milling) and not GetSpellInfo(31252)) then return end
 
local button = CreateFrame('Button', 'Molinari', UIParent, 'SecureActionButtonTemplate, AutoCastShineTemplate')
 
local strings = {
[ITEM_MILLABLE] = GetSpellInfo(51005),
[ITEM_PROSPECTABLE] = GetSpellInfo(31252),
[ITEM_MILLABLE] = { name = milling, r = 0.5, g = 1, b = 0.5 },
[ITEM_PROSPECTABLE] = { name = prospecting, r = 1, g = 0.5, b = 0.5 },
}
 
local function clickArgs()
return (not IsAddOnLoaded('Blizzard_AuctionUI') or AuctionFrame and not AuctionFrame:IsShown()) and not TradeFrame:IsShown() and not BankFrame:IsShown() and not MailFrame:IsShown() and not InCombatLockdown() and IsAltKeyDown()
end
 
local function hookScript(self)
if(self:GetItem() and IsAltKeyDown() and not InCombatLockdown()) then
local text = GameTooltipTextLeft2:GetText()
local spell = strings[text]
if(self:GetItem() and clickArgs()) then
local spell = strings[GameTooltipTextLeft2:GetText()]
 
if(spell) then
local mouse = GetMouseFocus()
 
button:SetAttribute('macrotext', string.format('/cast %s\n/use %s %s', spell, mouse:GetParent():GetID(), mouse:GetID()))
button:SetAttribute('macrotext', string.format('/cast %s\n/use %s %s', spell.name, mouse:GetParent():GetID(), mouse:GetID()))
button:ClearAllPoints()
button:SetAllPoints(mouse)
button:SetParent(mouse)
button:Show()
 
if(text == ITEM_MILLABLE) then
AutoCastShine_AutoCastStart(button, 0.5, 1, 0.5)
else
AutoCastShine_AutoCastStart(button, 1, 0.5, 0.5)
end
AutoCastShine_AutoCastStart(button, spell.r, spell.g, spell.b)
end
end
end
94,6 → 96,7
end
 
-- temporary fix for blizzard's bug with secure frames and anchoring on the ContainerFrame
if(Bagnon or cargBags or Combuctor) then return end
hooksecurefunc('ContainerFrame_GenerateFrame', function(self, size, id)
if(size ~= 1 and id == 0) then
ContainerFrame1Item1:SetPoint('BOTTOMRIGHT', ContainerFrame1MoneyFrameCopperButton, 'BOTTOMRIGHT', 3, 21)