Skip to content

Commit

Permalink
Fix WOTLK project ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Snakybo committed Sep 2, 2022
1 parent ea0cdfa commit fcbe350
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ read_globals = {
"WOW_PROJECT_CLASSIC",
"WOW_PROJECT_ID",
"WOW_PROJECT_MAINLINE",
"WOW_PROJECT_WRATH_CLASSIC",

-- Lua globals
"floor",
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Clicked/Core/Utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Clicked/Libs/LibTalentInfoClassic-1.0/TalentDataWOTLK.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fcbe350

Please sign in to comment.