From cf60072f89d57301018ae82ffc64d58753b3b298 Mon Sep 17 00:00:00 2001 From: Antonio Lobato Date: Wed, 11 Jan 2023 22:53:18 -0800 Subject: [PATCH] Small fix for Classic and Wrath. --- core/Constants.lua | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/core/Constants.lua b/core/Constants.lua index 8cfa9bd..845394a 100644 --- a/core/Constants.lua +++ b/core/Constants.lua @@ -81,16 +81,21 @@ end -- Expansion names addon.EXPANSION_MAP = { [_G.LE_EXPANSION_CLASSIC] = _G.EXPANSION_NAME0, - [_G.LE_EXPANSION_BURNING_CRUSADE] = _G.EXPANSION_NAME1, - [_G.LE_EXPANSION_WRATH_OF_THE_LICH_KING] = _G.EXPANSION_NAME2, - [_G.LE_EXPANSION_CATACLYSM] = _G.EXPANSION_NAME3, - [_G.LE_EXPANSION_MISTS_OF_PANDARIA] = _G.EXPANSION_NAME4, - [_G.LE_EXPANSION_WARLORDS_OF_DRAENOR] = _G.EXPANSION_NAME5, - [_G.LE_EXPANSION_LEGION] = _G.EXPANSION_NAME6, - [_G.LE_EXPANSION_BATTLE_FOR_AZEROTH] = _G.EXPANSION_NAME7, - [_G.LE_EXPANSION_SHADOWLANDS] = _G.EXPANSION_NAME8, - [_G.LE_EXPANSION_DRAGONFLIGHT] = _G.EXPANSION_NAME9, + [_G.LE_EXPANSION_BURNING_CRUSADE] = _G.EXPANSION_NAME1 } +if addon.isRetail or addon.isWrath then + addon.EXPANSION_MAP[_G.LE_EXPANSION_WRATH_OF_THE_LICH_KING] = _G.EXPANSION_NAME2 + addon.EXPANSION_MAP[_G.LE_EXPANSION_CATACLYSM] = _G.EXPANSION_NAME3 + addon.EXPANSION_MAP[_G.LE_EXPANSION_MISTS_OF_PANDARIA] = _G.EXPANSION_NAME4 + addon.EXPANSION_MAP[_G.LE_EXPANSION_WARLORDS_OF_DRAENOR] = _G.EXPANSION_NAME5 + addon.EXPANSION_MAP[_G.LE_EXPANSION_LEGION] = _G.EXPANSION_NAME6 + addon.EXPANSION_MAP[_G.LE_EXPANSION_BATTLE_FOR_AZEROTH] = _G.EXPANSION_NAME7 + addon.EXPANSION_MAP[_G.LE_EXPANSION_SHADOWLANDS] = _G.EXPANSION_NAME8 +end + +if addon.isRetail then + addon.EXPANSION_MAP[_G.LE_EXPANSION_DRAGONFLIGHT] = _G.EXPANSION_NAME9 +end -- Tradeskill subclassID -> subclassName -- Note that this differs from what GetItemSubClassInfo returns (in comments); non-retail client returns aren't obsoleted.