From 69899679e712f61425cbac8300d7e2fcd0c9f26d Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 10 Oct 2022 16:51:56 -0300 Subject: [PATCH] Merging Seal of Command on Wrath classic --- Libs/DF/auras.lua | 12 +- Libs/DF/fw.lua | 9 - Libs/DF/iteminfo.lua | 27 + Libs/DF/load.xml | 1 + Libs/DF/mixins.lua | 4 +- Libs/DF/normal_bar.lua | 4 +- Libs/DF/panel.lua | 1481 ++++++++--------- Libs/DF/slider.lua | 6 +- Libs/DF/split_bar.lua | 4 +- Libs/DF/textentry.lua | 2 +- Libs/NickTag-1.0/NickTag-1.0.lua | 2 +- classes/class_combat.lua | 2 +- classes/class_custom.lua | 12 +- classes/class_damage.lua | 172 +- classes/class_heal.lua | 174 +- classes/class_instance.lua | 20 +- classes/class_resources.lua | 44 +- classes/class_spelldamage.lua | 4 +- classes/class_utility.lua | 56 +- classes/container_actors.lua | 10 +- classes/container_pets.lua | 66 +- classes/container_segments.lua | 2 +- classes/custom_damagedone.lua | 24 +- classes/custom_healingdone.lua | 24 +- core/control.lua | 12 +- core/gears.lua | 6 +- core/meta.lua | 10 +- core/parser.lua | 421 +++-- core/plugins_solo.lua | 8 +- core/plugins_toolbar.lua | 2 +- core/timemachine.lua | 12 +- core/util.lua | 54 +- core/windows.lua | 2 +- frames/anime.lua | 4 +- frames/fw_mods.lua | 6 +- frames/window_benchmark.lua | 2 +- frames/window_currentdps.lua | 6 +- frames/window_custom.lua | 10 +- frames/window_eventtracker.lua | 6 +- frames/window_forge.lua | 30 +- frames/window_main.lua | 6 +- frames/window_options2_sections.lua | 4 +- frames/window_playerbreakdown.lua | 230 +-- frames/window_profiler.lua | 4 +- frames/window_runcode.lua | 2 +- frames/window_statistics.lua | 2 +- frames/window_switch.lua | 6 +- frames/window_wa.lua | 2 +- frames/window_welcome.lua | 62 +- functions/buff.lua | 14 +- functions/deathmenu.lua | 2 +- functions/deathrecap.lua | 10 +- functions/mythicdungeon.lua | 6 +- functions/playerclass.lua | 16 +- functions/profiles.lua | 15 +- functions/slash.lua | 4 +- functions/spellcache.lua | 2 +- .../Details_EncounterDetails.lua | 60 +- plugins/Details_EncounterDetails/frames.lua | 24 +- plugins/Details_Streamer/Details_Streamer.lua | 22 +- .../Details_TinyThreat/Details_TinyThreat.lua | 24 +- plugins/Details_Vanguard/Details_Vanguard.lua | 16 +- startup.lua | 7 + 63 files changed, 1655 insertions(+), 1638 deletions(-) create mode 100644 Libs/DF/iteminfo.lua diff --git a/Libs/DF/auras.lua b/Libs/DF/auras.lua index efbca2fb..c5d6b17a 100644 --- a/Libs/DF/auras.lua +++ b/Libs/DF/auras.lua @@ -215,7 +215,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t f.OnProfileChanged = on_profile_changed f.LocTexts = texts options = options or {} - self.table.deploy (options, aura_panel_defaultoptions) + self.table.deploy(options, aura_panel_defaultoptions) local f_auto = CreateFrame("frame", "$parent_Automatic", f, "BackdropTemplate") local f_manual = CreateFrame("frame", "$parent_Manual", f, "BackdropTemplate") @@ -228,7 +228,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t --check if the texts table is valid and also deploy default values into the table in case some value is nil texts = (type(texts == "table") and texts) or default_text_for_aura_frame - DF.table.deploy (texts, default_text_for_aura_frame) + DF.table.deploy(texts, default_text_for_aura_frame) ------------- @@ -815,7 +815,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t local icon = line:CreateTexture("$parentIcon", "overlay") icon:SetSize(lineHeight - 2, lineHeight - 2) - local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal") + local name = line:CreateFontString("$parentName", "overlay", "GameFontNormal") DF:SetFontSize (name, 10) local remove_button = CreateFrame("button", "$parentRemoveButton", line, "UIPanelCloseButton") @@ -995,7 +995,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t local icon = line:CreateTexture("$parentIcon", "overlay") icon:SetSize(scroll_line_height - 2, scroll_line_height - 2) - local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal") + local name = line:CreateFontString("$parentName", "overlay", "GameFontNormal") local remove_button = CreateFrame("button", "$parentRemoveButton", line, "UIPanelCloseButton") remove_button:SetSize(16, 16) @@ -1085,7 +1085,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t if (text ~= "") then --check for more than one spellname if (text:find (";")) then - for _, spellName in ipairs({strsplit (";", text)}) do + for _, spellName in ipairs({strsplit(";", text)}) do spellName = self:trim (spellName) local spellID = get_spellID_from_string (spellName) @@ -1132,7 +1132,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t if (text ~= "") then --check for more than one spellname if (text:find (";")) then - for _, spellName in ipairs({strsplit (";", text)}) do + for _, spellName in ipairs({strsplit(";", text)}) do spellName = self:trim (spellName) local spellID = get_spellID_from_string (spellName) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 021cca1a..6c92c65f 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -107,15 +107,6 @@ function DF.IsShadowlandsWow() end end -function DF.GetContainerItemInfo(containerIndex, slotIndex) - if (DF.IsDragonflightAndBeyond()) then - local itemInfo = C_Container.GetContainerItemInfo(containerIndex, slotIndex) - return itemInfo.iconFileID, itemInfo.stackCount, itemInfo.isLocked, itemInfo.quality, itemInfo.isReadable, itemInfo.hasLoot, itemInfo.hyperlink, itemInfo.isFiltered, itemInfo.hasNoValue, itemInfo.itemID, itemInfo.isBound - else - return GetContainerItemInfo(containerIndex, slotIndex) - end -end - local roleBySpecTextureName = { DruidBalance = "DAMAGER", DruidFeralCombat = "DAMAGER", diff --git a/Libs/DF/iteminfo.lua b/Libs/DF/iteminfo.lua new file mode 100644 index 00000000..0cd4b9c0 --- /dev/null +++ b/Libs/DF/iteminfo.lua @@ -0,0 +1,27 @@ + +local detailsFramework = _G["DetailsFramework"] +if (not detailsFramework or not DetailsFrameworkCanLoad) then + return +end + +--namespace +detailsFramework.Items = {} + +local containerAPIVersion = 1 +if (detailsFramework.IsDragonflightAndBeyond()) then + containerAPIVersion = 2 +end + +function detailsFramework.Items.GetContainerItemInfo(containerIndex, slotIndex) + if (containerAPIVersion == 2) then + local itemInfo = C_Container.GetContainerItemInfo(containerIndex, slotIndex) + return itemInfo.iconFileID, itemInfo.stackCount, itemInfo.isLocked, itemInfo.quality, itemInfo.isReadable, itemInfo.hasLoot, itemInfo.hyperlink, itemInfo.isFiltered, itemInfo.hasNoValue, itemInfo.itemID, itemInfo.isBound + else + return GetContainerItemInfo(containerIndex, slotIndex) + end +end + +function detailsFramework.Items.IsItemSoulbound(containerIndex, slotIndex) + local bIsBound = select(11, detailsFramework.Items.GetContainerItemInfo(containerIndex, slotIndex)) + return bIsBound +end diff --git a/Libs/DF/load.xml b/Libs/DF/load.xml index 54d7feaf..404ef22b 100644 --- a/Libs/DF/load.xml +++ b/Libs/DF/load.xml @@ -4,6 +4,7 @@