Open Vegeir opened 7 years ago
I was looking at the same exact thing, and I can't seem to get the KnowMult from anywhere. The blizz function appears to be hidden, and the LAD guy catches things when the artifact updates.
If you look at the ((knowMult) - 1 * 100))
part of the code, you can see where the -98 comes from. What I don't get then, is why knowMult AND knowLevel are booth returning as 2.
EDIT: Looking at the blizz ArtifactUI.lua, here is their thingie for the Knowledge Multiplier:
local knowledgeLevel = C_ArtifactUI.GetArtifactKnowledgeLevel();
if knowledgeLevel and knowledgeLevel > 0 then
local knowledgeMultiplier = C_ArtifactUI.GetArtifactKnowledgeMultiplier();
local percentIncrease = math.floor(((knowledgeMultiplier - 1.0) * 100) + .5);
if percentIncrease > 0.0 then
if addedAnyMetaPowers then
GameTooltip:AddLine(" ");
end
GameTooltip:AddLine(ARTIFACTS_KNOWLEDGE_TOOLTIP_LEVEL:format(knowledgeLevel), HIGHLIGHT_FONT_COLOR:GetRGB());
GameTooltip:AddLine(ARTIFACTS_KNOWLEDGE_TOOLTIP_DESC:format(BreakUpLargeNumbers(percentIncrease)), NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true);
end
end
Calling C_ArtifactUI.GetArtifactKnowledgeLevel()
results in a nill return. Which is what the library guy mentioned and said he uses the UPDATE call to get the knowMult
Something is wrong with the Artifact Knowledge tooltip. I looked through the LibArtifactData-1.0 GitHub as well but I am not sure whether it is his code or yours.
Here are two examples. The first with my Hunter at AK Rank 1 (25% boost) and the second with him at AK Rank 2 (50% boost):
I reviewed the LAD documentation:
The issue is either with the logic starting at line 471 of your talent.lua or with the LAD function itself.
The math calling the percentage boost still didn't look right but I tested by changing line 476 to read:
GameTooltip:AddDoubleLine(L['Artifact Knowledge']..':', string.format('%d (%d%%)', knowLevel, ((knowMult) - 1 * 100)), 1, 1, 0, 1, 1, 1)
This fixed the (x-98) to display a percentage, but as I suspected the "-98" value was what the function was returning:
Here is a link to a table published with the proper values (FYI only):
[http://www.wowhead.com/guides/legion/artifact-weapons#knowledge]
I am very new to Lua programming but I don't understand how you are getting the knowLevel and knowMult values from the LAD function call when the author's values are locally defined (in his Lua file) as lvl and mult respecitvely.
At any rate, sorry for the long post but I wanted you to see what I was looking at. I have to run for a bit but I'll check in later.
Thanks in advance!