diff --git a/.gitignore b/.gitignore index bc8bc2c5..c89b853b 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,6 @@ functions/pack2.lua *.afphoto wowapi.lua plugins/Details_TinyThreat/Details_TinyThreat_original.lua -*.png Descriptions.lua plugins/Details_EncounterDetails/.github/workflows/release.yml plugins/Details_RaidCheck/.github/workflows/release.yml @@ -51,3 +50,15 @@ annotations.txt plugins/Details_Compare2/Definitions.lua plugins/Details_Compare2/DF/ plugins/Details_Compare2/LibLuaServer/ +images/castlog_image.png +images/castlog_image2.png +images/castlog_image3.png +images/castlog_raidcooldowns.png +images/chartviewer.png +images/getalpha_version.png +images/icons2.png +images/myself.png +images/package_addons.png +images/patreon_stuff.png +images/plater_darktheme_skin.png +images/Tutorial/DetailsMainWindow.png diff --git a/Definitions.lua b/Definitions.lua index 3e318b3f..07c8745f 100644 --- a/Definitions.lua +++ b/Definitions.lua @@ -1,5 +1,6 @@ ----lower instance: each instance has an ID, starts from 1 and goes on, the lower instance is the opened instance with the lower ID. +--lower instance: each instance has an ID, starts from 1 and goes on, the lower instance is the opened instance with the lower ID. +--training dummy: a npc within major cities in world of warcraft where players can cast spells and attack to test their damage and healing output ---@alias plugintype ---| "SOLO" @@ -218,7 +219,7 @@ ---@field bossTimers table[] stored timers for bigwigs and dbm ---@field last_events_tables table[] where the death log of each player is stored ---@field boss_hp number percentage of the health points of the boss ----@field +---@field training_dummy boolean if true, the combat is against a training dummy ---@field ---@field ---@field __call table diff --git a/Libs/DF/cooltip.lua b/Libs/DF/cooltip.lua index 82cd5d65..4c3622d8 100644 --- a/Libs/DF/cooltip.lua +++ b/Libs/DF/cooltip.lua @@ -937,7 +937,7 @@ function DF:CreateCoolTip() if (gameCooltip.FunctionsTableMain[self.index]) then local parameterTable = gameCooltip.ParametersTableMain[self.index] local func = gameCooltip.FunctionsTableMain[self.index] - local okay, errortext = pcall(func, gameCooltip.Host, gameCooltip.FixedValue, parameterTable[1], parameterTable[2], parameterTable[3], button) + local okay, errortext = xpcall(func, geterrorhandler(), gameCooltip.Host, gameCooltip.FixedValue, parameterTable[1], parameterTable[2], parameterTable[3], button) if (not okay) then print("Cooltip OnClick Error:", errortext) end @@ -951,7 +951,7 @@ function DF:CreateCoolTip() if (gameCooltip.FunctionsTableSub[self.mainIndex] and gameCooltip.FunctionsTableSub[self.mainIndex][self.index]) then local parameterTable = gameCooltip.ParametersTableSub[self.mainIndex][self.index] local func = gameCooltip.FunctionsTableSub[self.mainIndex][self.index] - local okay, errortext = pcall(func, gameCooltip.Host, gameCooltip.FixedValue, parameterTable[1], parameterTable[2], parameterTable[3], button) + local okay, errortext = xpcall(func, geterrorhandler(), gameCooltip.Host, gameCooltip.FixedValue, parameterTable[1], parameterTable[2], parameterTable[3], button) if (not okay) then print("Cooltip OnClick Error:", errortext) end diff --git a/boot.lua b/boot.lua index c01787d2..0cb70934 100644 --- a/boot.lua +++ b/boot.lua @@ -87,6 +87,26 @@ end end + --cache of frames to call :SetColor() when the color scheme changes + Details222.RegisteredFramesToColor = {} + + Details222.TrainingDummiesNpcId = { + [194649] = true, --valdraken + [189617] = true, --valdraken + [194644] = true, --valdraken + [198594] = true, --valdraken + [194643] = true, --valdraken + [189632] = true, --valdraken + [194648] = true, --valdraken + [194646] = true, --valdraken + [197834] = true, --valdraken + [31146] = true, --orgrimmar + [153285] = true, --orgrimmar + [114840] = true, --orgrimmar + [114832] = true, --stormwind + [153292] = true, --stormwind + } + --namespace for damage spells (spellTable) Details222.DamageSpells = {} --namespace for texture diff --git a/classes/class_combat.lua b/classes/class_combat.lua index 982d8406..3edc3e61 100644 --- a/classes/class_combat.lua +++ b/classes/class_combat.lua @@ -38,6 +38,8 @@ local detailsFramework = DetailsFramework --[[global]] DETAILS_SEGMENTTYPE_EVENT_VALENTINEDAY = 30 +--[[global]] DETAILS_SEGMENTTYPE_TRAININGDUMMY = 40 + local segmentTypeToString = { [DETAILS_SEGMENTTYPE_GENERIC] = "Generic", [DETAILS_SEGMENTTYPE_OVERALL] = "Overall", @@ -403,6 +405,9 @@ local segmentTypeToString = { elseif (combatType == DETAILS_SEGMENTTYPE_MYTHICDUNGEON_GENERIC) then return textureAtlas["segment-icon-mythicplus"] + elseif (combatType == DETAILS_SEGMENTTYPE_TRAININGDUMMY) then + return textureAtlas["segment-icon-training-dummy-zoom"] + elseif (combatType == DETAILS_SEGMENTTYPE_PVP_ARENA) then return textureAtlas["segment-icon-arena"] @@ -687,6 +692,10 @@ local segmentTypeToString = { return DETAILS_SEGMENTTYPE_MYTHICDUNGEON_GENERIC, DETAILS_SEGMENTTYPE_MYTHICDUNGEON end + if (self.training_dummy) then + return DETAILS_SEGMENTTYPE_TRAININGDUMMY + end + --arena local arenaInfo = self.is_arena if (arenaInfo) then @@ -1038,8 +1047,20 @@ function classCombat:NovaTabela(bTimeStarted, overallCombatObject, combatId, ... Details.combat_counter = Details.combat_counter + 1 combatObject.combat_counter = Details.combat_counter + --combatObject.training_dummy = false + --try discover if is a pvp combat local sourceGUID, sourceName, sourceFlags, targetGUID, targetName, targetFlags = ... + + if (targetGUID) then + local npcId = Details:GetNpcIdFromGuid(targetGUID) + if (npcId) then + if (Details222.TrainingDummiesNpcId[npcId]) then + combatObject.training_dummy = true + end + end + end + if (sourceGUID) then --aqui ir� identificar o boss ou o oponente if (targetName and bitBand (targetFlags, REACTION_HOSTILE) ~= 0) then --tentando pegar o inimigo pelo alvo combatObject.contra = targetName diff --git a/core/plugins.lua b/core/plugins.lua index 59ce4055..3b1ba014 100644 --- a/core/plugins.lua +++ b/core/plugins.lua @@ -372,6 +372,7 @@ optionsFrame:Hide() detailsFramework:AddRoundedCornersToFrame(optionsFrame, Details.PlayerBreakdown.RoundedCornerPreset) + Details:RegisterFrameToColor(optionsFrame) --create a an icon to display the pluginIcon local pluginIconTexture = detailsFramework:CreateTexture(optionsFrame, pluginIcon, 20, 20, "artwork", pluginIconCoords or {0, 1, 0, 1}, "pluginIconTexture", "$parentPluginIconTexture") diff --git a/frames/window_breakdown/window_playerbreakdown.lua b/frames/window_breakdown/window_playerbreakdown.lua index a53b9a7e..8bcad729 100644 --- a/frames/window_breakdown/window_playerbreakdown.lua +++ b/frames/window_breakdown/window_playerbreakdown.lua @@ -263,6 +263,14 @@ Details.PlayerBreakdown.RoundedCornerPreset = { color = {.1, .1, .1, 0.834}, } +Details222.RegisteredFramesToColor = {} + +function Details:RegisterFrameToColor(frame) + Details222.RegisteredFramesToColor[#Details222.RegisteredFramesToColor+1] = frame + local colorTable = Details.frame_background_color + frame:SetColor(unpack(colorTable)) +end + function Details:RefreshWindowColor() local colorTable = Details.frame_background_color Details:SetWindowColor(unpack(colorTable)) @@ -290,6 +298,10 @@ function Details:SetWindowColor(r, g, b, a) DetailsSpellBreakdownOptionsPanel:SetColor(r, g, b, a) end + for idx, frame in ipairs(Details222.RegisteredFramesToColor) do + frame:SetColor(r, g, b, a) + end + local colorTable = Details.frame_background_color colorTable[1] = r colorTable[2] = g diff --git a/frames/window_main.lua b/frames/window_main.lua index 5c04348a..05a34b8d 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -3,6 +3,9 @@ local Details = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale("Details") local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") local segmentos = Details.segmentos + + +---@type detailsframework local gump = Details.gump local _ @@ -6632,6 +6635,12 @@ local buildSegmentTooltip = function(self, deltaTime) gameCooltip:AddLine(combatName, formattedElapsedTime, 1, "hotpink", "hotpink") gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left") + elseif (combatType == DETAILS_SEGMENTTYPE_TRAININGDUMMY) then + mythicDungeonRunId = false + local combatName, r, g, b = thisCombat:GetCombatName() + gameCooltip:AddLine(combatName, formattedElapsedTime, 1, "yellow", "yellow") + gameCooltip:AddIcon(thisCombat:GetCombatIcon(), "main", "left") + elseif (combatType == DETAILS_SEGMENTTYPE_PVP_BATTLEGROUND) then mythicDungeonRunId = false enemyName = thisCombat:GetCombatName() @@ -9232,7 +9241,7 @@ local reportButton_OnEnter = function(self, motion, forced) GameCooltip:AddLine(Loc["STRING_REPORT_TOOLTIP"], nil, 1, "white", nil, Details.font_sizes.menus, Details.font_faces.menus) GameCooltip:AddIcon([[Interface\Addons\Details\Images\report_button]], 1, 1, 12, 19) - GameCooltip:AddMenu(1, Details.Reportar, instancia, nil, "INSTANCE" .. instancia.meu_id) + GameCooltip:AddMenu(1, function() instancia:Reportar("INSTANCE" .. instancia.meu_id) end) show_anti_overlap(instancia, self, "top") Details:SetMenuOwner(self, instancia) diff --git a/frames/window_mythicplus/window_chart.lua b/frames/window_mythicplus/window_chart.lua index 87c85f05..d26d9064 100644 --- a/frames/window_mythicplus/window_chart.lua +++ b/frames/window_mythicplus/window_chart.lua @@ -22,7 +22,7 @@ function mythicDungeonCharts.ShowChart() dungeonChartFrame:SetSize(1200, 620) dungeonChartFrame:SetPoint("center", UIParent, "center", 0, 0) - dungeonChartFrame:SetFrameStrata("LOW") + dungeonChartFrame:SetFrameStrata("DIALOG") dungeonChartFrame:EnableMouse(true) dungeonChartFrame:SetMovable(true) DetailsFramework:ApplyStandardBackdrop(dungeonChartFrame) diff --git a/frames/window_mythicplus/window_end_of_run.lua b/frames/window_mythicplus/window_end_of_run.lua index 1475233f..2a658a1b 100644 --- a/frames/window_mythicplus/window_end_of_run.lua +++ b/frames/window_mythicplus/window_end_of_run.lua @@ -486,34 +486,45 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() readyFrame.entryAnimationDuration = 0.1 + --this frame is required due to the animation, the readyFrame and the contentFrame has their own animations + mythicDungeonFrames.ReadyFrameTop = CreateFrame("frame", "DetailsMythicDungeonReadyTopFrame", UIParent, "BackdropTemplate") + mythicDungeonFrames.ReadyFrameTop:SetPoint("bottomleft", readyFrame, "topleft", 0, 0) + mythicDungeonFrames.ReadyFrameTop:SetPoint("bottomright", readyFrame, "topright", 0, 0) + mythicDungeonFrames.ReadyFrameTop:SetHeight(1) + readyFrame.TopFrame = mythicDungeonFrames.ReadyFrameTop + local openingAnimationHub = detailsFramework:CreateAnimationHub(readyFrame, function() end, function() readyFrame:SetWidth(355); end) detailsFramework:CreateAnimation(openingAnimationHub, "Scale", 1, readyFrame.entryAnimationDuration, 0, 1, 1, 1, "center", 0, 0) readyFrame.OpeningAnimation = openingAnimationHub do --backdrop textures + local maskTexture = readyFrame:CreateMaskTexture("$parentDungeonBackdropTextureMaskTexture", "artwork") + maskTexture:SetTexture([[Interface\AddOns\Details\images\masks\white_rounded_512x512.png]]) + maskTexture:SetPoint("topleft", readyFrame, "topleft", 0, 0) + maskTexture:SetPoint("bottomright", readyFrame, "bottomright", 0, 0) + --backdrop gradient from bottom to top ---@type df_gradienttable - local gradientTable = {gradient = "vertical", fromColor = {0, 0, 0, 0.15}, toColor = "transparent"} - local gradientBelowTheLine = detailsFramework:CreateTexture(readyFrame, gradientTable, 1, readyFrame:GetHeight(), "artwork", {0, 1, 0, 1}, "backgroundGradient") - gradientBelowTheLine:SetPoint("bottoms") + local gradientTable = {gradient = "vertical", fromColor = {0, 0, 0, 0.8}, toColor = "transparent"} + local gradientBelowTheLine = detailsFramework:CreateTexture(readyFrame, gradientTable, 1, readyFrame:GetHeight()/3, "artwork", {0, 1, 0, 1}, "backgroundGradient") + gradientBelowTheLine:SetPoint("bottoms", 0, 0) + gradientBelowTheLine:AddMaskTexture(maskTexture) local dungeonBackdropTexture = readyFrame:CreateTexture("$parentDungeonBackdropTexture", "artwork", nil, -2) dungeonBackdropTexture:SetTexCoord(0.05, 0.70, 0.1, 0.82) dungeonBackdropTexture:SetVertexColor(0.2, 0.2, 0.2, 0.8) dungeonBackdropTexture:SetDesaturation(0.65) - dungeonBackdropTexture:SetAlpha(0.6) - dungeonBackdropTexture:SetPoint("topleft", readyFrame, "topleft", 0, 0) - dungeonBackdropTexture:SetPoint("topright", readyFrame, "topright", 0, 0) - dungeonBackdropTexture:SetPoint("bottomleft", readyFrame, "bottomleft", 0, 0) - dungeonBackdropTexture:SetPoint("bottomright", readyFrame, "bottomright", 0, 0) + dungeonBackdropTexture:SetAlpha(0.834) + dungeonBackdropTexture:SetAllPoints() + dungeonBackdropTexture:AddMaskTexture(maskTexture) readyFrame.DungeonBackdropTexture = dungeonBackdropTexture - local maskTexture = readyFrame:CreateMaskTexture("$parentDungeonBackdropTextureMaskTexture", "artwork") - maskTexture:SetAtlas("UI-Frame-IconMask") - local offset = 26 - maskTexture:SetPoint("topleft", readyFrame, "topleft", -offset, offset) - maskTexture:SetPoint("bottomright", readyFrame, "bottomright", offset, -offset) - dungeonBackdropTexture:AddMaskTexture(maskTexture) + local anotherBackdropTexture = readyFrame:CreateTexture("$parentAnotherBackdropTexture", "artwork", nil, -3) + anotherBackdropTexture:SetTexture([[Interface\GLUES\Models\UI_HighmountainTauren\7HM_RapidSimpleMask]]) + anotherBackdropTexture:AddMaskTexture(maskTexture) + anotherBackdropTexture:SetAllPoints() + anotherBackdropTexture:SetVertexColor(0.467, 0.416, 0.639, 1) + readyFrame.AnotherBackdropTexture = anotherBackdropTexture end --frame to place all texture that goes behind the readyFrame @@ -532,38 +543,40 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() do --use the same textures from the original end of dungeon panel - readyFrame.YellowSpikeCircle = contentFrame:CreateTexture("$parentSkullCircle", "overlay") - readyFrame.YellowSpikeCircle:SetSize(100, 100) - readyFrame.YellowSpikeCircle:SetPoint("center", readyFrame, "top", 0, 30) - readyFrame.YellowSpikeCircle:SetAtlas("ChallengeMode-SpikeyStar") - readyFrame.YellowSpikeCircle:SetAlpha(1) - readyFrame.YellowSpikeCircle:SetIgnoreParentAlpha(true) + local spikes = mythicDungeonFrames.ReadyFrameTop:CreateTexture("$parentSkullCircle", "overlay") + spikes:SetSize(100, 100) + spikes:SetPoint("center", readyFrame, "top", 0, 30) + spikes:SetAtlas("ChallengeMode-SpikeyStar") + spikes:SetAlpha(1) + spikes:SetIgnoreParentAlpha(true) + readyFrame.YellowSpikeCircle = spikes + + local yellowFlash = mythicDungeonFrames.ReadyFrameTop:CreateTexture("$parentYellowFlash", "artwork") + yellowFlash:SetSize(120, 120) + yellowFlash:SetPoint("center", readyFrame, "top", 0, 30) + yellowFlash:SetAtlas("BossBanner-RedFlash") + yellowFlash:SetAlpha(0) + yellowFlash:SetBlendMode("ADD") + yellowFlash:SetIgnoreParentAlpha(true) + readyFrame.YellowFlash = yellowFlash + + readyFrame.Level = mythicDungeonFrames.ReadyFrameTop:CreateFontString("$parentLevelText", "overlay", "GameFontNormalWTF2Outline") + readyFrame.Level:SetPoint("center", readyFrame.YellowSpikeCircle, "center", 0, 0) + readyFrame.Level:SetText("") + + --create the animation for the yellow flash + local flashAnimHub = detailsFramework:CreateAnimationHub(yellowFlash, function() yellowFlash:SetAlpha(0) end, function() yellowFlash:SetAlpha(0) end) + local flashAnim1 = detailsFramework:CreateAnimation(flashAnimHub, "Alpha", 1, 0.5, 0, 1) + local flashAnim2 = detailsFramework:CreateAnimation(flashAnimHub, "Alpha", 2, 0.5, 1, 0) --create the animation for the yellow spike circle - local MainAnimationGroup = readyFrame.YellowSpikeCircle:CreateAnimationGroup() - readyFrame.YellowSpikeCircle.scale1 = MainAnimationGroup:CreateAnimation("SCALE") - readyFrame.YellowSpikeCircle.scale1:SetOrder(1) - readyFrame.YellowSpikeCircle.scale1:SetDuration(0.3) - readyFrame.YellowSpikeCircle.scale1:SetScaleFrom(2, 2) - readyFrame.YellowSpikeCircle.scale1:SetScaleTo(1, 1) - readyFrame.YellowSpikeCircle.scale1:SetOrigin("center", 0, 0) + local spikeCircleAnimHub = detailsFramework:CreateAnimationHub(spikes, function() spikes:SetAlpha(0); spikes:SetScale(1) end, function() flashAnimHub:Play(); spikes:SetSize(100, 100); spikes:SetScale(1); spikes:SetAlpha(1) end) + local alphaAnim1 = detailsFramework:CreateAnimation(spikeCircleAnimHub, "Alpha", 1, 0.2960000038147, 0, 1) + local scaleAnim1 = detailsFramework:CreateAnimation(spikeCircleAnimHub, "Scale", 1, 0.21599999070168, 5, 5, 1, 1, "center", 0, 0) - --bugged - readyFrame.YellowSpikeCircle.OnShowAnimation = MainAnimationGroup - - --spinning animation for the yellow spike circle - --local yellowSpikeCircleSpinAnimationGroup = detailsFramework:CreateAnimationHub(readyFrame.YellowSpikeCircle, function()end, function()end) - --yellowSpikeCircleSpinAnimationGroup:SetLooping("REPEAT") - --local spikeRotationAnim = detailsFramework:CreateAnimation(yellowSpikeCircleSpinAnimationGroup, "Rotation", 1, 5, 1) - --spikeRotationAnim:SetSmoothing("IN_OUT") --"IN_OUT" "IN" "OUT" "NONE" - --spikeRotationAnim:SetSmoothProgress(50) - --readyFrame.YellowSpikeCircleSpinAnimation = yellowSpikeCircleSpinAnimationGroup + readyFrame.YellowSpikeCircle.OnShowAnimation = spikeCircleAnimHub end - readyFrame.Level = contentFrame:CreateFontString("$parentLevelText", "overlay", "GameFontNormalWTF2Outline") - readyFrame.Level:SetPoint("center", readyFrame.YellowSpikeCircle, "center", 0, 0) - readyFrame.Level:SetText("") - readyFrame.leftFiligree = contentFrame:CreateTexture("$parentLeftFiligree", "artwork") readyFrame.leftFiligree:SetAtlas("BossBanner-LeftFillagree") readyFrame.leftFiligree:SetSize(72, 43) @@ -605,10 +618,11 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() waitingForLootDotsAnimationLabel:SetPoint("left", waitingForLootLabel, "right", 0, 0) waitingForLootDotsAnimationLabel:Hide() + ---@type texture local topRedLineTexture = backgroundFrame:CreateTexture("$parentBannerTop", "border") topRedLineTexture:SetAtlas("BossBanner-BgBanner-Top") - topRedLineTexture:SetPoint("top", backgroundFrame, "top", 0, 155) - local topTextureAnimGroup = detailsFramework:CreateAnimationHub(topRedLineTexture, function()end, function() topRedLineTexture:SetWidth(480) end) + topRedLineTexture:SetPoint("top", backgroundFrame, "top", 0, 34) + local topTextureAnimGroup = detailsFramework:CreateAnimationHub(topRedLineTexture, function()end, function() topRedLineTexture:SetSize(388, 112) end) topRedLineTexture.Animation = topTextureAnimGroup local animDuration = 0.3 detailsFramework:CreateAnimation(topTextureAnimGroup, "Scale", 1, animDuration, 0, 1, 1, 1, "center", 0, 0) @@ -616,12 +630,25 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() local bottomRedLineTexture = backgroundFrame:CreateTexture("$parentBannerBottom", "border") bottomRedLineTexture:SetAtlas("BossBanner-BgBanner-Bottom") - bottomRedLineTexture:SetPoint("bottom", backgroundFrame, "bottom", 0, -115) - local bottomTextureAnimGroup = detailsFramework:CreateAnimationHub(bottomRedLineTexture, function()end, function() bottomRedLineTexture:SetWidth(480) end) + bottomRedLineTexture:SetPoint("bottom", backgroundFrame, "bottom", 0, -25) + local bottomTextureAnimGroup = detailsFramework:CreateAnimationHub(bottomRedLineTexture, function()end, function() bottomRedLineTexture:SetSize(388, 112) end) bottomRedLineTexture.Animation = bottomTextureAnimGroup detailsFramework:CreateAnimation(bottomTextureAnimGroup, "Scale", 1, animDuration, 0, 1, 0.5, 1, "center", 0, 0) readyFrame.BottomRedLineTexture = bottomRedLineTexture + --local leftRedLineTexture = backgroundFrame:CreateTexture("$parentBannerLeft", "border") + --leftRedLineTexture:SetAtlas("BossBanner-BgBanner-Top") + --leftRedLineTexture:SetPoint("topleft", backgroundFrame, "topleft", 0, 0) + --leftRedLineTexture:SetPoint("bottomleft", backgroundFrame, "bottomleft", 0, 0) + --leftRedLineTexture:SetWidth(388) + --leftRedLineTexture:SetRotation(-1.5708) + + --local centerGradient = backgroundFrame:CreateTexture("$parentCenterGradient", "artwork") + --centerGradient:SetAtlas("BossBanner-BgBanner-Mid") + --centerGradient:SetPoint("center", backgroundFrame, "center", 0, 0) + --centerGradient:SetSize(355, 390) + + --make a text dot animation, which will show no dots at start and then "." then ".." then "..." and back to "" and so on function readyFrame.StartTextDotAnimation() --update the Waiting for Loot labels @@ -661,6 +688,7 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() readyFrame:SetScript("OnHide", function(self) readyFrame.StopTextDotAnimation() + mythicDungeonFrames.ReadyFrameTop:Hide() end) local roundedCornerPreset = { @@ -677,7 +705,7 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() end ---@type df_button readyFrame.ShowBreakdownButton = DetailsFramework:CreateButton(contentFrame, showBreakdownFunc, 145, 30, "Show Breakdown") - PixelUtil.SetPoint(readyFrame.ShowBreakdownButton, "topleft", readyFrame, "topleft", 5, -30) + PixelUtil.SetPoint(readyFrame.ShowBreakdownButton, "topleft", readyFrame, "topleft", 31, -30) PixelUtil.SetSize(readyFrame.ShowBreakdownButton, 145, 32) readyFrame.ShowBreakdownButton:SetBackdrop(nil) readyFrame.ShowBreakdownButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {84/512, 120/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0) @@ -693,7 +721,7 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() end ---@type df_button readyFrame.ShowChartButton = DetailsFramework:CreateButton(contentFrame, showChartFunc, 145, 30, "Show Damage Graphic") - PixelUtil.SetPoint(readyFrame.ShowChartButton, "left", readyFrame.ShowBreakdownButton, "right", 5, 0) + PixelUtil.SetPoint(readyFrame.ShowChartButton, "left", readyFrame.ShowBreakdownButton, "right", 6, 0) PixelUtil.SetSize(readyFrame.ShowChartButton, 145, 32) readyFrame.ShowChartButton:SetBackdrop(nil) readyFrame.ShowChartButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {42/512, 75/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0) @@ -706,7 +734,8 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() end local elapsedTimeLabel = DetailsFramework:CreateLabel(contentFrame, "Run Time:", textSize, textColor) - elapsedTimeLabel:SetPoint("topleft", leftAnchor, "bottomleft", 0, -8) + --elapsedTimeLabel:SetPoint("topleft", leftAnchor, "bottomleft", 0, -8) + elapsedTimeLabel:SetPoint("topleft", readyFrame, "topleft", 5, -70) local elapsedTimeAmount = DetailsFramework:CreateLabel(contentFrame, "00:00", textSize, textColor) elapsedTimeAmount:SetPoint("left", elapsedTimeLabel, "left", 130, 0) @@ -832,6 +861,9 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() local readyFrame = mythicDungeonFrames.ReadyFrame readyFrame:Show() + readyFrame.TopFrame:Show() + readyFrame.YellowSpikeCircle.OnShowAnimation:Play() + readyFrame.TopRedLineTexture:Hide() readyFrame.BottomRedLineTexture:Hide() readyFrame.ContentFrame:SetAlpha(0) @@ -851,9 +883,6 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() readyFrame.OpeningAnimation:Play() end) - --readyFrame.YellowSpikeCircle:SetAlpha(1) - --readyFrame.YellowSpikeCircle.OnShowAnimation:Play() - C_Timer.After(readyFrame.entryAnimationDuration+0.05, function() readyFrame.TopRedLineTexture:Show() readyFrame.BottomRedLineTexture:Show() @@ -868,6 +897,7 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() readyFrame.StartTextDotAnimation() --fin the overall mythic dungeon combat, starting with the current combat + ---@type combat local overallMythicDungeonCombat = Details:GetCurrentCombat() --if the latest segment isn't the overall mythic dungeon segment, then find it @@ -895,11 +925,21 @@ function mythicDungeonFrames.ShowEndOfMythicPlusPanel() readyFrame.TimeNotInCombatAmountLabel.text = "Unknown for this run" end - if (not overallMythicDungeonCombat.is_mythic_dungeon) then + local mythicDungeonInfo = overallMythicDungeonCombat:GetMythicDungeonInfo() + + if (not mythicDungeonInfo) then return end - readyFrame.DungeonBackdropTexture:SetTexture(overallMythicDungeonCombat.is_mythic_dungeon.DungeonTexture) + ---@type details_instanceinfo + local instanceInfo = Details:GetInstanceInfo(mythicDungeonInfo.MapID) or Details:GetInstanceInfo(Details:GetCurrentCombat().mapId) + + if (instanceInfo) then + readyFrame.DungeonBackdropTexture:SetTexture(instanceInfo.iconLore) + else + readyFrame.DungeonBackdropTexture:SetTexture(overallMythicDungeonCombat.is_mythic_dungeon.DungeonTexture) + end + wipe(readyFrame.playerCacheByName) diff --git a/frames/window_report.lua b/frames/window_report.lua index cbe112d3..c0c78440 100644 --- a/frames/window_report.lua +++ b/frames/window_report.lua @@ -199,11 +199,7 @@ local _ Details.janela_report.slider.lockTexture:Hide() Details.janela_report.slider.amt:Show() - --print("report is custom:", bIsCustom) if (options) then - --dumpt(param2) = {damage, spellName, spellId} - --print(param2, options._custom) options._custom = nil - --print("meu id:", self.meu_id) local bIsCustom = true Details.janela_report.enviar:SetScript("OnClick", function() self:monta_relatorio(param2, bIsCustom) end) else diff --git a/functions/boss.lua b/functions/boss.lua index dfd2eb07..309eefff 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -505,18 +505,15 @@ do function Details222.EJCache.GetInstanceDataByName(instanceName) local raidData = Details222.EJCache.CacheRaidData_ByInstanceName[instanceName] - local dungeonData = Details222.EJCache.CacheDungeonData_ByInstanceName[instanceName] - return raidData or dungeonData + return raidData end function Details222.EJCache.GetInstanceDataByInstanceId(instanceId) local raidData = Details222.EJCache.CacheRaidData_ByInstanceId[instanceId] - local dungeonData = Details222.EJCache.CacheDungeonData_ByInstanceId[instanceId] - return raidData or dungeonData + return raidData end function Details222.EJCache.GetInstanceDataByMapId(mapId) local raidData = Details222.EJCache.CacheRaidData_ByMapId[mapId] - local dungeonData = Details222.EJCache.CacheDungeonData_ByMapId[mapId] - return raidData or dungeonData + return raidData end function Details222.EJCache.GetRaidDataByName(instanceName) @@ -530,13 +527,13 @@ do end function Details222.EJCache.GetDungeonDataByName(instanceName) - return Details222.EJCache.CacheDungeonData_ByInstanceName[instanceName] + return Details222.EJCache.CacheRaidData_ByInstanceName[instanceName] end function Details222.EJCache.GetDungeonDataByInstanceId(instanceId) - return Details222.EJCache.CacheDungeonData_ByInstanceId[instanceId] + return Details222.EJCache.CacheRaidData_ByInstanceId[instanceId] end function Details222.EJCache.GetDungeonDataByMapId(instanceId) - return Details222.EJCache.CacheDungeonData_ByMapId[instanceId] + return Details222.EJCache.CacheRaidData_ByMapId[instanceId] end ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/functions/ej_cache.lua b/functions/ej_cache.lua index bfcf66f3..bcb36932 100644 --- a/functions/ej_cache.lua +++ b/functions/ej_cache.lua @@ -63,7 +63,11 @@ end ---@param id instanceid|instancename|mapid ---@return details_instanceinfo? function Details:GetInstanceInfo(id) - ---@type details_encounterinfo + if (id == 463) then --fall + id = 1209 + end + + ---@type details_instanceinfo local instanceData = Details222.EJCache.CacheRaidData_ByInstanceId[id] if (instanceData) then return instanceData @@ -78,21 +82,10 @@ function Details:GetInstanceInfo(id) if (instanceData) then return instanceData end +end - instanceData = Details222.EJCache.CacheDungeonData_ByInstanceId[id] - if (instanceData) then - return instanceData - end - - instanceData = Details222.EJCache.CacheDungeonData_ByInstanceName[id] - if (instanceData) then - return instanceData - end - - instanceData = Details222.EJCache.CacheDungeonData_ByMapId[id] - if (instanceData) then - return instanceData - end +function Details:DumpInstanceInfo() + dumpt(Details222.EJCache.CacheRaidData_ByInstanceId) end function Details:GetInstanceEJID(...) @@ -109,9 +102,6 @@ function Details222.EJCache.CreateEncounterJournalDump() Details222.EJCache.CacheRaidData_ByInstanceId = {} Details222.EJCache.CacheRaidData_ByInstanceName = {} --this is localized name Details222.EJCache.CacheRaidData_ByMapId = {} --retrivied from GetInstanceInfo() - Details222.EJCache.CacheDungeonData_ByInstanceId = {} - Details222.EJCache.CacheDungeonData_ByInstanceName = {} - Details222.EJCache.CacheDungeonData_ByMapId = {} Details222.EJCache.CacheEncountersByEncounterName = {} Details222.EJCache.CacheEncountersBy_EncounterName = {} Details222.EJCache.CacheEncountersBy_EncounterId = {} diff --git a/images/bar_textures/bar_of_bars.png b/images/bar_textures/bar_of_bars.png new file mode 100644 index 00000000..94d59845 Binary files /dev/null and b/images/bar_textures/bar_of_bars.png differ diff --git a/images/icons.tga b/images/icons.tga index c2354743..43a8abda 100644 Binary files a/images/icons.tga and b/images/icons.tga differ diff --git a/images/masks/white_rounded_512x512.png b/images/masks/white_rounded_512x512.png new file mode 100644 index 00000000..7b704c23 Binary files /dev/null and b/images/masks/white_rounded_512x512.png differ diff --git a/textures.lua b/textures.lua index 27b4bebf..6bd30f42 100644 --- a/textures.lua +++ b/textures.lua @@ -57,6 +57,34 @@ Details.TextureAtlas = { nativeHeight = 512, }, + ["segment-icon-training-dummy"] = { + file = [[Interface\AddOns\Details\images\icons]], + width = 14, + height = 16, + leftTexCoord = 275/512, + rightTexCoord = 295/512, + topTexCoord = 110/512, + bottomTexCoord = 142/512, + tilesHorizontally = false, + tilesVertically = false, + nativeWidth = 512, + nativeHeight = 512, + }, + + ["segment-icon-training-dummy-zoom"] = { + file = [[Interface\AddOns\Details\images\icons]], + width = 12, + height = 16, + leftTexCoord = 298/512, + rightTexCoord = 320/512, + topTexCoord = 110/512, + bottomTexCoord = 142/512, + tilesHorizontally = false, + tilesVertically = false, + nativeWidth = 512, + nativeHeight = 512, + }, + ["small-pin-yellow"] = { file = [[Interface\BUTTONS\UI-RadioButton]], width = 12,