Pet container rewritten

This commit is contained in:
Tercio Jose
2024-06-14 18:30:20 -03:00
committed by andrew6180
parent 85fff228df
commit f6c59381ab
25 changed files with 784 additions and 469 deletions
@@ -10,7 +10,6 @@ local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink --api local
local GetSpellInfo = GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
local DF = DetailsFramework
local tinsert = table.insert
@@ -10,7 +10,6 @@ local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
local DF = DetailsFramework
local detailsFramework = DetailsFramework
local tinsert = table.insert
@@ -1199,6 +1199,8 @@ local refreshSpellsFunc = function(scrollFrame, scrollData, offset, totalLines)
nameToUse = bkSpellData.actorName
end
--both calls are equal but the traceback will be different in case of an error
if (bIsActorHeader) then
updateSpellBar(spellBar, index, nameToUse, combatObject, scrollFrame, headerTable, bkSpellData, spellTableIndex, totalValue, topValue, bIsMainLine, keyToSort, spellTablesAmount)
@@ -27,6 +27,7 @@ local mythicDungeonCharts = Details222.MythicPlus.Charts.Listener
local mythicDungeonFrames = Details222.MythicPlus.Frames
local CONST_DEBUG_MODE = false
local SOFT_DEBUG_MODE = true
--debug
_G.MythicDungeonFrames = mythicDungeonFrames
@@ -103,6 +104,12 @@ function lootFrame.UpdateUnitLoot(unitBanner)
---@type details_loot_cache[]
local lootCandidates = {}
if (SOFT_DEBUG_MODE) then
if (UnitIsUnit("player", unitId)) then
Details:Msg("Loot UpdateUnitLoot:", unitName, GetTime())
end
end
if (lootCache) then
local lootCacheSize = #lootCache
if (lootCacheSize > 0) then
@@ -137,6 +144,12 @@ function lootFrame.UpdateUnitLoot(unitBanner)
mythicDungeonFrames.ReadyFrame.StopTextDotAnimation()
lootSquare:Show()
if (SOFT_DEBUG_MODE) then
if (UnitIsUnit("player", unitId)) then
Details:Msg("Loot DISPLAYED:", unitName, GetTime())
end
end
end
end
@@ -177,6 +190,10 @@ lootFrame:SetScript("OnEvent", function(self, event, ...)
}
table.insert(lootFrame.LootCache[unitName], lootCacheTable)
if (SOFT_DEBUG_MODE) then
Details:Msg("Loot ADDED:", unitName, itemLink, effectiveILvl, itemQuality, baseItemLevel)
end
--check if the end of mythic plus frame is opened and call a function to update the loot frame of the player
if (mythicDungeonFrames.ReadyFrame and mythicDungeonFrames.ReadyFrame:IsVisible()) then
C_Timer.After(1.5, function()
@@ -186,6 +203,10 @@ lootFrame:SetScript("OnEvent", function(self, event, ...)
end
end)
end
else
if (SOFT_DEBUG_MODE) then
Details:Msg("Loot SKIPPED:", unitName, itemLink, effectiveILvl, itemQuality, baseItemLevel)
end
end
end
end