fixed class played time spamming chat
This commit is contained in:
+9
-1
@@ -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)
|
||||
|
||||
|
||||
+3
-3
@@ -6136,9 +6136,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
_instance_backup = {},
|
||||
}
|
||||
local exitErrors = __details_backup._exit_error
|
||||
|
||||
|
||||
local addToExitErrors = function(text)
|
||||
table.insert(exitErrors, 1, text)
|
||||
table.insert(exitErrors, 1, date() .. "|" .. text)
|
||||
table.remove(exitErrors, 10)
|
||||
end
|
||||
|
||||
@@ -6150,7 +6150,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
|
||||
end)
|
||||
|
||||
if (not savePlayTimeClass) then
|
||||
addToExitErrors("Saving Play Time:" .. savePlayTimeError)
|
||||
addToExitErrors("Saving Play Time: " .. savePlayTimeError)
|
||||
end
|
||||
|
||||
--SAVINGDATA = true
|
||||
|
||||
Reference in New Issue
Block a user