|
function tooltipHook(self, ...) |
if(self and orig) then orig(self, ...) end |
if(self:GetItem()) then |
if(InCombatLockdown()) then return end |
|
if(self:GetItem() and IsAltKeyDown()) then |
local text = GameTooltipTextLeft2:GetText() |
|
if(text and not InCombatLockdown() and IsAltKeyDown()) then |
if(text == ITEM_MILLABLE or text == ITEM_PROSPECTABLE) then |
local scribe = text == ITEM_MILLABLE |
button:ClearAllPoints() |
button:SetAttribute('macrotext', macro:format(scribe and milling or prospecting, GetMouseFocus():GetParent():GetID(), GetMouseFocus():GetID())) |
button:SetAllPoints(GetMouseFocus()) |
button:Show() |
if(text and (text == ITEM_MILLABLE or text == ITEM_PROSPECTABLE)) then |
local scribe = text == ITEM_MILLABLE |
local anchor = GetMouseFocus() |
|
if(scribe) then |
AutoCastShine_AutoCastStart(button, 0.5, 1, 0.5) |
else |
AutoCastShine_AutoCastStart(button, 1, 0.5, 0.5) |
end |
button:ClearAllPoints() |
button:SetAttribute('macrotext', macro:format(scribe and milling or prospecting, anchor:GetParent():GetID(), anchor:GetID())) |
button:SetAllPoints(anchor) |
button:Show() |
|
if(scribe) then |
AutoCastShine_AutoCastStart(button, 0.5, 1, 0.5) |
else |
AutoCastShine_AutoCastStart(button, 1, 0.5, 0.5) |
end |
end |
end |