WoWInterface SVN Molinari

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

Molinari/Molinari.lua
30,6 → 30,10
 
--]]
 
-- todo:
-- - fix the issue with backpack, god knows what fucks it over
 
 
local tooltip, onShow = GameTooltip
 
local button = CreateFrame('Button', 'Molinari', UIParent, 'SecureActionButtonTemplate AutoCastShineTemplate')
44,10 → 48,10
 
do
local spell = GetSpellInfo(51005)
local macro = '/cast %s\n/use %s'
local macro = '/cast %s\n/use %s %s' -- bag slot
local orig = tooltip:GetScript('OnTooltipSetItem')
 
function onShow(self, ...)
function tooltipHook(self, ...)
if(self and orig) then orig(self, ...) end
local item = self:GetItem()
 
56,7 → 60,7
 
if(text and text == ITEM_MILLABLE and not InCombatLockdown() and IsAltKeyDown()) then
button:ClearAllPoints()
button:SetAttribute('macrotext', macro:format(spell, item))
button:SetAttribute('macrotext', macro:format(spell, GetMouseFocus():GetParent():GetID(), GetMouseFocus():GetID()))
button:SetAllPoints(GetMouseFocus())
AutoCastShine_AutoCastStart(button, 0.5, 1, 0.5)
button:Show()
89,4 → 93,4
button:SetFrameStrata('DIALOG')
button:SetScript('OnLeave', function(self) self:Hide() end)
button:SetScript('OnEvent', function(self, event, ...) self[event](self, event, ...) end)
tooltip:SetScript('OnTooltipSetItem', onShow)
\ No newline at end of file +tooltip:SetScript('OnTooltipSetItem', tooltipHook) \ No newline at end of file