Backend improvements and bug fixes

- Fixed an error when hovering over some spells in the Auras panel on the Player Breakdown window.
- Fixed the character item level, which was not showing for players that left the party group on the Player Breakdown window.
- Fixed boss images not showing at the segments selection menu.
- Other updates related to encounter journal and mythic+, both under development.
This commit is contained in:
Tercio Jose
2023-12-26 11:38:00 -03:00
parent 7a3c32f6f8
commit d102fe7a07
12 changed files with 844 additions and 560 deletions
@@ -39,10 +39,12 @@ local createAuraTabOnBreakdownWindow = function(tab, frame)
}
local onEnterLine = function(self)
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
Details:GameTooltipSetSpellByID(self.spellID)
GameTooltip:Show()
self:SetBackdropColor(1, 1, 1, .2)
if (self.spellID) then
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
Details:GameTooltipSetSpellByID(self.spellID)
GameTooltip:Show()
self:SetBackdropColor(1, 1, 1, .2)
end
end
local onLeaveLine = function(self)
@@ -36,8 +36,6 @@ function breakdownWindowPlayerList.CreatePlayerListFrame()
breakdownSideMenu:SetSize(scrollbox_size[1], scrollbox_size[2])
PixelUtil.SetPoint(breakdownSideMenu, "topright", breakdownWindowFrame, "topleft", -2, 0)
PixelUtil.SetPoint(breakdownSideMenu, "bottomright", breakdownWindowFrame, "bottomleft", -2, 0)
--detailsFramework:ApplyStandardBackdrop(breakdownSideMenu)
--breakdownSideMenu.RightEdge:Hide()
detailsFramework:AddRoundedCornersToFrame(breakdownSideMenu, Details.PlayerBreakdown.RoundedCornerPreset)
@@ -47,17 +45,8 @@ function breakdownWindowPlayerList.CreatePlayerListFrame()
PixelUtil.SetPoint(titleBarPlugins, "topleft", breakdownSideMenu, "topleft", 2, -0)
PixelUtil.SetPoint(titleBarPlugins, "topright", breakdownSideMenu, "topright", -2, -0)
titleBarPlugins:SetHeight(titleHeight)
--titleBarPlugins:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
--titleBarPlugins:SetBackdropColor(.5, .5, .5, 1)
--titleBarPlugins:SetBackdropBorderColor(0, 0, 0, 1)
---@type df_roundedpanel_preset
--local titleBarRoundedCornerPreset = {
-- roundness = 5,
-- color = {.05, .05, .05, 1},
-- border_color = "transparent",
--}
--detailsFramework:AddRoundedCornersToFrame(titleBarPlugins, titleBarRoundedCornerPreset)
--title label
local titleBarPlugins_TitleLabel = detailsFramework:NewLabel(titleBarPlugins, titleBarPlugins, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
@@ -67,9 +56,6 @@ function breakdownWindowPlayerList.CreatePlayerListFrame()
--plugins menu title bar
local titleBarPlayerSeparator = CreateFrame("frame", nil, breakdownSideMenu, "BackdropTemplate")
titleBarPlayerSeparator:SetHeight(titleHeight)
--titleBarPlayerSeparator:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
--titleBarPlayerSeparator:SetBackdropColor(.5, .5, .5, 1)
--titleBarPlayerSeparator:SetBackdropBorderColor(0, 0, 0, 1)
--title label
local titleBarTools_TitleLabel = detailsFramework:NewLabel(titleBarPlayerSeparator, titleBarPlayerSeparator, nil, "titulo", "Players", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
@@ -79,19 +65,6 @@ function breakdownWindowPlayerList.CreatePlayerListFrame()
titleBarPlayerSeparator:SetPoint("topleft", pluginsFrame, "bottomleft", 0, -1)
titleBarPlayerSeparator:SetPoint("topright", pluginsFrame, "bottomright", 0, -1)
local highlightPluginButtonOnBreakdownWindow = function(pluginAbsoluteName)
for index, button in ipairs(breakdownWindowFrame.RegisteredPluginButtons) do
---@cast button df_button
button:Show()
if (button.PluginAbsName == pluginAbsoluteName) then
button:SetTemplate(detailsFramework:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE"))
else
button:SetTemplate(detailsFramework:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
end
end
end
local refreshPluginButtons = function()
local amountPluginButtons = #breakdownWindowFrame.RegisteredPluginButtons
local pluginButtonHeight = 20
@@ -226,7 +199,8 @@ function breakdownWindowPlayerList.CreatePlayerListFrame()
self.rankText:SetText(self.index) --not in use
--item level
self.itemLevelText:SetText(self.playerObject.ilvl or (playerGear and playerGear.ilevel) or "0")
local itemLevel = Details.ilevel:GetIlvl(self.playerObject.serial)
self.itemLevelText:SetText((itemLevel and itemLevel.ilvl and math.floor(itemLevel.ilvl)) or (self.playerObject.ilvl) or (playerGear and playerGear.ilevel) or "0")
local actorSpecId = self.playerObject.spec
local actorTotal = self.playerObject.total
+1 -1
View File
@@ -288,7 +288,7 @@ end
classId = select(3, UnitClass(unitInfo.nameFull))
end
if (unitInfo and classId) then
if (unitInfo and classId and cooldownsOrganized[classId]) then
local allCooldownFrames = Details222.CooldownTracking.GetAllCooldownFrames()
for spellId, cooldownInfo in pairs(unitCooldowns) do
+11 -17
View File
@@ -6531,6 +6531,9 @@ local buildSegmentTooltip = function(self, deltaTime)
segmentInfoAdded = true
elseif (thisCombat.is_boss and thisCombat.is_boss.name) then
---@type details_instanceinfo
local instanceInfo = Details:GetInstanceInfo(thisCombat.is_boss.mapid)
isMythicDungeon = false
local try_number = thisCombat.is_boss.try_number
local combat_time = thisCombat:GetCombatTime()
@@ -6559,31 +6562,22 @@ local buildSegmentTooltip = function(self, deltaTime)
end
end
local portrait = Details:GetBossPortrait(thisCombat.is_boss.mapid, thisCombat.is_boss.index) or thisCombat.is_boss.bossimage
---@type details_encounterinfo
local encounterInfo = Details:GetEncounterInfo(thisCombat.EncounterName)
local portrait = (encounterInfo and encounterInfo.creatureIcon) or thisCombat.is_boss.bossimage or thisCombat.bossIcon
if (portrait) then
gameCooltip:AddIcon(portrait, 2, "top", 128, 64)
else
local encounter_name = thisCombat.is_boss.encounter
local instanceID = thisCombat.is_boss.ej_instance_id
if (encounter_name and instanceID and instanceID ~= 0) then
local index, name, description, encounterID, rootSectionID, link = Details:GetEncounterInfoFromEncounterName (instanceID, encounter_name)
if (index and name and encounterID) then
--EJ_SelectInstance (instanceID)
--creature info pode ser sempre 1, no usar o index do boss
local id, name, description, displayInfo, iconImage = DetailsFramework.EncounterJournal.EJ_GetCreatureInfo (1, encounterID)
if (iconImage) then
gameCooltip:AddIcon(iconImage, 2, "top", 128, 64)
end
end
end
end
gameCooltip:AddIcon([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 16, 0.96875, 1, 0, 0.03125)
if (Details.tooltip.submenu_wallpaper) then
local background = Details:GetRaidIcon (thisCombat.is_boss.mapid)
local background = Details:GetRaidIcon(thisCombat.is_boss.mapid)
if (background and bCanUseBackgroundImage) then
gameCooltip:SetWallpaper (2, background, nil, segments_wallpaper_color, true)
gameCooltip:SetWallpaper(2, background, nil, segments_wallpaper_color, true)
else
local ej_id = thisCombat.is_boss.ej_instance_id
if (ej_id and ej_id ~= 0) then