Drycoded and untested
Code:
local pLevel = UnitLevel("player")
local maxLevelTip = function(frame,type,index)
if GameTooltip:IsOwned(frame) then
local item, link = GameTooltip:GetItem()
if item and link and pLevel < MAX_PLAYER_LEVEL and IsAltKeyDown() then
local modlink = gsub(link,":(%d+)(:%d+:%d+\124h%[)",format(":%d%%2",MAX_PLAYER_LEVEL))
print(modlink) -- debug
GameTooltip:SetHyperlink(modlink)
GameTooltip:SetOwner(frame,"ANCHOR_RIGHT")
GameTooltip:Show()
end
end
end
if IsAddOnLoaded("Blizzard_AuctionUI") then
hooksecurefunc("AuctionFrameItem_OnEnter",maxLevelTip)
else
local e = CreateFrame("Frame")
e.addon_loaded = function(_,_,addon)
if addon == "Blizzard_AuctionUI" then
e:UnregisterEvent("ADDON_LOADED")
hooksecurefunc("AuctionFrameItem_OnEnter",maxLevelTip)
end
end
e:RegisterEvent("ADDON_LOADED")
e:SetScript("OnEvent",e.addon_loaded)
end
Might work if Blizzards lets enchant and gem links scale same as Heirlooms.
What this code does is it replaces the linklevel field with the max_level if player level is below that.
You could obviously customize it for any level.
Like I said the constructed link should be proper but I'm not sure the game will respect it.