Roman Hergenreder 1 year ago
parent
commit
b30e477228
9 changed files with 264 additions and 90 deletions
  1. 1 0
      .gitignore
  2. 73 6
      Patches/DBM-Core.patch
  3. 143 0
      Patches/DBM-GUI.patch
  4. 27 0
      Patches/DBM-Naxx.patch
  5. 9 6
      addons.py
  6. 7 8
      create_patch.py
  7. 0 51
      patches/DBM-GUI.patch
  8. 0 15
      patches/DBM-Naxx.patch
  9. 4 4
      update_addons.py

+ 1 - 0
.gitignore

@@ -1,2 +1,3 @@
 /AddOns/
+/Archives/
 __pycache__

+ 73 - 6
patches/DBM-Core.patch → Patches/DBM-Core.patch

@@ -1,6 +1,6 @@
-diff -ruN /tmp/tmpasjqcnie/DBM-Core/DBM-BossHealth.lua ./AddOns/DBM-Core/DBM-BossHealth.lua
---- /tmp/tmpasjqcnie/DBM-Core/DBM-BossHealth.lua	1970-01-01 01:00:00.000000000 +0100
-+++ ./AddOns/DBM-Core/DBM-BossHealth.lua	2022-10-23 19:11:05.902083115 +0200
+diff -ruN /tmp/tmp556h65qs/DBM-Core/DBM-BossHealth.lua ./DBM-BossHealth.lua
+--- /tmp/tmp556h65qs/DBM-Core/DBM-BossHealth.lua	1970-01-01 01:00:00.000000000 +0100
++++ ./DBM-BossHealth.lua	2022-10-23 19:11:05.902083115 +0200
 @@ -0,0 +1,287 @@
 +---------------
 +--  Globals  --
@@ -289,9 +289,9 @@ diff -ruN /tmp/tmpasjqcnie/DBM-Core/DBM-BossHealth.lua ./AddOns/DBM-Core/DBM-Bos
 +		updateBarStyle(v, i)
 +	end
 +end
-diff -ruN /tmp/tmpasjqcnie/DBM-Core/DBM-BossHealth.xml ./AddOns/DBM-Core/DBM-BossHealth.xml
---- /tmp/tmpasjqcnie/DBM-Core/DBM-BossHealth.xml	1970-01-01 01:00:00.000000000 +0100
-+++ ./AddOns/DBM-Core/DBM-BossHealth.xml	2022-10-23 12:32:08.208657820 +0200
+diff -ruN /tmp/tmp556h65qs/DBM-Core/DBM-BossHealth.xml ./DBM-BossHealth.xml
+--- /tmp/tmp556h65qs/DBM-Core/DBM-BossHealth.xml	1970-01-01 01:00:00.000000000 +0100
++++ ./DBM-BossHealth.xml	2022-10-23 12:32:08.208657820 +0200
 @@ -0,0 +1,71 @@
 +<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
 +..\FrameXML\UI.xsd">
@@ -364,3 +364,70 @@ diff -ruN /tmp/tmpasjqcnie/DBM-Core/DBM-BossHealth.xml ./AddOns/DBM-Core/DBM-Bos
 +		</Frames>
 +	</Frame>
 +</Ui>
+diff -ruN /tmp/tmp556h65qs/DBM-Core/DBM-Core.lua ./DBM-Core.lua
+--- /tmp/tmp556h65qs/DBM-Core/DBM-Core.lua	2022-11-03 22:40:13.181251128 +0100
++++ ./DBM-Core.lua	2022-11-03 22:40:11.591252061 +0100
+@@ -370,6 +370,15 @@
+ 	ChatFrame = "DEFAULT_CHAT_FRAME",
+ 	CoreSavedRevision = 1,
+ 	SilentMode = false,
++	-- Custom / BossHealth
++	HPFramePoint = "CENTER",
++	HPFrameX = -50,
++	HPFrameY = 50,
++	HPFrameMaxEntries = 5,
++	HealthFrameGrowUp = false,
++	HealthFrameLocked = false,
++	HealthFrameWidth = 200,
++	AlwaysShowHealthFrame = false,
+ }
+ 
+ DBM.Mods = {}
+@@ -4902,6 +4911,16 @@
+ 			else
+ 				self:Schedule(3, checkWipe, self)
+ 			end
++			if (DBM.Options.AlwaysShowHealthFrame or mod.Options.HealthFrame) and mod.Options.Enabled then
++				DBM.BossHealth:Show(mod.localization.general.name)
++				if mod.bossHealthInfo then
++					for i = 1, #mod.bossHealthInfo, 2 do
++						DBM.BossHealth:AddBoss(mod.bossHealthInfo[i], mod.bossHealthInfo[i + 1])
++					end
++				else
++					DBM.BossHealth:AddBoss(mod.combatInfo.mob, mod.localization.general.name)
++				end
++			end
+ 			--get boss hp at pull
+ 			if syncedStartHp and syncedStartHp < 1 then
+ 				syncedStartHp = syncedStartHp * 100
+@@ -5438,6 +5457,7 @@
+ 				self:Schedule(22, self.TransitionToDungeonBGM, self)
+ 				--module cleanup
+ 				private:ClearModuleTasks()
++				DBM.BossHealth:Hide()
+ 			end
+ 		end
+ 	end
+@@ -11170,3 +11190,11 @@
+ 	self.localization.miscStrings.name = self.localization.general.name
+ 	return self.localization.miscStrings
+ end
++
++
++-------------------------
++--  Boss Health Frame  --
++-------------------------
++function bossModPrototype:SetBossHealthInfo(...)
++	self.bossHealthInfo = {...}
++end
+diff -ruN /tmp/tmp556h65qs/DBM-Core/DBM-Core.toc ./DBM-Core.toc
+--- /tmp/tmp556h65qs/DBM-Core/DBM-Core.toc	2022-11-03 22:40:13.177917797 +0100
++++ ./DBM-Core.toc	2022-11-03 22:32:45.724645234 +0100
+@@ -85,3 +85,7 @@
+ modules\UpdateReminder.lua
+ 
+ modules\objects\Localization.lua
++
++# Custom / BossHealth
++DBM-BossHealth.lua
++DBM-BossHealth.xml

+ 143 - 0
Patches/DBM-GUI.patch

@@ -0,0 +1,143 @@
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/AddOns/DBM-GUI/modules/options/frames/BossHealth.lua ./AddOns/DBM-GUI/modules/options/frames/BossHealth.lua
+--- /tmp/tmp556h65qs/DBM-GUI/AddOns/DBM-GUI/modules/options/frames/BossHealth.lua	1970-01-01 01:00:00.000000000 +0100
++++ ./AddOns/DBM-GUI/modules/options/frames/BossHealth.lua	2022-11-03 21:45:04.829649109 +0100
+@@ -0,0 +1,46 @@
++local L = DBM_GUI_L
++local hpPanel = DBM_GUI.Cat_Frames:CreateNewPanel(L.Panel_BossHealth, "option")
++
++local hpArea = hpPanel:CreateArea(L.Area_HPFrame, nil, 150, true)
++hpArea:CreateCheckButton(L.HP_Enabled, true, nil, "AlwaysShowHealthFrame")
++local growbttn = hpArea:CreateCheckButton(L.HP_GrowUpwards, true)
++growbttn:SetScript("OnShow",  function(self) self:SetChecked(DBM.Options.HealthFrameGrowUp) end)
++growbttn:SetScript("OnClick", function(self) 
++        DBM.Options.HealthFrameGrowUp = not not self:GetChecked() 
++        DBM.BossHealth:UpdateSettings()
++end)
++
++
++local BarWidthSlider = hpArea:CreateSlider(L.BarWidth, 150, 275, 1)
++BarWidthSlider:SetPoint("TOPLEFT", hpArea.frame, "TOPLEFT", 20, -75)
++BarWidthSlider:SetScript("OnShow", function(self) self:SetValue(DBM.Options.HealthFrameWidth or 100) end)
++BarWidthSlider:HookScript("OnValueChanged", function(self) 
++        DBM.Options.HealthFrameWidth = self:GetValue()
++        DBM.BossHealth:UpdateSettings()
++end)
++
++local resetbutton = hpArea:CreateButton(L.Reset, 120, 16)
++resetbutton:SetPoint('BOTTOMRIGHT', hpArea.frame, "BOTTOMRIGHT", -5, 5)
++resetbutton:SetNormalFontObject(GameFontNormalSmall);
++resetbutton:SetHighlightFontObject(GameFontNormalSmall);		
++resetbutton:SetScript("OnClick", function()
++        DBM.Options.HPFramePoint = DBM.DefaultOptions.HPFramePoint
++        DBM.Options.HPFrameX = DBM.DefaultOptions.HPFrameX
++        DBM.Options.HPFrameY = DBM.DefaultOptions.HPFrameY
++        DBM.Options.HealthFrameGrowUp = DBM.DefaultOptions.HealthFrameGrowUp
++        DBM.Options.HealthFrameWidth = DBM.DefaultOptions.HealthFrameWidth
++        DBM.BossHealth:UpdateSettings()
++end)		
++
++local function createDummyFunc(i) return function() return i end end
++local showbutton = hpArea:CreateButton(L.HP_ShowDemo, 120, 16)
++showbutton:SetPoint('BOTTOM', resetbutton, "TOP", 0, 5)
++showbutton:SetNormalFontObject(GameFontNormalSmall);
++showbutton:SetHighlightFontObject(GameFontNormalSmall);		
++showbutton:SetScript("OnClick", function()
++        DBM.BossHealth:Show("Health Frame")
++        DBM.BossHealth:AddBoss(createDummyFunc(25), "TestBoss 1")
++        DBM.BossHealth:AddBoss(createDummyFunc(50), "TestBoss 2")
++        DBM.BossHealth:AddBoss(createDummyFunc(75), "TestBoss 3")
++        DBM.BossHealth:AddBoss(createDummyFunc(100), "TestBoss 4")			
++end)
+\ Kein Zeilenumbruch am Dateiende.
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/DBM-GUI.toc ./DBM-GUI.toc
+--- /tmp/tmp556h65qs/DBM-GUI/DBM-GUI.toc	2022-11-03 22:40:13.204584447 +0100
++++ ./DBM-GUI.toc	2022-11-03 21:58:44.955032367 +0100
+@@ -74,3 +74,4 @@
+ modules\options\frames\InfoFrame.lua
+ modules\options\frames\Range.lua
+ modules\options\frames\Nameplate.lua
++modules\options\frames\BossHealth.lua
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/localization.de.lua ./localization.de.lua
+--- /tmp/tmp556h65qs/DBM-GUI/localization.de.lua	2022-11-03 22:40:13.204584447 +0100
++++ ./localization.de.lua	2022-11-03 22:29:15.121522894 +0100
+@@ -466,3 +466,11 @@
+ L.Area_Position="Position"
+ L.Area_Style="Stil"
+ L.Area_General="Allgemein"
++
++-- Custom / BossHealth
++L.Panel_HPFrame				= "Lebensanzeige"
++L.Area_HPFrame				= "Lebensanzeige-Optionen"
++L.HP_Enabled				= "Lebensanzeige immer anzeigen (überschreibt boss-spezifische Option)"
++L.HP_GrowUpwards			= "Erweitere Lebensanzeige nach oben"
++L.HP_ShowDemo				= "Zeige Lebensanzeige"
++L.BarWidth					= "Balkenbreite: %d"
+\ Kein Zeilenumbruch am Dateiende.
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/localization.en.lua ./localization.en.lua
+--- /tmp/tmp556h65qs/DBM-GUI/localization.en.lua	2022-11-03 22:40:13.204584447 +0100
++++ ./localization.en.lua	2022-11-03 22:30:15.074758448 +0100
+@@ -489,3 +489,12 @@
+ L.FontType					= "Select font"
+ 
+ L.FontHeight	= 16
++
++
++-- Custom / BossHealth
++L.Panel_HPFrame				= "Health Frame"
++L.Area_HPFrame				= "Health Frame Options"
++L.HP_Enabled				= "Always show health frame (Overrides boss-specific option)"
++L.HP_GrowUpwards			= "Expand health frame upward"
++L.HP_ShowDemo				= "Show HP frame"
++L.BarWidth					= "Bar width: %d"
+\ Kein Zeilenumbruch am Dateiende.
+diff -ruN /tmp/tmp556h65qs/DBM-GUI/modules/options/frames/BossHealth.lua ./modules/options/frames/BossHealth.lua
+--- /tmp/tmp556h65qs/DBM-GUI/modules/options/frames/BossHealth.lua	1970-01-01 01:00:00.000000000 +0100
++++ ./modules/options/frames/BossHealth.lua	2022-11-03 22:31:10.621334700 +0100
+@@ -0,0 +1,46 @@
++local L = DBM_GUI_L
++local hpPanel = DBM_GUI.Cat_Frames:CreateNewPanel(L.Panel_HPFrame, "option")
++
++local hpArea = hpPanel:CreateArea(L.Area_HPFrame, nil, 150, true)
++hpArea:CreateCheckButton(L.HP_Enabled, true, nil, "AlwaysShowHealthFrame")
++local growbttn = hpArea:CreateCheckButton(L.HP_GrowUpwards, true)
++growbttn:SetScript("OnShow",  function(self) self:SetChecked(DBM.Options.HealthFrameGrowUp) end)
++growbttn:SetScript("OnClick", function(self) 
++        DBM.Options.HealthFrameGrowUp = not not self:GetChecked() 
++        DBM.BossHealth:UpdateSettings()
++end)
++
++
++local BarWidthSlider = hpArea:CreateSlider(L.BarWidth, 150, 275, 1)
++BarWidthSlider:SetPoint("TOPLEFT", hpArea.frame, "TOPLEFT", 20, -75)
++BarWidthSlider:SetScript("OnShow", function(self) self:SetValue(DBM.Options.HealthFrameWidth or 100) end)
++BarWidthSlider:HookScript("OnValueChanged", function(self) 
++        DBM.Options.HealthFrameWidth = self:GetValue()
++        DBM.BossHealth:UpdateSettings()
++end)
++
++local resetbutton = hpArea:CreateButton(L.Reset, 120, 16)
++resetbutton:SetPoint('BOTTOMRIGHT', hpArea.frame, "BOTTOMRIGHT", -5, 5)
++resetbutton:SetNormalFontObject(GameFontNormalSmall);
++resetbutton:SetHighlightFontObject(GameFontNormalSmall);		
++resetbutton:SetScript("OnClick", function()
++        DBM.Options.HPFramePoint = DBM.DefaultOptions.HPFramePoint
++        DBM.Options.HPFrameX = DBM.DefaultOptions.HPFrameX
++        DBM.Options.HPFrameY = DBM.DefaultOptions.HPFrameY
++        DBM.Options.HealthFrameGrowUp = DBM.DefaultOptions.HealthFrameGrowUp
++        DBM.Options.HealthFrameWidth = DBM.DefaultOptions.HealthFrameWidth
++        DBM.BossHealth:UpdateSettings()
++end)		
++
++local function createDummyFunc(i) return function() return i end end
++local showbutton = hpArea:CreateButton(L.HP_ShowDemo, 120, 16)
++showbutton:SetPoint('BOTTOM', resetbutton, "TOP", 0, 5)
++showbutton:SetNormalFontObject(GameFontNormalSmall);
++showbutton:SetHighlightFontObject(GameFontNormalSmall);		
++showbutton:SetScript("OnClick", function()
++        DBM.BossHealth:Show("Health Frame")
++        DBM.BossHealth:AddBoss(createDummyFunc(25), "TestBoss 1")
++        DBM.BossHealth:AddBoss(createDummyFunc(50), "TestBoss 2")
++        DBM.BossHealth:AddBoss(createDummyFunc(75), "TestBoss 3")
++        DBM.BossHealth:AddBoss(createDummyFunc(100), "TestBoss 4")			
++end)
+\ Kein Zeilenumbruch am Dateiende.

+ 27 - 0
Patches/DBM-Naxx.patch

@@ -0,0 +1,27 @@
+diff -ruN /tmp/tmp556h65qs/DBM-Naxx/ConstructQuarter/Thaddius.lua ./ConstructQuarter/Thaddius.lua
+--- /tmp/tmp556h65qs/DBM-Naxx/ConstructQuarter/Thaddius.lua	2022-11-03 22:40:13.157917808 +0100
++++ ./ConstructQuarter/Thaddius.lua	2022-11-03 22:26:01.801839916 +0100
+@@ -14,6 +14,11 @@
+ 	"UNIT_AURA player"
+ )
+ 
++mod:SetBossHealthInfo(
++	15930, L.Boss1,
++	15929, L.Boss2
++)
++
+ local warnShiftSoon			= mod:NewPreWarnAnnounce(28089, 5, 3)
+ local warnShiftCasting		= mod:NewCastAnnounce(28089, 4)
+ local warnThrow				= mod:NewSpellAnnounce(28338, 2)
+diff -ruN /tmp/tmp556h65qs/DBM-Naxx/localization.de.lua ./localization.de.lua
+--- /tmp/tmp556h65qs/DBM-Naxx/localization.de.lua	2022-11-03 22:40:13.157917808 +0100
++++ ./localization.de.lua	2022-11-03 22:25:15.948582240 +0100
+@@ -18,6 +18,8 @@
+ 	ArachnophobiaTimer	= "Arachnophobie",
+ 	Pull1				= "Rennt! Das bringt das Blut in Wallung!",
+ 	Pull2				= "Nur einmal kosten..." --needs to be verified (wowhead-captured translation)
++	Boss1 				= "Feugen",
++	Boss2 				= "Stalagg",
+ })
+ 
+ ----------------------------

+ 9 - 6
addons.py

@@ -3,6 +3,10 @@ import re
 import datetime
 
 ZIP_FILE_NAME_PATTERN = r"(-|_|\+|\.)(v|r)?[0-9]+(.*).zip$"
+ADDON_DIRECTORY = "./AddOns"
+ZIP_DIRECTORY = "./Archives"
+PATCH_DIRECTORY = "./Patches"
+
 ADDONS = {
     "questie": "Questie",
     # "omen-threat-meter": "Omen",
@@ -19,18 +23,17 @@ ADDONS = {
     "vuhdo": "VuhDo",
     "power-auras-classic-v4": "PowerAuras",
     "tacotip-gearscore-talents": "TacoTip",
-    "details": "Details.DF.SL.Wrath",
+    "details": "Details.DF.Wrath",
     # "weakauras-2": "WeakAuras",
 }
 
-ADDON_DIRECTORY = "./AddOns"
 
 
 def get_current_version(name):
     latest_version = None
-    for file in os.listdir("./AddOns"):
+    for file in os.listdir(ZIP_DIRECTORY):
         if re.findall(name + ZIP_FILE_NAME_PATTERN, file, flags=re.IGNORECASE):
-            file = os.path.join("./AddOns", file)
+            file = os.path.join(ZIP_DIRECTORY, file)
             modified = datetime.datetime.fromtimestamp(os.path.getmtime(file))
             if latest_version is None or modified > latest_version:
                 latest_version = modified
@@ -40,9 +43,9 @@ def get_current_version(name):
 def get_original_zip(name):
     latest_version = None
     latest_file = None
-    for file in os.listdir("./AddOns"):
+    for file in os.listdir(ZIP_DIRECTORY):
         if re.findall(name + ZIP_FILE_NAME_PATTERN, file, flags=re.IGNORECASE):
-            file = os.path.join("./AddOns", file)
+            file = os.path.join(ZIP_DIRECTORY, file)
             modified = datetime.datetime.fromtimestamp(os.path.getmtime(file))
             if latest_version is None or modified > latest_version:
                 latest_version = modified

+ 7 - 8
create_patch.py

@@ -8,22 +8,22 @@ import datetime
 import subprocess
 import tempfile
 
-from addons import get_original_zip, ADDON_DIRECTORY
+from addons import get_original_zip, ADDON_DIRECTORY, PATCH_DIRECTORY
 
 def create_patch(orig_directory, curr_directory):
     dir_name = os.path.basename(orig_directory)
     orig_directory = os.path.realpath(orig_directory)
-    # curr_directory = os.path.realpath(curr_directory)
-    proc = subprocess.Popen(["diff", "-ruN", orig_directory, curr_directory], stdout=subprocess.PIPE)
+    curr_directory = os.path.realpath(curr_directory)
+    proc = subprocess.Popen(["diff", "-ruN", orig_directory, "."], cwd=curr_directory, stdout=subprocess.PIPE)
     output, err = proc.communicate()
     if err:
         print("Error:", err)
     if output:
         print("Creating Patch for:", dir_name)
-        if not os.path.isdir("./patches"):
-            os.makedirs("./patches")
+        if not os.path.isdir(PATCH_DIRECTORY):
+            os.makedirs(PATCH_DIRECTORY)
 
-        with open(f"./patches/{dir_name}.patch", "wb") as f:
+        with open(os.path.join(PATCH_DIRECTORY, f"{dir_name}.patch"), "wb") as f:
             f.write(output)
 
 if __name__ == "__main__":
@@ -38,10 +38,9 @@ if __name__ == "__main__":
             zip_file = zipfile.ZipFile(original_file, "r")
             with tempfile.TemporaryDirectory() as temp_dir:
                 zip_file.extractall(temp_dir)
+                zip_file.close()
                 for directory in os.listdir(temp_dir):
                     cur_dir = os.path.join(ADDON_DIRECTORY, directory)
                     orig_directory = os.path.join(temp_dir, directory)
                     if os.path.isdir(orig_directory) and os.path.isdir(cur_dir):
                         create_patch(orig_directory, cur_dir)
-
-                zip_file.close()

+ 0 - 51
patches/DBM-GUI.patch

@@ -1,51 +0,0 @@
-diff -ruN /tmp/tmpasjqcnie/DBM-GUI/modules/options/frames/BossHealth.lua ./AddOns/DBM-GUI/modules/options/frames/BossHealth.lua
---- /tmp/tmpasjqcnie/DBM-GUI/modules/options/frames/BossHealth.lua	1970-01-01 01:00:00.000000000 +0100
-+++ ./AddOns/DBM-GUI/modules/options/frames/BossHealth.lua	2022-10-23 15:23:11.962084908 +0200
-@@ -0,0 +1,46 @@
-+local L = DBM_GUI_L
-+local hpPanel = DBM_GUI.Cat_Frames:CreateNewPanel(L.Panel_BossHealth, "option")
-+
-+local hpArea = hpPanel:CreateArea(L.Area_HPFrame, nil, 150, true)
-+hpArea:CreateCheckButton(L.HP_Enabled, true, nil, "AlwaysShowHealthFrame")
-+local growbttn = hpArea:CreateCheckButton(L.HP_GrowUpwards, true)
-+growbttn:SetScript("OnShow",  function(self) self:SetChecked(DBM.Options.HealthFrameGrowUp) end)
-+growbttn:SetScript("OnClick", function(self) 
-+        DBM.Options.HealthFrameGrowUp = not not self:GetChecked() 
-+        DBM.BossHealth:UpdateSettings()
-+end)
-+
-+
-+local BarWidthSlider = hpArea:CreateSlider(L.BarWidth, 150, 275, 1)
-+BarWidthSlider:SetPoint("TOPLEFT", hpArea.frame, "TOPLEFT", 20, -75)
-+BarWidthSlider:SetScript("OnShow", function(self) self:SetValue(DBM.Options.HealthFrameWidth or 100) end)
-+BarWidthSlider:HookScript("OnValueChanged", function(self) 
-+        DBM.Options.HealthFrameWidth = self:GetValue()
-+        DBM.BossHealth:UpdateSettings()
-+end)
-+
-+local resetbutton = hpArea:CreateButton(L.Reset, 120, 16)
-+resetbutton:SetPoint('BOTTOMRIGHT', hpArea.frame, "BOTTOMRIGHT", -5, 5)
-+resetbutton:SetNormalFontObject(GameFontNormalSmall);
-+resetbutton:SetHighlightFontObject(GameFontNormalSmall);		
-+resetbutton:SetScript("OnClick", function()
-+        DBM.Options.HPFramePoint = DBM.DefaultOptions.HPFramePoint
-+        DBM.Options.HPFrameX = DBM.DefaultOptions.HPFrameX
-+        DBM.Options.HPFrameY = DBM.DefaultOptions.HPFrameY
-+        DBM.Options.HealthFrameGrowUp = DBM.DefaultOptions.HealthFrameGrowUp
-+        DBM.Options.HealthFrameWidth = DBM.DefaultOptions.HealthFrameWidth
-+        DBM.BossHealth:UpdateSettings()
-+end)		
-+
-+local function createDummyFunc(i) return function() return i end end
-+local showbutton = hpArea:CreateButton(L.HP_ShowDemo, 120, 16)
-+showbutton:SetPoint('BOTTOM', resetbutton, "TOP", 0, 5)
-+showbutton:SetNormalFontObject(GameFontNormalSmall);
-+showbutton:SetHighlightFontObject(GameFontNormalSmall);		
-+showbutton:SetScript("OnClick", function()
-+        DBM.BossHealth:Show("Health Frame")
-+        DBM.BossHealth:AddBoss(createDummyFunc(25), "TestBoss 1")
-+        DBM.BossHealth:AddBoss(createDummyFunc(50), "TestBoss 2")
-+        DBM.BossHealth:AddBoss(createDummyFunc(75), "TestBoss 3")
-+        DBM.BossHealth:AddBoss(createDummyFunc(100), "TestBoss 4")			
-+end)
-\ Kein Zeilenumbruch am Dateiende.

+ 0 - 15
patches/DBM-Naxx.patch

@@ -1,15 +0,0 @@
-diff -ruN /tmp/tmpasjqcnie/DBM-Naxx/ConstructQuarter/Thaddius.lua ./AddOns/DBM-Naxx/ConstructQuarter/Thaddius.lua
---- /tmp/tmpasjqcnie/DBM-Naxx/ConstructQuarter/Thaddius.lua	2022-10-27 11:16:05.290029506 +0200
-+++ ./AddOns/DBM-Naxx/ConstructQuarter/Thaddius.lua	2022-10-27 11:15:27.286556724 +0200
-@@ -14,6 +14,11 @@
- 	"UNIT_AURA player"
- )
- 
-+mod:SetBossHealthInfo(
-+	15930, L.Boss1,
-+	15929, L.Boss2
-+)
-+
- local warnShiftSoon			= mod:NewPreWarnAnnounce(28089, 5, 3)
- local warnShiftCasting		= mod:NewCastAnnounce(28089, 4)
- local warnThrow				= mod:NewSpellAnnounce(28338, 2)

+ 4 - 4
update_addons.py

@@ -18,7 +18,7 @@ from selenium.webdriver.support import expected_conditions as EC
 from selenium.webdriver.common.by import By
 from bs4 import BeautifulSoup
 
-from addons import ADDONS, ADDON_DIRECTORY, ZIP_FILE_NAME_PATTERN, get_current_version
+from addons import ADDONS, ZIP_DIRECTORY, ADDON_DIRECTORY, ZIP_FILE_NAME_PATTERN, PATCH_DIRECTORY, get_current_version
 
 USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0"
 BASE_URL = "https://www.curseforge.com"
@@ -68,7 +68,7 @@ def wait_for_download(driver, name):
                 if parts.scheme == "file":
                     abs_path = urllib.parse.unquote(parts.path)
                     if os.path.isfile(abs_path):
-                        if re.match(name + ZIP_FILE_NAME_PATTERN, os.path.basename(abs_path), flags=re.IGNORECASE):
+                        if re.findall(name + ZIP_FILE_NAME_PATTERN, os.path.basename(abs_path), flags=re.IGNORECASE):
                             downloaded_file = abs_path
                             break
 
@@ -92,7 +92,7 @@ def extract_update(path):
     zip_file.extractall(ADDON_DIRECTORY)
 
     for directory in directories:
-        patch_file = os.path.join("patches", f"{directory}.patch")
+        patch_file = os.path.join(PATCH_DIRECTORY, f"{directory}.patch")
         if os.path.isfile(patch_file):
             print("Applying patch:", patch_file)
             patch_file_arg = shlex.quote(os.path.realpath(patch_file))
@@ -136,7 +136,7 @@ if __name__ == "__main__":
         # options.headless = True
         options.add_argument(f"user-agent={USER_AGENT}")
         prefs = {
-            "download.default_directory": os.path.realpath(ADDON_DIRECTORY),
+            "download.default_directory": os.path.realpath(ZIP_DIRECTORY),
             "profile.managed_default_content_settings.images": 2
         }
         options.add_experimental_option("prefs", prefs)