small adjustments and bug fixes
This commit is contained in:
+50
-1
@@ -3044,4 +3044,53 @@ local timePlayerFrame = CreateFrame("frame")
|
||||
timePlayerFrame:RegisterEvent("TIME_PLAYED_MSG")
|
||||
timePlayerFrame:SetScript("OnEvent", function()
|
||||
--C_Timer.After(0, function() print(Details.GetPlayTimeOnClassString()) end)
|
||||
end)
|
||||
end)
|
||||
|
||||
local stutterCounter = 0
|
||||
local UpdateAddOnMemoryUsage_Original = _G.UpdateAddOnMemoryUsage
|
||||
_G["UpdateAddOnMemoryUsage"] = function()
|
||||
local currentTime = debugprofilestop()
|
||||
UpdateAddOnMemoryUsage_Original()
|
||||
local deltaTime = debugprofilestop() - currentTime
|
||||
|
||||
if (deltaTime > 16) then
|
||||
local callStack = debugstack(2, 0, 4)
|
||||
--ignore if is coming from the micro menu tooltip
|
||||
if (callStack:find("MainMenuBarPerformanceBarFrame_OnEnter")) then
|
||||
return
|
||||
end
|
||||
|
||||
stutterCounter = stutterCounter + 1
|
||||
local stutterDegree = 0
|
||||
if (stutterCounter > 60) then
|
||||
if (deltaTime < 48) then
|
||||
Details:Msg("some addon may be causing small framerate stuttering, use '/details perf' to know more.")
|
||||
stutterDegree = 1
|
||||
|
||||
elseif (deltaTime <= 100) then
|
||||
Details:Msg("some addon may be causing framerate drops, use '/details perf' to know more.")
|
||||
stutterDegree = 2
|
||||
|
||||
else
|
||||
Details:Msg("some addon might be causing performance issues, use '/details perf' to know more.")
|
||||
stutterDegree = 3
|
||||
end
|
||||
|
||||
stutterCounter = 0
|
||||
end
|
||||
|
||||
Details.performanceData = {
|
||||
deltaTime = deltaTime,
|
||||
callStack = callStack,
|
||||
culpritFunc = "_G.UpdateAddOnMemoryUsage()",
|
||||
culpritDesc = "Calculates memory usage of addons",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Details.performanceData = {
|
||||
deltaTime = 0,
|
||||
callStack = "",
|
||||
culpritFunc = "",
|
||||
culpritDesc = "",
|
||||
}
|
||||
+4
-1
@@ -435,6 +435,9 @@
|
||||
--> register comm
|
||||
|
||||
function Details:CommReceived(commPrefix, data, channel, source)
|
||||
|
||||
--print("comm", source, data)
|
||||
|
||||
local deserializedTable = {Details:Deserialize(data)}
|
||||
if (not deserializedTable[1]) then
|
||||
if (Details.debugnet) then
|
||||
@@ -448,7 +451,7 @@
|
||||
player = source
|
||||
|
||||
if (Details.debugnet) then
|
||||
Details:Msg("(debug) network received prefix:", prefix, "length:", string.len(data))
|
||||
Details:Msg("(debug) network received prefix:", prefix, "length:", string.len(data), source)
|
||||
end
|
||||
|
||||
if (type(prefix) ~= "string") then
|
||||
|
||||
+3
-2
@@ -413,7 +413,7 @@
|
||||
ignore_spikeballs = 0,
|
||||
}
|
||||
|
||||
local NPCID_KELTHUZAD_ADDMIMICPLAYERS = 176605
|
||||
local NPCID_KELTHUZAD_ADDMIMICPLAYERS = 176605
|
||||
|
||||
--> damage spells to ignore
|
||||
local damage_spells_to_ignore = {
|
||||
@@ -421,8 +421,9 @@
|
||||
--it is not useful for damage done or friendly fire
|
||||
[SPELLID_WARLOCK_SOULLINK] = true,
|
||||
[371597] = true, --Protoform Barrier gotten from an SPELL_ABSORBED cleu event
|
||||
[371701] = true, --Protoform Barrier
|
||||
}
|
||||
|
||||
|
||||
--> expose the ignore spells table to external scripts
|
||||
_detalhes.SpellsToIgnore = damage_spells_to_ignore
|
||||
|
||||
|
||||
@@ -1676,6 +1676,11 @@ function Details.ShowCopyValueFrame(textToShow)
|
||||
frame.editBox:ClearFocus()
|
||||
frame:Hide()
|
||||
end)
|
||||
|
||||
frame.editBox:SetScript("OnChar", function()
|
||||
frame.editBox:ClearFocus()
|
||||
frame:Hide()
|
||||
end)
|
||||
end
|
||||
|
||||
DetailsCopyValueFrame:Show()
|
||||
|
||||
Reference in New Issue
Block a user