diff --git a/SageGearLevelTooltip.lua b/SageGearLevelTooltip.lua
index 7d252dc..a0abbac 100644
--- a/SageGearLevelTooltip.lua
+++ b/SageGearLevelTooltip.lua
@@ -209,7 +209,6 @@ local BestReforgedEvaluator do
end
function class:Evaluate(itemLink)
--- self:Debug("BestReforgedEvaluator:Evaluate")
if not itemLink then return end
itemLink = Item:New(itemLink):WithoutMods():ItemString()
local stats = GetItemStats(itemLink) -- baseline w/o reforging
@@ -276,20 +275,10 @@ local EvaluatorToLineAdderAdaptor do
local leftText = left and leftLabel and (leftLabel.label .. ": " .. left)
local rightText = right and rightLabel and (rightLabel.label .. ": " .. right)
if leftText and rightText then
--- self:Debug("left [" .. tostring(leftText) .. "] right [" .. tostring(rightText) .. "] tooltip " .. tostring(tooltip))
--- ChatFrame1:AddMessage("left [" .. tostring(leftText) .. "] right [" .. tostring(rightText) .. "] tooltip " .. tostring(tooltip))
--- self:Debug("r=" .. leftLabel.r .. " g=" .. leftLabel.g .. " b=" .. leftLabel.b)
--- print(tooltip == GameTooltip, "L <", leftText, ">", leftLabel.r, leftLabel.g, leftLabel.b)
--- print(tooltip == GameTooltip, "R <", rightText, ">", rightLabel.r, rightLabel.g, rightLabel.b)
tooltip:AddDoubleLine(leftText, rightText,
leftLabel.r, leftLabel.g, leftLabel.b,
rightLabel.r, rightLabel.g, rightLabel.b)
--- tooltip:Show()
elseif leftText then
--- self:Debug("left [" .. tostring(leftText) .. "] right [" .. tostring(rightText) .. "] tooltip " .. tostring(tooltip))
--- ChatFrame1:AddMessage("left [" .. tostring(leftText) .. "] right [" .. tostring(rightText) .. "] tooltip " .. tostring(tooltip))
--- self:Debug("r=" .. leftLabel.r .. " g=" .. leftLabel.g .. " b=" .. leftLabel.b)
--- print(tooltip == GameTooltip, "L <", leftText, ">", leftLabel.r, leftLabel.g, leftLabel.b)
tooltip:AddLine(leftLabel.label .. ": " .. left, leftLabel.r, leftLabel.g, leftLabel.b)
end
end
@@ -315,11 +304,9 @@ local SageGearLevelTooltipUpdater do
-- Updates the tooltip with all the comments from the item commenters
-- @param tooltip A "tooltip" support :AddLine and :AddDoubleLine *only*
function class:UpdateTooltip(tooltip)
--- self:Debug("Updating tooltip " .. tostring(tooltip))
local _,itemLink = tooltip:GetItem()
local tooltipAdapter = {
mustShow = false,
--- Show = function(adapter, ...) tooltip:Show(...) end,
AddLine = function(adapter, ...) adapter.mustShow = true; tooltip:AddLine(...) end,
AddDoubleLine = function(adapter, ...) adapter.mustShow = true; tooltip:AddDoubleLine(...) end
}
@@ -332,9 +319,6 @@ local SageGearLevelTooltipUpdater do
end
function class:_HookFrameMethods()
--- for tooltipName, methods in pairs(methodsToHook) do
--- self:HookTooltip(tooltipName, methods)
--- end
self:Print("SageGearLevelTooltip loaded.")
return self
end
@@ -347,7 +331,6 @@ local SageGearLevelTooltipUpdater do
end
local methodCount = 0
for _, method in ipairs(methods) do
--- self:Debug((tooltip and tooltipName or "whoops") .. "/" .. type(tooltip) .. "+" .. method .. "/" .. type(method))
local hasMethodToHook = tooltip[method]
if hasMethodToHook then
hooksecurefunc(tooltip, method, update)
@@ -385,13 +368,6 @@ local SageGearLevelTooltipUpdater do
end
----------------------------------------------------------------------------------------------------
---local methodsToHook = {
--- GameTooltip = {"SetBagItem", "SetInventoryItem", "SetHyperlink", "SetAuctionItem",
--- "SetQuestItem", "SetQuestLogItem"},
--- ItemRefTooltip = {"SetHyperlink", "Show", "Hide"},
--- ShoppingTooltip1 = {"SetHyperlinkCompareItem"},
--- ShoppingTooltip2 = {"SetHyperlinkCompareItem"}}
-
SageGearLevelTooltipUpdater:New(methodsToHook)
:HookTooltip("GameTooltip", {"SetAuctionItem", "SetAuctionSellItem", "SetBagItem", "SetBuybackItem",
"SetExistingSocketGem", "SetGuildBankItem", "SetInboxItem", "SetInventoryItem", "SetHyperlink",
@@ -403,7 +379,7 @@ SageGearLevelTooltipUpdater:New(methodsToHook)
:HookTooltip("ShoppingTooltip2", {"SetHyperlinkCompareItem"})
--- :AddItemCommenter(ItemLevelIdCommenter:New())
+ :AddItemCommenter(ItemLevelIdCommenter:New())
--DK
:AddSelfEvaluator("DEATHKNIGHT", BestReforgedEvaluator:New({label = "Blood DK", r=1.0, g=0.2, b=0.4},
@@ -520,16 +496,3 @@ SageGearLevelTooltipUpdater:New(methodsToHook)
:AddSelfEvaluator("WARRIOR", BestReforgedEvaluator:New({label = "Prot Warrior", r=1.0, g=0.4, b=0.4},
{Stamina=100, Mastery=100, Dodge=90, Parry=67, Agility=67, Strength=48, Expertise=19, Hit=10, Crit=7, Armor=6, Haste=1})
:Cache())
-
--- :AddEvaluator(SimplePawnEvaluator:New({label = "W.Simple", r=0.8, g=0.8, b=1.0},
--- {Strength=48, Agility=67, Stamina=100, Hit=10, Crit=7, Haste=1, AP=1, Expertise=19, Armor=6, Dodge=90, Parry=67})
--- :Cache())
----- :AddEvaluator(SimplePawnEvaluator:New({label = "M.Simple", r=0.8, g=1, b=0.6},
----- {Mastery=1})
----- :Cache())
--- :AddEvaluator(AsReforgedPawnEvaluator:New({label = "W.Reforged", r=0.8, g=0.8, b=1.0},
--- {Strength=48, Agility=67, Stamina=100, Hit=10, Crit=7, Haste=1, AP=1, Expertise=19, Armor=6, Dodge=90, Parry=67})
--- :Cache())
----- :AddEvaluator(AsReforgedPawnEvaluator:New({label = "M.Reforged", r=0.8, g=1, b=0.6},
----- {Mastery=1})
----- :Cache())