Skip to content

Commit d879079

Browse files
committed
Fix display of spell/aura id tooltip while in combat for Midnight
1 parent 700b56e commit d879079

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

EasyTools.lua

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,19 +217,17 @@ local disabledKinds = EasyTools.disabledKinds
217217
local kindsByID = EasyTools.kindsByID
218218

219219
local function addLine(tooltip, id, kind)
220-
if isSecret(id) then return end
221220
if not id or id == "" or not tooltip or not tooltip.GetName then return end
222221
if disabledKinds[kind] then return end
223-
222+
224223
local ok, name = pcall(getTooltipName, tooltip)
225224
if not ok or not name then return end
226225

227226
local frame, text
228227
for i = tooltip:NumLines(), 1, -1 do
229228
frame = _G[name .. "TextLeft" .. i]
230229
if frame then text = frame:GetText() end
231-
if isSecret(text) then return end
232-
if text and string.find(text, kinds[kind]) then return end
230+
if not isSecret(text) and text and string.find(text, kinds[kind]) then return end
233231
end
234232

235233
local multiple = type(id) == "table"
@@ -686,6 +684,13 @@ end
686684
if TooltipDataProcessor then
687685
TooltipDataProcessor.AddTooltipPostCall(TooltipDataProcessor.AllTypes, function(tooltip, data)
688686
if not data or not data.type then return end
687+
688+
-- Blizz removed access while in combat for spells/auras
689+
if isSecret(data.type) then
690+
add(tooltip, data.id, "spell")
691+
return
692+
end
693+
689694
local kind = kindsByID[tonumber(data.type)]
690695

691696
if kind == "unit" and data and data.guid then
@@ -985,14 +990,14 @@ end
985990
local function EasyTools_ChatFrame_OnAddMessage(frame, text, ...)
986991
local TIMESTAMP_COLOR_CODE = "|cff808080"
987992

988-
if text and type(text) == "string" and text ~= "" then
989-
if not text:find("^" .. TIMESTAMP_COLOR_CODE .. ".-" .. "|r") then
993+
if text and type(text) == "string" and text ~= "" then
994+
if not text:find("^" .. TIMESTAMP_COLOR_CODE .. ".-" .. "|r") then
990995
local ts = GetTimestampString()
991996
if ts ~= "" then
992997
text = TIMESTAMP_COLOR_CODE .. "[" .. ts .. "]|r " .. text
993998
end
994-
end
995-
end
999+
end
1000+
end
9961001

9971002
return frame.OldAddMessage(frame, text, ...)
9981003
end

EasyTools.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Interface: 110207, 110100, 110105, 120001
22
## Title: EasyTools
3-
## Version: 1.0.6
3+
## Version: 1.0.7
44
## Notes: Adds IDs to tooltips, NPC alive time, quest tracking and timestamp in chat
55
## Author: Haidenz
66
## IconTexture: Interface\ICONS\INV_Misc_Wrench_01

0 commit comments

Comments
 (0)