Skip to content

Commit

Permalink
Classic: The Added With Patch and Removed With Patch tooltip text can…
Browse files Browse the repository at this point in the history
… now be disabled... But you probably shouldn't. Your choice I guess.
  • Loading branch information
DFortun81 committed Dec 21, 2023
1 parent 022697f commit 3d78a3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 9 additions & 5 deletions classic/ATT-Classic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2114,12 +2114,14 @@ local function GetCachedSearchResults(search, method, paramA, paramB, ...)
awpGreaterThanRWP = rwp and awp >= rwp;
local awpString = GetAddedWithPatchString(awp, awpGreaterThanRWP);
if awpString then
tinsert(info, 1, { left = awpString, wrap = true, color = app.Colors.AddedWithPatch });
if app.Settings:GetTooltipSetting("awp") then
tinsert(info, 1, { left = awpString, wrap = true, color = app.Colors.AddedWithPatch });
end
else
awpGreaterThanRWP = true;
end
end
if rwp then
if rwp and app.Settings:GetTooltipSetting("rwp") then
tinsert(info, awpGreaterThanRWP and 1 or 2, { left = GetRemovedWithPatchString(rwp), wrap = true, color = app.Colors.RemovedWithPatch });
end

Expand Down Expand Up @@ -10954,16 +10956,18 @@ local function RowOnEnter(self)
local awp, rwp = GetRelativeValue(reference, "awp"), reference.rwp;
if rwp then
local rwpString = GetRemovedWithPatchString(rwp);
if not linesByText[rwpString] then
if not linesByText[rwpString] and app.Settings:GetTooltipSetting("rwp") then
local r,g,b = HexToRGB(app.Colors.RemovedWithPatch);
GameTooltip:AddLine(rwpString, r, g, b, 1);
end
end
if awp and ((rwp or (reference.u and reference.u < 3)) or awp >= app.GameBuildVersion) then
local awpString = GetAddedWithPatchString(awp, awp and rwp and awp > rwp);
if awpString and not linesByText[awpString] then
local r,g,b = HexToRGB(app.Colors.AddedWithPatch);
GameTooltip:AddLine(awpString, r, g, b, 1);
if app.Settings:GetTooltipSetting("awp") then
local r,g,b = HexToRGB(app.Colors.AddedWithPatch);
GameTooltip:AddLine(awpString, r, g, b, 1);
end
end
end
if reference.questID and not reference.objectiveID then
Expand Down
2 changes: 2 additions & 0 deletions classic/Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ local TooltipSettingsBase = {
["SummarizeThings"] = true,
["Warn:Removed"] = true,
["creatures"] = true,
["awp"] = true,
["rwp"] = true,
},
};
local UnobtainableSettingsBase = {
Expand Down

0 comments on commit 3d78a3e

Please sign in to comment.