Removed some debug msgs, added /de m+debug and /de m+debugloot; Framework update
This commit is contained in:
@@ -27,7 +27,23 @@ local mythicDungeonCharts = Details222.MythicPlus.Charts.Listener
|
||||
local mythicDungeonFrames = Details222.MythicPlus.Frames
|
||||
|
||||
local CONST_DEBUG_MODE = false
|
||||
local SOFT_DEBUG_MODE = true
|
||||
local LOOT_DEBUG_MODE = false
|
||||
|
||||
function Details222.Debug.SetMythicPlusDebugState(bState)
|
||||
if (bState == nil) then
|
||||
bState = not CONST_DEBUG_MODE
|
||||
end
|
||||
CONST_DEBUG_MODE = bState
|
||||
Details:Msg("mythic+ debug mode:", tostring(CONST_DEBUG_MODE))
|
||||
end
|
||||
|
||||
function Details222.Debug.SetMythicPlusLootDebugState(bState)
|
||||
if (bState == nil) then
|
||||
bState = not LOOT_DEBUG_MODE
|
||||
end
|
||||
LOOT_DEBUG_MODE = bState
|
||||
Details:Msg("mythic+ loot debug mode:", tostring(LOOT_DEBUG_MODE))
|
||||
end
|
||||
|
||||
--debug
|
||||
_G.MythicDungeonFrames = mythicDungeonFrames
|
||||
@@ -104,7 +120,7 @@ function lootFrame.UpdateUnitLoot(unitBanner)
|
||||
---@type details_loot_cache[]
|
||||
local lootCandidates = {}
|
||||
|
||||
if (SOFT_DEBUG_MODE) then
|
||||
if (LOOT_DEBUG_MODE) then
|
||||
if (UnitIsUnit("player", unitId)) then
|
||||
Details:Msg("Loot UpdateUnitLoot:", unitName, GetTime())
|
||||
end
|
||||
@@ -121,6 +137,7 @@ function lootFrame.UpdateUnitLoot(unitBanner)
|
||||
lootCandidates[lootIndex] = lootInfo
|
||||
lootIndex = lootIndex + 1
|
||||
end
|
||||
table.remove(lootCache, i)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -145,7 +162,7 @@ function lootFrame.UpdateUnitLoot(unitBanner)
|
||||
|
||||
lootSquare:Show()
|
||||
|
||||
if (SOFT_DEBUG_MODE) then
|
||||
if (LOOT_DEBUG_MODE) then
|
||||
if (UnitIsUnit("player", unitId)) then
|
||||
Details:Msg("Loot DISPLAYED:", unitName, GetTime())
|
||||
end
|
||||
@@ -190,7 +207,7 @@ lootFrame:SetScript("OnEvent", function(self, event, ...)
|
||||
}
|
||||
table.insert(lootFrame.LootCache[unitName], lootCacheTable)
|
||||
|
||||
if (SOFT_DEBUG_MODE) then
|
||||
if (LOOT_DEBUG_MODE) then
|
||||
Details:Msg("Loot ADDED:", unitName, itemLink, effectiveILvl, itemQuality, baseItemLevel)
|
||||
end
|
||||
|
||||
@@ -204,7 +221,7 @@ lootFrame:SetScript("OnEvent", function(self, event, ...)
|
||||
end)
|
||||
end
|
||||
else
|
||||
if (SOFT_DEBUG_MODE) then
|
||||
if (LOOT_DEBUG_MODE) then
|
||||
Details:Msg("Loot SKIPPED:", unitName, itemLink, effectiveILvl, itemQuality, baseItemLevel)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user