From 3905f865e2077e066530e54492160573695f6576 Mon Sep 17 00:00:00 2001 From: EsreverWoW <49285632+EsreverWoW@users.noreply.github.com> Date: Sun, 28 Aug 2022 19:16:10 -0500 Subject: [PATCH] Move project ID checks to PallyPower.lua --- PallyPower.lua | 4 ++++ PallyPowerValues.lua | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PallyPower.lua b/PallyPower.lua index b2ae71f..79d67a9 100644 --- a/PallyPower.lua +++ b/PallyPower.lua @@ -1,5 +1,9 @@ PallyPower = LibStub("AceAddon-3.0"):NewAddon("PallyPower", "AceConsole-3.0", "AceEvent-3.0", "AceBucket-3.0", "AceTimer-3.0") +PallyPower.isVanilla = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC) +PallyPower.isBCC = ((_G.WOW_PROJECT_ID == _G.WOW_PROJECT_BURNING_CRUSADE_CLASSIC) and select(4, GetBuildInfo()) < 30000) +PallyPower.isWrath = (select(4, GetBuildInfo()) >= 30400 and select(4, GetBuildInfo()) < 40000) -- TODO: Change when there is a project ID + local L = LibStub("AceLocale-3.0"):GetLocale("PallyPower") local LSM3 = LibStub("LibSharedMedia-3.0") local AceGUI = LibStub("AceGUI-3.0") diff --git a/PallyPowerValues.lua b/PallyPowerValues.lua index e55149a..28c2865 100644 --- a/PallyPowerValues.lua +++ b/PallyPowerValues.lua @@ -3,9 +3,6 @@ local L = LibStub("AceLocale-3.0"):GetLocale("PallyPower") PallyPower.commPrefix = "PLPWR" C_ChatInfo.RegisterAddonMessagePrefix(PallyPower.commPrefix) -PallyPower.isVanilla = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC) -PallyPower.isBCC = ((_G.WOW_PROJECT_ID == _G.WOW_PROJECT_BURNING_CRUSADE_CLASSIC) and select(4, GetBuildInfo()) < 30000) -PallyPower.isWrath = (select(4, GetBuildInfo()) >= 30400 and select(4, GetBuildInfo()) < 40000) -- TODO: Change when there is a project ID PallyPower.petsShareBaseClass = PallyPower.isBCC or PallyPower.isWrath PALLYPOWER_MAXCLASSES = PallyPower.isWrath and 10 or 9