From 61f3f1a87afbd138fcad2e62b8e47c99c9edbde8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chrislieb=C3=A4r?= <11184804+chrisliebaer@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:21:16 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20db=20overrides=20(#6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pkgmeta | 20 ++++++++------- db/Overrides.lua | 66 +++++++++++++++++++++++------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.pkgmeta b/.pkgmeta index a937419..6bf9f22 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -2,13 +2,15 @@ package-as: FailFeed wowi-archive-previous: no externals: + Libs/Bundled/AceAddon-3.0: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0 + Libs/Bundled/AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0 + Libs/Bundled/AceConsole-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0 + Libs/Bundled/AceDB-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDB-3.0 + Libs/Bundled/AceDBOptions-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDBOptions-3.0 + Libs/Bundled/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0 + Libs/Bundled/AceGUI-3.0-SharedMediaWidgets: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk + Libs/Bundled/LibStub: https://repos.wowace.com/wow/libstub/trunk + Libs/Bundled/LibSharedMedia-3.0: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk/LibSharedMedia-3.0 - Libs/Bundled/AceAddon-3.0: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0 - Libs/Bundled/AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0 - Libs/Bundled/AceConsole-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0 - Libs/Bundled/AceDB-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDB-3.0 - Libs/Bundled/AceDBOptions-3.0: https://repos.wowace.com/wow/ace3/trunk/AceDBOptions-3.0 - Libs/Bundled/AceGUI-3.0: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0 - Libs/Bundled/AceGUI-3.0-SharedMediaWidgets: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk - Libs/Bundled/LibStub: https://repos.wowace.com/wow/libstub/trunk - Libs/Bundled/LibSharedMedia-3.0: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk/LibSharedMedia-3.0 +ignore: + - tools diff --git a/db/Overrides.lua b/db/Overrides.lua index 1c91dd5..c0c26b5 100644 --- a/db/Overrides.lua +++ b/db/Overrides.lua @@ -2,67 +2,65 @@ -- It is intended to be used to override the default EHDB database. -- Tables are located in ns.ehdb. -- All tables are maps, with the key being the spellID and the value being true. --- If you want to add an entry, set the value to True. --- If you want to remove an entry, set the value to Nil. +-- If you want to add an entry, set the value to true. +-- If you want to remove an entry, set the value to false. local _, ns = ... -local tables = { - "Spells", - "SpellsNoTank", - "Auras", - "AurasNoTank", - "MeleeHitters", -} +local overrides = {} -local Spells = { - [393444] = Nil, -- Spear Flurry / Gushing Wound (Refti Defender) +overrides.Spells = { + [393444] = false, -- Spear Flurry / Gushing Wound (Refti Defender) - [393432] = True, -- Spear Flurry (Refti Defender) - [393444] = True, -- Gushing Wound (Refti Defender) - [256477] = True, -- Shark Toss (Trothak, Ring of Booty) - [183100] = True, -- Avalanche, Rocks (Mightstone Breaker) - [411001] = True, -- Lethal Current (Lurking Tempest) + [393432] = true, -- Spear Flurry (Refti Defender) + [393444] = true, -- Gushing Wound (Refti Defender) + [256477] = true, -- Shark Toss (Trothak, Ring of Booty) + [183100] = true, -- Avalanche, Rocks (Mightstone Breaker) + [411001] = true, -- Lethal Current (Lurking Tempest) -- ... add entries here } -local SpellsNoTank = { - [382712] = Nil, -- Necrotic Breath, Initial (Wilted Oak) - [382805] = Nil, -- Necrotic Breath, DoT (Wilted Oak) - [226406] = Nil, -- Ember Swip (Emberhusk Dominator) +overrides.SpellsNoTank = { + [382712] = false, -- Necrotic Breath, Initial (Wilted Oak) + [382805] = false, -- Necrotic Breath, DoT (Wilted Oak) + [226406] = false, -- Ember Swip (Emberhusk Dominator) - [387571] = True, -- Focused Deluge (Primal Tsunami) - [387504] = True, -- Squall Buffet (Primal Tsunami) - [374544] = True, -- Burst of Decay (Fetid Rotsinger) - [385833] = True, -- Bloodthirsty Charge (Rageclaw) (Knockback) - [385834] = True, -- Bloodthirsty Charge (Rageclaw) (Dot) - [200732] = True, -- Molten Crash (Dargrul) + [387571] = true, -- Focused Deluge (Primal Tsunami) + [387504] = true, -- Squall Buffet (Primal Tsunami) + [374544] = true, -- Burst of Decay (Fetid Rotsinger) + [385833] = true, -- Bloodthirsty Charge (Rageclaw) (Knockback) + [385834] = true, -- Bloodthirsty Charge (Rageclaw) (Dot) + [200732] = true, -- Molten Crash (Dargrul) -- ... add entries here } -local Auras = { +overrides.Auras = { -- ... add entries here } -local AurasNoTank = { - [374615] = True, -- Cheap Shot (Skulking Zealot) +overrides.AurasNoTank = { + [374615] = true, -- Cheap Shot (Skulking Zealot) -- ... add entries here } -local MeleeHitters = { +overrides.MeleeHitters = { -- ... add entries here } - function merge(target, override) for k, v in pairs(override) do - target[k] = v + if v == false then + target[k] = nil + else + target[k] = v + end end end -for _, table in ipairs(tables) do - merge(ns.ehdb[table], _G[table]) + +for table, _ in pairs(overrides) do + merge(ns.ehdb[table], overrides[table]) end