It for me it not changing anything looks as if the addon is not there but is shown in the addon list. So this is the code how i cange it.
EDIT:
This is how the german tooltip looks like - maybe its different?
juwe.toc
Lua Code:
## Interface: 50200
## Notes: Jewelcrafting gems stats instead of names
## Version: 1.0
## Title: Juwe
## Author: p3lim
juwe.lua
juwe.lua
Lua Code:
local tip = CreateFrame('GameTooltip', 'GemStatsTip')
local line1 = tip:CreateFontString()
local line2 = tip:CreateFontString()
local line3 = tip:CreateFontString()
tip:AddFontStrings(tip:CreateFontString(), tip:CreateFontString())
tip:AddFontStrings(line1, tip:CreateFontString())
tip:AddFontStrings(line2, tip:CreateFontString())
tip:AddFontStrings(line3, tip:CreateFontString())
local JEWELCRAFTING_S = GetSpellInfo(755)
local GEM_S = '%+[0-9]+.*'
local match = string.match
local function GetGemStats(id)
tip:SetOwner(WorldFrame, 'ANCHOR_NONE')
tip:SetTradeSkillItem(id)
if(tip:IsShown()) then
return match(line1:GetText() or '', GEM_S) or match(line2:GetText() or '', GEM_S) or match(line3:GetText() or '', GEM_S)
end
end
local function Update()
if(GetTradeSkillLine() ~= JEWELCRAFTING_S) then return end
if(not IsTradeSkillReady()) then return end
local filterBar = TradeSkillFilterBar:IsShown()
for index = 1, TRADE_SKILLS_DISPLAYED, 1 do
local buttonIndex = filterBar and index + 1 or index
local stats = GetGemStats(_G['TradeSkillSkill' .. buttonIndex]:GetID())
if(stats) then
_G['TradeSkillSkill' .. buttonIndex .. 'Text']:SetText(stats)
end
end
end
local f = CreateFrame('Frame')
f:RegisterEvent('ADDON_LOADED')
f:SetScript('OnEvent', function(self, event, name)
if(name == 'Blizzard_TradeSkillUI') then
hooksecurefunc('TradeSkillFrame_Update', Update)
end
end)