fixed class played time spamming chat

This commit is contained in:
Tercio Jose
2022-12-08 15:41:24 -03:00
parent 0707c310d9
commit 6609580f09
6 changed files with 410 additions and 394 deletions
+9 -1
View File
@@ -3128,7 +3128,15 @@ end
hooksecurefunc("ChatFrame_DisplayTimePlayed", function()
if (Details.played_class_time) then
print(Details.GetPlayTimeOnClassString() .. " (/details playedclass)")
C_Timer.After(0, function()
local levelText = TIME_PLAYED_LEVEL and TIME_PLAYED_LEVEL:gsub("%%s", "") or ""
for fontString in ChatFrame1.fontStringPool:EnumerateActive() do
if (fontString:GetText() and fontString:GetText():find(levelText)) then
print(Details.GetPlayTimeOnClassString() .. " (/details playedclass)")
break
end
end
end)
end
end)