From cf591e89fb9907669702278b2a4e5a6da9d2560e Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Tue, 16 Jan 2024 19:48:55 -0300 Subject: [PATCH] Fixes for: OpenRaidLib, Rounded Cooltip, Evoker Extra Bar and Ebon Might, Welcome Window --- Details.toc | 2 +- Libs/DF/cooltip.lua | 3 ++- Libs/DF/fw.lua | 2 +- Libs/LibOpenRaid/GetPlayerInformation.lua | 3 +-- Libs/LibOpenRaid/LibOpenRaid.lua | 2 +- boot.lua | 4 ++-- classes/class_damage.lua | 8 ++++++++ frames/window_welcome.lua | 10 ++++++---- functions/spec_augmentation.lua | 2 +- 9 files changed, 23 insertions(+), 13 deletions(-) diff --git a/Details.toc b/Details.toc index e36639d72..3881fcc8f 100644 --- a/Details.toc +++ b/Details.toc @@ -1,4 +1,4 @@ -## Interface: 100200 +## Interface: 100205 ## Title: Details! Damage Meter ## Notes: Essential tool to impress that chick in your raid. ## SavedVariables: _detalhes_global, __details_backup, __details_debug diff --git a/Libs/DF/cooltip.lua b/Libs/DF/cooltip.lua index cee8b4bf6..81ebdec69 100644 --- a/Libs/DF/cooltip.lua +++ b/Libs/DF/cooltip.lua @@ -15,7 +15,7 @@ local max = math.max --api locals local PixelUtil = PixelUtil or DFPixelUtil -local version = 19 +local version = 20 local CONST_MENU_TYPE_MAINMENU = "main" local CONST_MENU_TYPE_SUBMENU = "sub" @@ -239,6 +239,7 @@ function DF:CreateCoolTip() self:SetPoint("CENTER", UIParent, "CENTER", 0, 0) if (not self.HaveRoundedCorners) then + self:SetBackdrop(nil) DF:AddRoundedCornersToFrame(self, gameCooltip.RoundedFramePreset) self:DisableRoundedCorners() self.HaveRoundedCorners = true diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 6e799dcec..7fde53763 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 503 +local dversion = 504 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) diff --git a/Libs/LibOpenRaid/GetPlayerInformation.lua b/Libs/LibOpenRaid/GetPlayerInformation.lua index 07e87652b..174f2c46a 100644 --- a/Libs/LibOpenRaid/GetPlayerInformation.lua +++ b/Libs/LibOpenRaid/GetPlayerInformation.lua @@ -737,13 +737,12 @@ local getAuraDuration = function(spellId, unitId) --spellId = customBuffDuration or spellId --can't replace the spellId by customBuffDurationSpellId has it wount be found in LIB_OPEN_RAID_PLAYERCOOLDOWNS if (bIsNewUnitAuraAvailable) then - local bBatchCount = false local bUsePackedAura = true auraSpellID = customBuffDuration or spellId auraDurationTime = 0 --reset duration auraUnitId = unitId or "player" - AuraUtil.ForEachAura(auraUnitId, "HELPFUL", bBatchCount, handleBuffAura, bUsePackedAura) --check auras to find a buff for the spellId + AuraUtil.ForEachAura(auraUnitId, "HELPFUL", nil, handleBuffAura, bUsePackedAura) --check auras to find a buff for the spellId if (auraDurationTime == 0) then --if the buff wasn't found, attempt to get the duration from the file return LIB_OPEN_RAID_PLAYERCOOLDOWNS[spellId].duration or 0 diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index 700d9c42b..9dcd06a19 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -43,7 +43,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t end local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 120 +local CONST_LIB_VERSION = 121 if (LIB_OPEN_RAID_MAX_VERSION) then if (CONST_LIB_VERSION <= LIB_OPEN_RAID_MAX_VERSION) then diff --git a/boot.lua b/boot.lua index e52b30024..c4bde8113 100644 --- a/boot.lua +++ b/boot.lua @@ -18,8 +18,8 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - Details.build_counter = 12220 - Details.alpha_build_counter = 12220 --if this is higher than the regular counter, use it instead + Details.build_counter = 12221 + Details.alpha_build_counter = 12221 --if this is higher than the regular counter, use it instead Details.dont_open_news = true Details.game_version = version Details.userversion = version .. " " .. Details.build_counter diff --git a/classes/class_damage.lua b/classes/class_damage.lua index ade1c1bd8..24655e2f8 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -3033,6 +3033,14 @@ function Details:ShowExtraStatusbar(thisLine, amount, extraAmount, totalAmount, extraStatusbar:SetPoint("topleft", thisLine, "topleft", (statusBarWidth * percent) - fillTheGapWidth, 0) end + --check if the extra bar will be bigger than the window + local windowWidth = instanceObject:GetSize() + local lineWidth = thisLine:GetWidth() + local maxExtraBarWidth = windowWidth - lineWidth - initialOffset + if (extraStatusbarWidth > maxExtraBarWidth) then + extraStatusbarWidth = maxExtraBarWidth + end + extraStatusbar:SetWidth(extraStatusbarWidth) extraStatusbar:SetFrameLevel(thisLine:GetFrameLevel() + 1) diff --git a/frames/window_welcome.lua b/frames/window_welcome.lua index a87653f98..37b2f97de 100644 --- a/frames/window_welcome.lua +++ b/frames/window_welcome.lua @@ -467,10 +467,12 @@ local window_openned_at = time() local new_window = function(self) if (#_detalhes.tabela_instancias == 1) then local newwindow = _detalhes:CreateInstance (true) - newwindow.baseframe:SetPoint("topleft", _detalhes.tabela_instancias[1].baseframe, "topright", 50, 0) - newwindow.baseframe:SetPoint("bottomleft", _detalhes.tabela_instancias[1].baseframe, "bottomright", 50, 0) - newwindow:SaveMainWindowPosition() - newwindow:RestoreMainWindowPosition() + if (newwindow) then + newwindow.baseframe:SetPoint("topleft", _detalhes.tabela_instancias[1].baseframe, "topright", 50, 0) + newwindow.baseframe:SetPoint("bottomleft", _detalhes.tabela_instancias[1].baseframe, "bottomright", 50, 0) + newwindow:SaveMainWindowPosition() + newwindow:RestoreMainWindowPosition() + end end self.MyObject:Disable() end diff --git a/functions/spec_augmentation.lua b/functions/spec_augmentation.lua index f54d65c8a..7c76c657d 100644 --- a/functions/spec_augmentation.lua +++ b/functions/spec_augmentation.lua @@ -416,7 +416,7 @@ end function augmentationFunctions.BuffOut(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, tipo, amount) if (not Details.in_combat) then --when the player enter and leave combat, it tracks which players had buffs applied - return + --return end if (spellId == 395152) then --ebon might