From fcbe3504649ba437bcfba536a2f7c556cc57d387 Mon Sep 17 00:00:00 2001 From: Kevin Krol Date: Fri, 2 Sep 2022 21:01:28 +0200 Subject: [PATCH] Fix WOTLK project ID --- .luacheckrc | 1 + CHANGELOG.md | 1 + Clicked/Core/Utils.lua | 4 ++-- Clicked/Libs/LibTalentInfoClassic-1.0/TalentDataWOTLK.lua | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 269ce092..2642ac14 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -155,6 +155,7 @@ read_globals = { "WOW_PROJECT_CLASSIC", "WOW_PROJECT_ID", "WOW_PROJECT_MAINLINE", + "WOW_PROJECT_WRATH_CLASSIC", -- Lua globals "floor", diff --git a/CHANGELOG.md b/CHANGELOG.md index f35b327e..814dfec1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format of this changelog is based on [Keep a Changelog](https://keepachangel ### Fixed * Fix keybinds being active while in a vehicle on WOTLK +* Fix WOTLK-specific features not working due to Blizzard code change ## [1.7.6] - 2022-08-31 diff --git a/Clicked/Core/Utils.lua b/Clicked/Core/Utils.lua index 0e6df46d..523152e9 100644 --- a/Clicked/Core/Utils.lua +++ b/Clicked/Core/Utils.lua @@ -1072,14 +1072,14 @@ end --- --- @return boolean function Addon:IsBC() - return WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC and LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_BURNING_CRUSADE + return WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC end --- Check if the game client is running the Wrath of the Lich King version of the API. --- --- @return boolean function Addon:IsWotLK() - return WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC and LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_WRATH_OF_THE_LICH_KING + return WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC end --- Check if the client version is at least the specified version, for example `IsAtLeast("BC")` will return `true` on both the BC and Retail versions of the diff --git a/Clicked/Libs/LibTalentInfoClassic-1.0/TalentDataWOTLK.lua b/Clicked/Libs/LibTalentInfoClassic-1.0/TalentDataWOTLK.lua index f52e10d2..f7175f45 100644 --- a/Clicked/Libs/LibTalentInfoClassic-1.0/TalentDataWOTLK.lua +++ b/Clicked/Libs/LibTalentInfoClassic-1.0/TalentDataWOTLK.lua @@ -2,7 +2,7 @@ local LibTalentInfoClassic = LibStub and LibStub("LibTalentInfoClassic-1.0", true) local version = 45043 -if WOW_PROJECT_ID ~= WOW_PROJECT_BURNING_CRUSADE_CLASSIC or LE_EXPANSION_LEVEL_CURRENT ~= LE_EXPANSION_WRATH_OF_THE_LICH_KING or LibTalentInfoClassic == nil or version <= LibTalentInfoClassic:GetTalentProviderVersion() then +if WOW_PROJECT_ID ~= WOW_PROJECT_WRATH_CLASSIC or LibTalentInfoClassic == nil or version <= LibTalentInfoClassic:GetTalentProviderVersion() then return end