From 7c9a3957b4dba6e1b22dca2b4009d0a72c80a047 Mon Sep 17 00:00:00 2001 From: Tercioo Date: Tue, 28 May 2019 13:05:35 -0300 Subject: [PATCH] Revert "More fixes for Classic WoW" This reverts commit e21d70e46eefe4e89d059c3297c5e15811bab004. --- Libs/DF/panel.lua | 62 ++----------------------------------------- core/parser.lua | 2 +- functions/dungeon.lua | 2 +- functions/slash.lua | 4 --- startup.lua | 10 +------ 5 files changed, 5 insertions(+), 75 deletions(-) diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index db1986d4..2131335e 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -5226,16 +5226,7 @@ DF.HeaderFunctions = { frame:ClearAllPoints() local headerFrame = headerFrames [i] - local offset = 0 - - if (headerFrame.columnAlign == "right") then - offset = headerFrame:GetWidth() - if (frame:GetObjectType() == "FontString") then - frame:SetJustifyH ("right") - end - end - - frame:SetPoint (headerFrame.columnAlign, self, anchor, headerFrame.XPosition + headerFrame.columnOffset + offset, 0) + frame:SetPoint (anchor, self, anchor, headerFrame.XPosition, 0) end end, } @@ -5275,51 +5266,13 @@ DF.HeaderCoreFunctions = { --> grow direction if (not previousHeaderFrame) then headerFrame:SetPoint ("topleft", self, "topleft", 0, 0) - - if (growDirection == "right") then - if (self.options.use_line_separators) then - headerFrame.Separator:Show() - headerFrame.Separator:SetWidth (self.options.line_separator_width) - headerFrame.Separator:SetColorTexture (unpack (self.options.line_separator_color)) - - headerFrame.Separator:ClearAllPoints() - if (self.options.line_separator_gap_align) then - headerFrame.Separator:SetPoint ("topleft", headerFrame, "topright", 0, 0) - else - headerFrame.Separator:SetPoint ("topright", headerFrame, "topright", 0, 0) - end - headerFrame.Separator:SetHeight (self.options.line_separator_height) - end - end - else if (growDirection == "right") then headerFrame:SetPoint ("topleft", previousHeaderFrame, "topright", self.options.padding, 0) - - if (self.options.use_line_separators) then - headerFrame.Separator:Show() - headerFrame.Separator:SetWidth (self.options.line_separator_width) - headerFrame.Separator:SetColorTexture (unpack (self.options.line_separator_color)) - - headerFrame.Separator:ClearAllPoints() - if (self.options.line_separator_gap_align) then - headerFrame.Separator:SetPoint ("topleft", headerFrame, "topright", 0, 0) - else - headerFrame.Separator:SetPoint ("topleft", headerFrame, "topright", 0, 0) - end - headerFrame.Separator:SetHeight (self.options.line_separator_height) - - if (headerSize == i) then - headerFrame.Separator:Hide() - end - end - elseif (growDirection == "left") then headerFrame:SetPoint ("topright", previousHeaderFrame, "topleft", -self.options.padding, 0) - elseif (growDirection == "bottom") then headerFrame:SetPoint ("topleft", previousHeaderFrame, "bottomleft", 0, -self.options.padding) - elseif (growDirection == "top") then headerFrame:SetPoint ("bottomleft", previousHeaderFrame, "topleft", 0, self.options.padding) end @@ -5377,9 +5330,6 @@ DF.HeaderCoreFunctions = { headerFrame.XPosition = self.HeaderWidth-- + self.options.padding headerFrame.YPosition = self.HeaderHeight-- + self.options.padding - headerFrame.columnAlign = headerData.align or "left" - headerFrame.columnOffset = headerData.offset or 0 - --> add the header piece size to the total header size local growDirection = string.lower (self.options.grow_direction) @@ -5418,11 +5368,8 @@ DF.HeaderCoreFunctions = { local newHeader = CreateFrame ("frame", "$parentHeaderIndex" .. nextHeader, self) DF:CreateImage (newHeader, "", self.options.header_height, self.options.header_height, "ARTWORK", nil, "Icon", "$parentIcon") - DF:CreateImage (newHeader, "", 1, 1, "ARTWORK", nil, "Separator", "$parentSeparator") DF:CreateLabel (newHeader, "", self.options.text_size, self.options.text_color, "GameFontNormal", "Text", "$parentText", "ARTWORK") - newHeader.Separator:Hide() - tinsert (self.HeadersCreated, newHeader) headerFrame = newHeader end @@ -5454,12 +5401,7 @@ local default_header_options = { header_backdrop_border_color = {0, 0, 0, 0}, header_width = 120, header_height = 20, - - use_line_separators = false, - line_separator_color = {.1, .1, .1, .6}, - line_separator_width = 1, - line_separator_height = 200, - line_separator_gap_align = false, + } function DF:CreateHeader (parent, headerTable, options) diff --git a/core/parser.lua b/core/parser.lua index 4345d3ae..aceae985 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -3636,7 +3636,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 _table_insert (_current_combat.last_events_tables, #_current_combat.last_events_tables+1, t) --> check if this is a mythic+ run - local mythicLevel = C_ChallengeMode and C_ChallengeMode.GetActiveKeystoneInfo() --classic wow doesn't not have C_ChallengeMode API + local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo() if (mythicLevel and type (mythicLevel) == "number" and mythicLevel >= 2) then --several checks to be future proof --> more checks for integrity if (_detalhes.tabela_overall and _detalhes.tabela_overall.last_events_tables) then diff --git a/functions/dungeon.lua b/functions/dungeon.lua index dd63a03b..b25d6d79 100644 --- a/functions/dungeon.lua +++ b/functions/dungeon.lua @@ -170,7 +170,7 @@ function mythicDungeonCharts:OnBossDefeated() local currentCombat = Details:GetCurrentCombat() local segmentType = currentCombat:GetCombatType() local bossInfo = currentCombat:GetBossInfo() - local mythicLevel = C_ChallengeMode and C_ChallengeMode.GetActiveKeystoneInfo() + local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo() if (mythicLevel and mythicLevel > 0) then if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running and bossInfo) then diff --git a/functions/slash.lua b/functions/slash.lua index 4b4eb52e..358b6057 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -164,10 +164,6 @@ function SlashCmdList.DETAILS (msg, editbox) elseif (command == Loc ["STRING_SLASH_CHANGES"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS1"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS2"] or command == "news" or command == "updates") then _detalhes:OpenNewsWindow() - elseif (command == "discord") then - _detalhes:CopyPaste ("https://discord.gg/AGSzAZX") - - elseif (command == "debugwindow") then local window1 = Details:GetWindow(1) diff --git a/startup.lua b/startup.lua index 55614c34..80ceb0c1 100644 --- a/startup.lua +++ b/startup.lua @@ -339,7 +339,7 @@ function _G._detalhes:Start() local newFrame = CreateFrame ("frame", "DetailsMythicPlusFrame", UIParent) newFrame.DevelopmentDebug = false - --disabling the mythic+ feature if the user is playing in wow classic + --disabnling the mythic+ feature if the user is playing in wow classic if (not DetailsFramework.IsClassicWow()) then newFrame:RegisterEvent ("CHALLENGE_MODE_START") newFrame:RegisterEvent ("CHALLENGE_MODE_COMPLETED") @@ -1875,14 +1875,6 @@ function _G._detalhes:Start() --> override the overall data flag on this release only (remove on the next release) --Details.overall_flag = 0x10 - - --show warning message about classic beta - - if (not DetailsFramework.IsClassicWow()) then - print ("|CFFFFFF00[Tercioo]: this version of Details! is being ported to Classic WoW, bugs may appear here on BfA, report at Discord (/details discord).") - else - print ("|CFFFFFF00[Tercioo]: thanks for testing Details! Damage Meter for Classic WoW, report bugs at Discord (/details discord).") - end end