WoWInterface SVN Molinari

Compare Revisions

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

Rev 3 → Rev 2

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