diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index 9a083262..c78c2c8a 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -39,7 +39,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t end local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 107 +local CONST_LIB_VERSION = 108 if (LIB_OPEN_RAID_MAX_VERSION) then if (CONST_LIB_VERSION <= LIB_OPEN_RAID_MAX_VERSION) then diff --git a/Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua b/Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua index cd92900c..ed39cf2b 100644 --- a/Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua +++ b/Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua @@ -651,6 +651,7 @@ do [110959] = {cooldown = 120, duration = 20, specs = {62}, talent = false, charges = 1, class = "MAGE", type = 2}, --Greater Invisibility | 110959 [11426] = {cooldown = 25, duration = 60, specs = {64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Ice Barrier [45438] = {cooldown = 240, duration = 10, specs = {62, 63, 64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Ice Block + [414658] = {cooldown = 180, duration = 6, specs = {62, 63, 64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Ice Cold [12472] = {cooldown = 180, duration = 20, specs = {64}, talent = false, charges = 1, class = "MAGE", type = 1}, --Icy Veins [66] = {cooldown = 300, duration = 20, specs = {63, 64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Invisibility [383121] = {cooldown = 60, duration = 0, specs = {62, 63, 64}, talent = false, charges = 1, class = "MAGE", type = 8}, --Mass Polymorph @@ -664,7 +665,6 @@ do [475] = {cooldown = 8, duration = 0, specs = {63, 64, 62}, talent = false, charges = 1, class = "MAGE", type = 7}, --Remove Curse [122] = {cooldown = 30, duration = 6, specs = {63, 64, 62}, talent = false, charges = 1, class = "MAGE", type = 8}, --Frost Nova [157980] = {cooldown = 25, duration = 0, specs = {62}, talent = false, charges = 1, class = "MAGE", type = 8}, --Supernova - [414660] = {cooldown = 120, duration = 60, specs = {63, 64, 62}, talent = false, charges = 1, class = "MAGE", type = 4}, --Mass Barrier [414664] = {cooldown = 300, duration = 12, specs = {63, 64, 62}, talent = false, charges = 1, class = "MAGE", type = 5}, --Mass Invisibility (only out of combat) @@ -909,6 +909,8 @@ do --187827 vengeance need to test these spellIds --191427 havoc [370564] = 370537, -- Evoker Stasis + --[414658] = 45438, -- Ice Block with the talent Ice Cold + --[414658] = 45438, -- Ice Block with the talent IceCold } LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS = { [106898] = {106898,77764,77761}, diff --git a/classes/class_instance.lua b/classes/class_instance.lua index 3090262b..7981f9d0 100644 --- a/classes/class_instance.lua +++ b/classes/class_instance.lua @@ -103,7 +103,7 @@ function Details:InstanceCallDetailsFunc(func, ...) for index, instance in ipairs(Details.tabela_instancias) do ---@cast instance instance if (instance:IsEnabled()) then - func(Details, instance, ...) + func(nil, instance, ...) end end end @@ -113,7 +113,7 @@ end ---@vararg any function Details:InstanciaCallFunctionOffline(func, ...) for index, instancia in ipairs(Details.tabela_instancias) do - func(Details, instancia, ...) + func(nil, instancia, ...) end end @@ -654,7 +654,7 @@ function Details:GetShowingCombat() return self.showing end -function Details:GetCustomObject(object_name) +function Details:GetCustomObject (object_name) if (object_name) then for _, object in ipairs(Details.custom) do if (object.name == object_name) then @@ -691,7 +691,7 @@ function Details:GetMaxInstancesAmount() return Details.instances_amount end -function Details:SetMaxInstancesAmount(amount) +function Details:SetMaxInstancesAmount (amount) if (type(amount) == "number") then Details.instances_amount = amount end diff --git a/core/control.lua b/core/control.lua index 7011dcbf..bda1acfa 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1992,9 +1992,9 @@ if (Details.last_instance_id ~= mapid) then Details.tabela_historico:ResetOverallData() - if (Details.segments_auto_erase == 2) then - --ask + if (Details.segments_auto_erase == 2) then --ask to erase Details:ScheduleTimer("AutoEraseConfirm", 1) + elseif (Details.segments_auto_erase == 3) then --erase Details.tabela_historico:ResetAllCombatData() diff --git a/core/parser.lua b/core/parser.lua index 685a8bbe..99d716d2 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -5120,7 +5120,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 else local inInstance = IsInInstance() if ((zoneType == "raid" or zoneType == "party") and inInstance) then - Details:CheckForAutoErase (zoneMapID) + Details:CheckForAutoErase(zoneMapID) --if the current raid is current tier raid, pre-load the storage database if (zoneType == "raid") then diff --git a/frames/window_main.lua b/frames/window_main.lua index a30d9b25..e4557b0b 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -4008,6 +4008,20 @@ local windowLineMixin = { Details.barras_criadas = 0 +local onEnterExtraStatusbar = function(self) + self:SetAlpha(1) + if (self.OnEnterCallback) then + local okay, errorText = pcall(self.OnEnterCallback, self) + if (not okay) then + Details:Msg("Error on extra statusbar OnEnterCallback: ", errorText) + end + end +end + +local onLeaveExtraStatusbar = function(self) + self:SetAlpha(self.defaultAlpha) +end + --alias function gump:NewRow(instancia, index) return gump:CreateNewLine(instancia, index) @@ -4062,13 +4076,18 @@ function gump:CreateNewLine(instance, index) newLine.statusbar:SetStatusBarTexture(newLine.textura) newLine.extraStatusbar = CreateFrame("StatusBar", "DetailsBarra_Statusbar2_" .. instance.meu_id .. "_" .. index, newLine) + newLine.extraStatusbar:SetMinMaxValues(0, 100) newLine.extraStatusbar.texture = newLine.extraStatusbar:CreateTexture(nil, "overlay") newLine.extraStatusbar:SetStatusBarTexture(newLine.extraStatusbar.texture) --by default painting the extraStatusbar with the evoker color local evokerColor = Details.class_colors["EVOKER"] newLine.extraStatusbar.texture:SetColorTexture(1, 1, 1, 1) --setColorTexture is very expensive, so set the color once and use vertex color to change it newLine.extraStatusbar.texture:SetVertexColor(unpack(evokerColor)) + newLine.extraStatusbar:SetAlpha(0.7) + newLine.extraStatusbar.defaultAlpha = 0.7 newLine.extraStatusbar:Hide() + newLine.extraStatusbar:SetScript("OnEnter", onEnterExtraStatusbar) + newLine.extraStatusbar:SetScript("OnLeave", onLeaveExtraStatusbar) --frame for hold the backdrop border newLine.border = CreateFrame("Frame", "DetailsBarra_Border_" .. instance.meu_id .. "_" .. index, newLine.statusbar, "BackdropTemplate")