diff --git a/.luarc.json b/.luarc.json index 34c8b4b..116a354 100644 --- a/.luarc.json +++ b/.luarc.json @@ -11,7 +11,8 @@ "return-type-mismatch" ], "diagnostics.globals": [ - "WOW_PROJECT_WRATH_CLASSIC", + "WOW_PROJECT_CLASSIC", + "WOW_PROJECT_CATACLYSM_CLASSIC", "BOOKTYPE_SPELL", "FriendColor", "HarmColor", diff --git a/LibRangeCheck-3.0/LibRangeCheck-3.0.lua b/LibRangeCheck-3.0/LibRangeCheck-3.0.lua index f23851a..9c8dd4b 100644 --- a/LibRangeCheck-3.0/LibRangeCheck-3.0.lua +++ b/LibRangeCheck-3.0/LibRangeCheck-3.0.lua @@ -49,6 +49,9 @@ if not lib then end local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE +local isEra = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC +local isCata = WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC + local InCombatLockdownRestriction = function(unit) return InCombatLockdown() and not UnitCanAttack("player", unit) end local _G = _G @@ -1674,11 +1677,11 @@ function lib:activate() frame:RegisterEvent("CHARACTER_POINTS_CHANGED") frame:RegisterEvent("SPELLS_CHANGED") - if isEra or isWrath then + if isEra or isCata then frame:RegisterEvent("CVAR_UPDATE") end - if isRetail or isWrath then + if isRetail or isCata then frame:RegisterEvent("PLAYER_TALENT_UPDATE") end