From efb6567151495bdce39bb37e4b851d58fdb1f123 Mon Sep 17 00:00:00 2001
From: Hendrik Leppkes <h.leppkes@gmail.com>
Date: Mon, 6 May 2024 09:35:25 +0200
Subject: [PATCH] Update missed expansion checks for Cataclysm Classic

---
 Options/Options.lua | 3 ++-
 PetBar.lua          | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Options/Options.lua b/Options/Options.lua
index b6fc695..a7a4063 100644
--- a/Options/Options.lua
+++ b/Options/Options.lua
@@ -10,6 +10,7 @@ local AceConfigDialog = LibStub("AceConfigDialog-3.0")
 local error, select, pairs = error, select, pairs
 local WoWClassic = (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE)
 local WoWWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
+local WoWCata = (WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC)
 local WoW10 = select(4, GetBuildInfo()) >= 100000
 local SaveBindings = SaveBindings or AttemptToSaveBindings
 
@@ -30,7 +31,7 @@ end
 local s_HookedKeyBound, s_KeyBoundHookShowBTOptions
 local KB = LibStub("LibKeyBound-1.0")
 local LDBIcon = LibStub("LibDBIcon-1.0", true)
-local LibDualSpec = (not WoWClassic or WoWWrath) and LibStub("LibDualSpec-1.0", true)
+local LibDualSpec = (not WoWClassic or WoWWrath or WoWCata) and LibStub("LibDualSpec-1.0", true)
 
 local function generateOptions()
 	Bartender4.options = {
diff --git a/PetBar.lua b/PetBar.lua
index 064c7a3..84294a0 100644
--- a/PetBar.lua
+++ b/PetBar.lua
@@ -13,6 +13,7 @@ local ButtonBar = Bartender4.ButtonBar.prototype
 
 local WoWRetail = (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE)
 local WoWWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
+local WoWCata = (WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC)
 
 local setmetatable, select = setmetatable, select
 
@@ -60,7 +61,7 @@ function PetBarMod:OnEnable()
 	self.bar:RegisterEvent("PET_BAR_UPDATE_USABLE")
 	self.bar:RegisterEvent("PET_UI_UPDATE")
 	self.bar:RegisterEvent("PLAYER_TARGET_CHANGED")
-	if WoWRetail or WoWWrath then
+	if WoWRetail or WoWWrath or WoWCata then
 		self.bar:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR")
 	end
 	self.bar:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED")