diff --git a/Details.toc b/Details.toc index 7195559f..68cd3c15 100644 --- a/Details.toc +++ b/Details.toc @@ -1,7 +1,7 @@ ## Interface: 100002 ## Title: Details! Damage Meter ## Notes: Essential tool to impress that chick in your raid. -## SavedVariables: _detalhes_global +## SavedVariables: _detalhes_global, __details_backup ## SavedVariablesPerCharacter: _detalhes_database ## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibGraph-2.0 ## Version: #@project-version@ diff --git a/Details_TBC.toc b/Details_TBC.toc index f6f064c2..b6bc4f39 100644 --- a/Details_TBC.toc +++ b/Details_TBC.toc @@ -57,6 +57,7 @@ functions\plater.lua functions\deathmenu.lua functions\macros.lua functions\testbars.lua +functions\warcraftlogs.lua core\timemachine.lua diff --git a/Details_Wrath.toc b/Details_Wrath.toc index ed6b0b09..320d8de9 100644 --- a/Details_Wrath.toc +++ b/Details_Wrath.toc @@ -1,7 +1,7 @@ ## Interface: 30400 ## Title: Details! Damage Meter ## Notes: Essential tool to impress that chick in your raid. -## SavedVariables: _detalhes_global +## SavedVariables: _detalhes_global, __details_backup ## SavedVariablesPerCharacter: _detalhes_database ## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibItemUpgradeInfo-1.0, LibGroupInSpecT-1.1, LibCompress, LibGraph-2.0 ## Version: #@project-version@ @@ -57,6 +57,7 @@ functions\plater.lua functions\deathmenu.lua functions\macros.lua functions\testbars.lua +functions\warcraftlogs.lua core\timemachine.lua diff --git a/Libs/DF/cooltip.lua b/Libs/DF/cooltip.lua index f31d22a3..d6c5b4ee 100644 --- a/Libs/DF/cooltip.lua +++ b/Libs/DF/cooltip.lua @@ -162,6 +162,16 @@ function DF:CreateCoolTip() ["SelectedBottomAnchorMod"] = true, ["SelectedLeftAnchorMod"] = true, ["SelectedRightAnchorMod"] = true, + + ["SparkTexture"] = true, + ["SparkHeightOffset"] = true, + ["SparkWidthOffset"] = true, + ["SparkHeight"] = true, + ["SparkWidth"] = true, + ["SparkAlpha"] = true, + ["SparkColor"] = true, + ["SparkPositionXOffset"] = true, + ["SparkPositionYOffset"] = true, } gameCooltip.AliasList = { @@ -548,6 +558,9 @@ function DF:CreateCoolTip() statusbar.spark:SetBlendMode("ADD") statusbar.spark:SetSize(12, 24) statusbar.spark:SetPoint("LEFT", statusbar, "RIGHT", -20, -1) + statusbar.spark.originalWidth = 12 + statusbar.spark.originalHeight = 24 + statusbar.spark.originalTexture = "Interface\\CastingBar\\UI-CastingBar-Spark" statusbar.background = statusbar:CreateTexture("$parent_Background", "ARTWORK") statusbar.background:Hide() @@ -1153,10 +1166,26 @@ function DF:CreateCoolTip() end function gameCooltip:RefreshSpark(menuButton) + local sparkTexture = gameCooltip.OptionsTable.SparkTexture or menuButton.spark.originalTexture + local sparkAlpha = gameCooltip.OptionsTable.SparkAlpha or 1 + local sparkColor = gameCooltip.OptionsTable.SparkColor or "white" + + local sparkWidth = gameCooltip.OptionsTable.SparkWidth or menuButton.spark.originalWidth + local sparkHeight = gameCooltip.OptionsTable.SparkHeight or menuButton.spark.originalHeight + local sparkWidthOffset = gameCooltip.OptionsTable.SparkWidthOffset or 0 + local sparkHeightOffset = gameCooltip.OptionsTable.SparkHeightOffset or 0 + local positionXOffset = gameCooltip.OptionsTable.SparkPositionXOffset or 0 + local positionYOffset = gameCooltip.OptionsTable.SparkPositionYOffset or 0 + + menuButton.spark:SetSize(sparkWidth + sparkWidthOffset, sparkHeight + sparkHeightOffset) + menuButton.spark:SetTexture(sparkTexture) + menuButton.spark:SetVertexColor(DF:ParseColors(sparkColor)) + menuButton.spark:SetAlpha(sparkAlpha) + menuButton.spark:ClearAllPoints() - menuButton.spark:SetPoint("left", menuButton.statusbar, "left", (menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth() / 100)) - 5, 0) + menuButton.spark:SetPoint("left", menuButton.statusbar, "left", (menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth() / 100)) - 5 + positionXOffset, 0 + positionYOffset) menuButton.spark2:ClearAllPoints() - menuButton.spark2:SetPoint("left", menuButton.statusbar, "left", menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth()/100) - 16, 0) + menuButton.spark2:SetPoint("left", menuButton.statusbar, "left", menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth()/100) - 16 + positionXOffset, 0 + positionYOffset) end function gameCooltip:StatusBar(menuButton, statusBarSettings) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 1ed0abc1..19e595b8 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 396 +local dversion = 397 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) diff --git a/boot.lua b/boot.lua index 30e807b2..2a11b685 100644 --- a/boot.lua +++ b/boot.lua @@ -6,12 +6,12 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - _detalhes.build_counter = 10290 - _detalhes.alpha_build_counter = 10290 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 10300 + _detalhes.alpha_build_counter = 10300 --if this is higher than the regular counter, use it instead _detalhes.dont_open_news = true _detalhes.game_version = version _detalhes.userversion = version .. " " .. _detalhes.build_counter - _detalhes.realversion = 146 --core version, this is used to check API version for scripts and plugins (see alias below) + _detalhes.realversion = 147 --core version, this is used to check API version for scripts and plugins (see alias below) _detalhes.APIVersion = _detalhes.realversion --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" --simple stirng to show to players @@ -24,6 +24,7 @@ _detalhes.BFACORE = 131 --core version on BFA launch _detalhes.SHADOWLANDSCORE = 143 --core version on Shadowlands launch + _detalhes.DRAGONFLIGHT = 147 --core version on Dragonflight launch Details = _detalhes @@ -54,6 +55,14 @@ --namespace for the player breakdown window Details.PlayerBreakdown = {} + --color namespace + Details222.ColorScheme = { + ["gradient-background"] = {0.1215, 0.1176, 0.1294, 0.8}, + } + + function Details222.ColorScheme.GetColorFor(colorScheme) + return Details222.ColorScheme[colorScheme] + end ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --initialization stuff @@ -69,8 +78,8 @@ do local news = { {"v10.0.2.10277.146", "Nov 18th, 2022"}, "REMINDER: '/details coach' to get damage/healing/deaths in real time as the 21st person (coach) for the next raid tier in dragonflight.", - "", - "New show a time line of spells used by players in the group, Raid Leader: show all attack and defense cooldowns used by the raid.", + "New Compare tab: recreated from scratch, this new Compare has no player limitation, pets merged, bigger lines.", + "New show a time line of spells used by players in the group, Raid Leader: show all attack and defense cooldowns used by the raid (download it now on wago or curseforge).", "Wago: Details! Standalone version is now hosted on addons.wago.io and WowUp.com.", "", diff --git a/classes/class_damage.lua b/classes/class_damage.lua index bc316a60..99288a48 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -488,7 +488,7 @@ end ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --damage taken by spell - local byspell_tooltip_background = {value = 100, color = {0.1960, 0.1960, 0.1960, 0.9097}, texture = [[Interface\AddOns\Details\images\bar_background2]]} + local byspell_tooltip_background = {value = 100, color = {0.1960, 0.1960, 0.1960, 0.9097}, texture = [[Interface\AddOns\Details\images\bar_background_dark]]} function Details:ToolTipBySpell (instance, tabela, thisLine, keydown) @@ -5091,7 +5091,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellId, spellLine, instance) end t4[1] = 0 - t4[2] = {p = 100, c = {0.282353, 0.239216, 0.545098, 0.6}} + t4[2] = {p = 100, c = {0.200, 0.576, 0.498, 0.6}} t4[3] = "Spell Empower Average Level: " .. format("%.2f", empowerLevelSum / empowerAmount) t4[4] = "" t4[5] = "" @@ -5100,23 +5100,23 @@ function atributo_damage:MontaDetalhesDamageDone (spellId, spellLine, instance) t4[11] = "" if (level1AverageDamage ~= "0") then - t4[4] = "Level 1 Average: " .. level1AverageDamage .. " (" .. (empowerAmountPerLevel[1] or 0) .. ")" + t4[4] = "Level 1 Avg: " .. level1AverageDamage .. " (" .. (empowerAmountPerLevel[1] or 0) .. ")" end if (level2AverageDamage ~= "0") then - t4[6] = "Level 2 Average: " .. level2AverageDamage .. " (" .. (empowerAmountPerLevel[2] or 0) .. ")" + t4[6] = "Level 2 Avg: " .. level2AverageDamage .. " (" .. (empowerAmountPerLevel[2] or 0) .. ")" end if (level3AverageDamage ~= "0") then - t4[11] = "Level 3 Average: " .. level3AverageDamage .. " (" .. (empowerAmountPerLevel[3] or 0) .. ")" + t4[11] = "Level 3 Avg: " .. level3AverageDamage .. " (" .. (empowerAmountPerLevel[3] or 0) .. ")" end if (level4AverageDamage ~= "0") then - t4[10] = "Level 4 Average: " .. level4AverageDamage .. " (" .. (empowerAmountPerLevel[4] or 0) .. ")" + t4[10] = "Level 4 Avg: " .. level4AverageDamage .. " (" .. (empowerAmountPerLevel[4] or 0) .. ")" end if (level5AverageDamage ~= "0") then - t4[5] = "Level 5 Average: " .. level5AverageDamage .. " (" .. (empowerAmountPerLevel[5] or 0) .. ")" + t4[5] = "Level 5 Avg: " .. level5AverageDamage .. " (" .. (empowerAmountPerLevel[5] or 0) .. ")" end end diff --git a/classes/class_utility.lua b/classes/class_utility.lua index 4e5ed081..8a7b5b27 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -295,7 +295,7 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable) elseif (evType == 4) then --debuff - gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "x" .. amount .. AURA_TYPE_DEBUFF .. " (" .. healthPercent .. "%)", 1, "white", "white") + gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "x" .. amount .. " " .. AURA_TYPE_DEBUFF .. " (" .. healthPercent .. "%)", 1, "white", "white") gameCooltip:AddIcon(spellIcon) gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, showSpark) end diff --git a/core/control.lua b/core/control.lua index f5a7e564..85a168bb 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1589,6 +1589,30 @@ Details.tooltip.icon_size.W = Details.tooltip.line_height Details.tooltip.icon_size.H = Details.tooltip.line_height + --[[spark options + ["SparkTexture"] = true, + ["SparkHeightOffset"] = true, + ["SparkWidthOffset"] = true, + ["SparkHeight"] = true, + ["SparkWidth"] = true, + ["SparkAlpha"] = true, + ["SparkColor"] = true, + ["SparkPositionXOffset"] = true, + ["SparkPositionYOffset"] = true, + --]] + + useSpark = true + --GameCooltip:SetOption("SparkHeightOffset", 6) + GameCooltip:SetOption("SparkTexture", [[Interface\Buttons\WHITE8X8]]) + GameCooltip:SetOption("SparkWidth", 1) + GameCooltip:SetOption("SparkHeight", 20) + GameCooltip:SetOption("SparkColor", "gray") + GameCooltip:SetOption("SparkAlpha", 0.15) + GameCooltip:SetOption("SparkPositionXOffset", 5) + --GameCooltip:SetOption("SparkAlpha", 0.3) + --GameCooltip:SetOption("SparkPositionXOffset", -2) + + value = value or 100 if (not side) then @@ -1634,7 +1658,7 @@ GameCooltip:Reset() GameCooltip:SetType ("tooltip") - GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]]) + GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background_dark]]) GameCooltip:SetOption("TextSize", Details.tooltip.fontsize) GameCooltip:SetOption("TextFont", Details.tooltip.fontface) diff --git a/core/parser.lua b/core/parser.lua index 7f0a5942..2cfb3722 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -241,6 +241,11 @@ --Seal of Command [20424] = 69403, --53739 and 53733 + + --odyn's fury warrior + [385062] = 385059, + [385061] = 385059, + [385060] = 385059, } else --retail @@ -5161,7 +5166,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (not isWOTLK) then C_Timer.After(1, function() if (Details.show_warning_id1) then - if (Details.show_warning_id1_amount < 10) then + if (Details.show_warning_id1_amount < 2) then Details.show_warning_id1_amount = Details.show_warning_id1_amount + 1 Details:Msg("|cFFFFFF00you might find differences on damage done, this is due to a bug in the game client, nothing related to Details! itself (" .. Details.show_warning_id1_amount .. " / 10).") end @@ -5276,7 +5281,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (not isWOTLK) then C_Timer.After(1, function() if (Details.show_warning_id1) then - if (Details.show_warning_id1_amount < 10) then + if (Details.show_warning_id1_amount < 2) then Details.show_warning_id1_amount = Details.show_warning_id1_amount + 1 Details:Msg("|cFFFFFF00you may find differences on damage done, this is due to a bug in the game client, nothing related to Details! itself (" .. Details.show_warning_id1_amount .. " / 10).") end @@ -6021,18 +6026,34 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 local saver = CreateFrame("frame", nil, UIParent) saver:RegisterEvent("PLAYER_LOGOUT") saver:SetScript("OnEvent", function(...) + __details_backup = __details_backup or { + _exit_error = {}, + _instance_backup = {}, + } + local exitErrors = __details_backup._exit_error + + local addToExitErrors = function(text) + table.insert(exitErrors, 1, text) + table.remove(exitErrors, 10) + end + + local currentStep = "" + --save the time played on this class, run protected - pcall(function() + local savePlayTimeClass, savePlayTimeError = pcall(function() Details.SavePlayTimeOnClass() end) - local currentStep = 0 + if (not savePlayTimeClass) then + addToExitErrors("Saving Play Time:" .. savePlayTimeError) + end --SAVINGDATA = true _detalhes_global.exit_log = {} _detalhes_global.exit_errors = _detalhes_global.exit_errors or {} currentStep = "Checking the framework integrity" + if (not _detalhes.gump) then --failed to load the framework tinsert(_detalhes_global.exit_log, "The framework wasn't in Details member 'gump'.") @@ -6041,9 +6062,14 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 end local saver_error = function(errortext) - _detalhes_global = _detalhes_global or {} - tinsert(_detalhes_global.exit_errors, 1, currentStep .. "|" .. date() .. "|" .. _detalhes.userversion .. "|" .. errortext .. "|" .. debugstack()) - tremove(_detalhes_global.exit_errors, 6) + --if the error log cause an error? + local writeLog = function() + _detalhes_global = _detalhes_global or {} + tinsert(_detalhes_global.exit_errors, 1, currentStep .. "|" .. date() .. "|" .. _detalhes.userversion .. "|" .. errortext .. "|" .. debugstack()) + tremove(_detalhes_global.exit_errors, 6) + addToExitErrors(currentStep .. "|" .. date() .. "|" .. _detalhes.userversion .. "|" .. errortext .. "|" .. debugstack()) + end + xpcall(writeLog, addToExitErrors) end _detalhes.saver_error_func = saver_error @@ -6058,17 +6084,24 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 --do not save window pos if (_detalhes.tabela_instancias) then - currentStep = "Dealing With Instances" - tinsert(_detalhes_global.exit_log, "2 - Clearing user place from instances.") - for id, instance in _detalhes:ListInstances() do - if (id) then - tinsert(_detalhes_global.exit_log, " - " .. id .. " has baseFrame: " .. (instance.baseframe and "yes" or "no") .. ".") - if (instance.baseframe) then - instance.baseframe:SetUserPlaced (false) - instance.baseframe:SetDontSavePosition (true) + local clearInstances = function() + currentStep = "Dealing With Instances" + tinsert(_detalhes_global.exit_log, "2 - Clearing user place from instances.") + for id, instance in _detalhes:ListInstances() do + if (id) then + tinsert(_detalhes_global.exit_log, " - " .. id .. " has baseFrame: " .. (instance.baseframe and "yes" or "no") .. ".") + if (instance.baseframe) then + instance.baseframe:SetUserPlaced (false) + instance.baseframe:SetDontSavePosition (true) + end end end end + xpcall(clearInstances, saver_error) + else + tinsert(_detalhes_global.exit_errors, 1, "not _detalhes.tabela_instancias") + tremove(_detalhes_global.exit_errors, 6) + addToExitErrors("not _detalhes.tabela_instancias") end --leave combat start save tables @@ -6087,6 +6120,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (_detalhes.wipe_full_config) then tinsert(_detalhes_global.exit_log, "5 - Is a full config wipe.") + addToExitErrors("true: _detalhes.wipe_full_config") _detalhes_global = nil _detalhes_database = nil return diff --git a/frames/window_playerbreakdown.lua b/frames/window_playerbreakdown.lua index c0d2b8ff..aa0a2e6a 100644 --- a/frames/window_playerbreakdown.lua +++ b/frames/window_playerbreakdown.lua @@ -66,6 +66,14 @@ info.currentTabsInUse = {} --self = instancia --jogador = classe_damage ou classe_heal +do + local gradientStartColor = Details222.ColorScheme.GetColorFor("gradient-background") + local gradientUp = DetailsFramework:CreateTexture(info, {gradient = "vertical", fromColor = "transparent", toColor = gradientStartColor}, 1, 300, "artwork", {0, 1, 0, 1}) + gradientUp:SetPoint("tops", 1, 1) + local gradientDown = DetailsFramework:CreateTexture(info, {gradient = "vertical", fromColor = gradientStartColor, toColor = "transparent"}, 1, 50, "artwork", {0, 1, 0, 1}) + gradientDown:SetPoint("bottoms") +end + function Details:GetBreakdownTabsInUse() return info.currentTabsInUse end @@ -619,7 +627,9 @@ function gump:CriaDetalheInfo(index) spellInfoBlock.GetFrame = getFrameFromDetailInfoBlock spellInfoBlock.bg = CreateFrame("StatusBar", "DetailsPlayerDetailsWindow_DetalheInfoBG" .. index, _detalhes.playerDetailWindow.container_detalhes, "BackdropTemplate") - spellInfoBlock.bg:SetStatusBarTexture("Interface\\AddOns\\Details\\images\\bar_detalhes2") + --spellInfoBlock.bg:SetStatusBarTexture("") --Interface\\AddOns\\Details\\images\\bar_detalhes2 + --bar_detalhes2 bar_background + spellInfoBlock.bg:SetStatusBarTexture("Interface\\AddOns\\Details\\images\\bar_background") --Interface\\AddOns\\Details\\images\\bar_detalhes2 spellInfoBlock.bg:SetStatusBarColor(1, 1, 1, .84) spellInfoBlock.bg:SetMinMaxValues(0, 100) spellInfoBlock.bg:SetValue(100) @@ -655,7 +665,7 @@ function gump:CriaDetalheInfo(index) spellInfoBlock.bg.reportar:SetScript("OnLeave", detalhes_inforeport_onleave) spellInfoBlock.bg_end = spellInfoBlock.bg:CreateTexture("DetailsPlayerDetailsWindow_DetalheInfoBG_bg_end" .. index, "BACKGROUND") - spellInfoBlock.bg_end:SetHeight(47) + spellInfoBlock.bg_end:SetHeight(40) spellInfoBlock.bg_end:SetTexture("Interface\\AddOns\\Details\\images\\bar_detalhes2_end") _detalhes.playerDetailWindow.grupos_detalhes[index] = spellInfoBlock @@ -749,7 +759,7 @@ function gump:SetaDetalheInfoAltura(index, xmod, ymod) spellInfoBlock.bg:SetWidth(background:GetWidth()) spellInfoBlock.bg_end:SetPoint("LEFT", spellInfoBlock.bg, "LEFT", spellInfoBlock.bg:GetValue()*2.19, 0) - spellInfoBlock.bg_end:SetHeight(background:GetHeight()+2) + spellInfoBlock.bg_end:SetHeight(background:GetHeight()-2) spellInfoBlock.bg_end:SetWidth(6) spellInfoBlock.bg_end:SetAlpha(.75) @@ -1211,7 +1221,7 @@ local default_skin = function() end --info container - info:SetDetailInfoConfigs("Interface\\AddOns\\Details\\images\\bar_detalhes2", {1, 1, 1, 0.5}, 0, 0) + info:SetDetailInfoConfigs("Interface\\AddOns\\Details\\images\\bar_background_dark_dark", {1, 1, 1, 0.5}, 0, 0) window.bg1_sec_texture:SetPoint("topleft", window.bg1, "topleft", 348, -86) window.bg1_sec_texture:SetHeight(262) @@ -1441,7 +1451,7 @@ local elvui_skin = function() end --seta configs dos 5 blocos da direita - info:SetDetailInfoConfigs("Interface\\AddOns\\Details\\images\\bar_serenity", {1, 1, 1, 0.35}, -6 + 100, 0) + info:SetDetailInfoConfigs("Interface\\AddOns\\Details\\images\\bar_background_dark", {1, 1, 1, 0.35}, -6 + 100, 0) window.bg1_sec_texture:SetPoint("topleft", window.bg1, "topleft", 446, -86) window.bg1_sec_texture:SetWidth(337) @@ -1818,6 +1828,9 @@ function gump:CriaJanelaInfo() right_background1:SetSize(220, 43) Details.gump:ApplyStandardBackdrop(right_background1) este_gump ["right_background" .. i] = right_background1 + + local gradientDown = DetailsFramework:CreateTexture(right_background1, {gradient = "vertical", fromColor = {0, 0, 0, 0.1}, toColor = "transparent"}, 1, 43, "artwork", {0, 1, 0, 1}) + gradientDown:SetPoint("bottoms") end -- fundos especiais de friendly fire e outros @@ -2927,6 +2940,11 @@ function gump:CriaJanelaInfo() DF:ReskinSlider(debuffScroll) tab.DebuffScroll = debuffScroll + + if (not frame.__background) then + DetailsFramework:ApplyStandardBackdrop(frame) + frame.__background:SetAlpha(0.6) + end end local auras_tab_fill = function(tab, player, combat) diff --git a/frames/window_playerbreakdown_list.lua b/frames/window_playerbreakdown_list.lua index 602a785e..d3c4694c 100644 --- a/frames/window_playerbreakdown_list.lua +++ b/frames/window_playerbreakdown_list.lua @@ -1,7 +1,7 @@ local Details = _G.Details local detailsFramework = _G.DetailsFramework - local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0") + local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0", true) local addonName, Details222 = ... local breakdownWindowPlayerList = {} @@ -49,6 +49,7 @@ if (playerObject) then local line = self:GetLine(i) line.playerObject = playerObject + line.combatObject = combatObject line.index = index line:UpdateLine(topResult, encounterId, difficultyId) end @@ -124,7 +125,7 @@ self.roleIcon:SetTexture("") end - local playerGear = openRaidLib.GetUnitGear(self.playerObject.nome) + local playerGear = openRaidLib and openRaidLib.GetUnitGear(self.playerObject.nome) --do not show the role icon self.roleIcon:SetTexture("") --not in use @@ -141,17 +142,26 @@ local actorSpecId = self.playerObject.spec local actorTotal = self.playerObject.total + local combatObject = self.combatObject --warcraftlogs percentile if (self.playerObject.tipo == DETAILS_ATTRIBUTE_DAMAGE) then - local parcePercent = Details222.WarcraftLogs.GetDamageParsePercent(encounterId, difficultyId, actorSpecId, actorTotal) - if (parcePercent) then - self.percentileText:SetText(math.floor(parcePercent)) + local actorDPS = self.playerObject.total / combatObject:GetCombatTime() + + local parsePercent = Details222.WarcraftLogs.GetDamageParsePercent(encounterId, difficultyId, actorSpecId, actorDPS) + if (parsePercent) then + parsePercent = math.floor(parsePercent) + local colorName = Details222.WarcraftLogs.GetParseColor(parsePercent) + self.percentileText:SetTextColor(detailsFramework:ParseColors(colorName)) + self.percentileText:SetText(math.floor(parsePercent)) self.percentileText.alpha = 1 else - parcePercent = Details222.ParsePercent.GetPercent(DETAILS_ATTRIBUTE_DAMAGE, difficultyId, encounterId, actorSpecId, actorTotal) - if (parcePercent) then - self.percentileText:SetText(math.floor(parcePercent)) + parsePercent = Details222.ParsePercent.GetPercent(DETAILS_ATTRIBUTE_DAMAGE, difficultyId, encounterId, actorSpecId, actorDPS) + if (parsePercent) then + parsePercent = math.floor(parsePercent) + local colorName = Details222.WarcraftLogs.GetParseColor(parsePercent) + self.percentileText:SetTextColor(detailsFramework:ParseColors(colorName)) + self.percentileText:SetText(math.floor(parsePercent)) self.percentileText.alpha = 1 else self.percentileText:SetText("#.def") @@ -225,6 +235,7 @@ playerName.outline = fontOutline end + --~create playerName.textcolor = {1, 1, 1, .9} local className = detailsFramework:CreateLabel(upFrame, "", "GameFontNormal") @@ -244,7 +255,7 @@ rankText.textsize = fontSize local totalStatusBar = CreateFrame("statusbar", nil, line) - totalStatusBar:SetSize(scrollbox_size[1]-19-player_line_height, 4) + totalStatusBar:SetSize(scrollbox_size[1]-player_line_height, 4) totalStatusBar:SetMinMaxValues(0, 100) totalStatusBar:SetStatusBarTexture([[Interface\AddOns\Details\images\bar_skyline]]) totalStatusBar:SetFrameLevel(line:GetFrameLevel()+1) @@ -297,6 +308,11 @@ f.Header:SetPoint("topleft", playerScroll, "topleft", 0, -1) f.Header:SetPoint("topright", playerScroll, "topright", 0, -1) + detailsFramework:ApplyStandardBackdrop(f.Header) + f.Header.__background:SetColorTexture(.60, .60, .60) + + --print(f.Header:GetSize()) + local playerSelectionLabel = detailsFramework:CreateLabel(playerScroll, "click to select a player", 14) playerSelectionLabel:SetPoint("bottom", playerScroll, "bottom", 0, 7) @@ -367,6 +383,18 @@ f:HookScript("OnShow", function() Details:UpdateBreakdownPlayerList() end) + + f:HookScript("OnHide", function() + for lineIndex, line in ipairs(f.playerScrollBox:GetLines()) do + line.playerObject = nil + line.combatObject = nil + end + end) + + local gradientStartColor = Details222.ColorScheme.GetColorFor("gradient-background") + local gradientBelow = DetailsFramework:CreateTexture(f.playerScrollBox, + {gradient = "vertical", fromColor = gradientStartColor, toColor = "transparent"}, 1, 90, "artwork", {0, 1, 0, 1}) + gradientBelow:SetPoint("bottoms", 1, 1) end function Details.PlayerBreakdown.CreatePlayerListFrame() diff --git a/functions/warcraftlogs.lua b/functions/warcraftlogs.lua index 86a1fc23..c23fa445 100644 --- a/functions/warcraftlogs.lua +++ b/functions/warcraftlogs.lua @@ -1,11 +1,9 @@ local Details = _G.Details local detailsFramework = _G.DetailsFramework - local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0") + local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0", true) local addonName, Details222 = ... - local specIdToClassId = {} - --wrap warcraftlogs addon api Details222.WarcraftLogs = {} --namespace @@ -15,6 +13,27 @@ return WarcraftLogs end + function Details222.WarcraftLogs.GetParseColor(percent) + if (percent == 100) then + return "moccasin" + + elseif (percent >= 91) then + return "palevioletred" + + elseif (percent >= 70) then + return "blueviolet" + + elseif (percent >= 50) then + return "SHAMAN" + + elseif (percent >= 30) then + return "lime" + + else + return "gray" + end + end + function Details222.WarcraftLogs.GetPlayerProfile(actorObject) local playerName, playerRealm = actorObject:Name():match("(%w+)%-(%w+)") @@ -93,8 +112,8 @@ end --details wrap - function Details222.WarcraftLogs.GetDamageParsePercent(encounterId, difficultyId, specId, damageDone) - local classId = LIB_OPEN_RAID_SPECID_TO_CLASSID[specId] + function Details222.WarcraftLogs.GetDamageParsePercent(encounterId, difficultyId, specId, amount) + local classId = LIB_OPEN_RAID_SPECID_TO_CLASSID and LIB_OPEN_RAID_SPECID_TO_CLASSID[specId] local classPercentileTable = Details222.WarcraftLogs.GetClassPercentileForEncounterID(encounterId, difficultyId, classId) --wrapped local specPercentile = classPercentileTable[specId] @@ -102,7 +121,7 @@ local minDamage = specPercentile.min local maxDamage = specPercentile.max - local percentScalar = detailsFramework:MapRangeClamped(minDamage, maxDamage, 0, 100, damageDone) + local percentScalar = detailsFramework:MapRangeClamped(minDamage, maxDamage, 0, 100, amount) return percentScalar else return nil @@ -310,9 +329,7 @@ }, --[14] = {} --normal - --[17] = {} --raid finder - --}, } diff --git a/images/bar_background.blp b/images/bar_background.blp deleted file mode 100644 index f3f28c03..00000000 Binary files a/images/bar_background.blp and /dev/null differ diff --git a/images/bar_background.tga b/images/bar_background.tga new file mode 100644 index 00000000..bff1788c Binary files /dev/null and b/images/bar_background.tga differ diff --git a/images/bar_background2.blp b/images/bar_background2.blp deleted file mode 100644 index 4e3b9d4c..00000000 Binary files a/images/bar_background2.blp and /dev/null differ diff --git a/images/bar_background2.tga b/images/bar_background2.tga new file mode 100644 index 00000000..cd364535 Binary files /dev/null and b/images/bar_background2.tga differ diff --git a/images/bar_background_dark.tga b/images/bar_background_dark.tga new file mode 100644 index 00000000..cd364535 Binary files /dev/null and b/images/bar_background_dark.tga differ diff --git a/images/bar_detalhes2.blp b/images/bar_detalhes2.blp deleted file mode 100644 index be510427..00000000 Binary files a/images/bar_detalhes2.blp and /dev/null differ diff --git a/images/bar_detalhes2.tga b/images/bar_detalhes2.tga new file mode 100644 index 00000000..4eb52494 Binary files /dev/null and b/images/bar_detalhes2.tga differ diff --git a/plugins/Details_Compare2/Details_Compare2.lua b/plugins/Details_Compare2/Details_Compare2.lua index 3e11b752..a2fb83e2 100644 --- a/plugins/Details_Compare2/Details_Compare2.lua +++ b/plugins/Details_Compare2/Details_Compare2.lua @@ -20,6 +20,7 @@ do local compareTwo = Details:NewPluginObject ("Details_Compare2", _G.DETAILSPLUGIN_ALWAYSENABLED) --> just localizing here the plugin's main frame local frame = compareTwo.Frame + --> set the description compareTwo:SetPluginDescription("Replaces the default comparison window on the player breakdown.") @@ -1328,6 +1329,10 @@ do return newComparisonFrame end + if (not frame.__background) then + DetailsFramework:ApplyStandardBackdrop(frame) + frame.__background:SetAlpha(0.6) + end end local buildSpellAndTargetTables = function (player, combat, attribute) @@ -1375,7 +1380,7 @@ do --main tab function to be executed when the tab is shown local playerComparisonFill = function (tab, player, combat) local frame = tab.frame - + --update player name frame.mainPlayerName.text = player:GetDisplayName() diff --git a/startup.lua b/startup.lua index e14452e4..1e06a106 100644 --- a/startup.lua +++ b/startup.lua @@ -543,14 +543,16 @@ function Details:StartMeUp() --I'll never stop! Details.cached_specs[UnitGUID("player")] = GetSpecializationInfo(GetSpecialization() or 0) end - if (not Details.data_wipes_exp["9"]) then - wipe(Details.encounter_spell_pool or {}) - wipe(Details.boss_mods_timers or {}) - wipe(Details.spell_school_cache or {}) - wipe(Details.spell_pool or {}) - wipe(Details.npcid_pool or {}) - wipe(Details.current_exp_raid_encounters or {}) - Details.data_wipes_exp["9"] = true + if (GetExpansionLevel() == 9) then + if (not Details.data_wipes_exp["10"]) then + wipe(Details.encounter_spell_pool or {}) + wipe(Details.boss_mods_timers or {}) + wipe(Details.spell_school_cache or {}) + wipe(Details.spell_pool or {}) + wipe(Details.npcid_pool or {}) + wipe(Details.current_exp_raid_encounters or {}) + Details.data_wipes_exp["10"] = true + end end Details.boss_mods_timers.encounter_timers_dbm = Details.boss_mods_timers.encounter_timers_dbm or {}