WoWInterface SVN Molinari

Compare Revisions

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

Rev 12 → Rev 13

Molinari/Molinari.lua
39,11 → 39,12
local spell = strings[text]
 
if(spell) then
local anchor = GetMouseFocus()
local mouse = GetMouseFocus()
 
button:SetAttribute('macrotext', string.format('/cast %s\n/use %s %s', spell, anchor:GetParent():GetID(), anchor:GetID()))
button:SetAttribute('macrotext', string.format('/cast %s\n/use %s %s', spell, mouse:GetParent():GetID(), mouse:GetID()))
button:ClearAllPoints()
button:SetAllPoints(anchor)
button:SetAllPoints(mouse)
button:SetParent(mouse)
button:Show()
 
if(text == ITEM_MILLABLE) then
55,17 → 56,21
end
end
 
local function safeStop(self)
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_ENABLED')
else
self:Hide()
end
end
 
function button:MODIFIER_STATE_CHANGED(event, key)
if(self:IsShown() and string.match(key, 'ALT$')) then
if(InCombatLockdown()) then
self:RegisterEvent('PLAYER_REGEN_DISABLED')
else
self:Hide()
end
safeStop(self)
end
end
 
function button:PLAYER_REGEN_DISABLED(event)
function button:PLAYER_REGEN_ENABLED(event)
self:UnregisterEvent(event)
self:Hide()
end
73,10 → 78,9
function button:PLAYER_LOGIN()
self:RegisterForClicks('LeftButtonUp')
self:RegisterEvent('MODIFIER_STATE_CHANGED')
self:SetFrameStrata('DIALOG')
self:SetAttribute('*type*', 'macro')
 
self:SetScript('OnLeave', function() self:Hide() end)
self:SetScript('OnLeave', safeStop)
GameTooltip:HookScript('OnTooltipSetItem', hookScript)
end