From 3e16c4c04993d3067455843474841e64c865a6b4 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Mon, 29 Mar 2010 21:03:15 -0400 Subject: [PATCH] Added private.mining_name for the Smelting kludge. --- Constants.lua | 3 +++ Frame.lua | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Constants.lua b/Constants.lua index deb13f4..299b93d 100644 --- a/Constants.lua +++ b/Constants.lua @@ -29,6 +29,7 @@ local private = select(2, ...) ------------------------------------------------------------------------------- -- Profession data. +------------------------------------------------------------------------------- private.professions = { ["Alchemy"] = GetSpellInfo(51304), ["Blacksmithing"] = GetSpellInfo(51300), @@ -44,6 +45,8 @@ private.professions = { ["Tailoring"] = GetSpellInfo(51309), } +private.mining_name = GetSpellInfo(32606) + private.ordered_professions = { private.professions.Alchemy, -- 1 private.professions.Blacksmithing, -- 2 diff --git a/Frame.lua b/Frame.lua index ab89142..f0eee16 100644 --- a/Frame.lua +++ b/Frame.lua @@ -1014,12 +1014,11 @@ function MainPanel:ToggleState() end do - local MINING_SPELL = GetSpellInfo(32606) function MainPanel:SetProfession() local prev_profession = self.profession - if Player.current_prof == MINING_SPELL then + if Player.current_prof == private.mining_name then self.profession = 11 -- Smelting else for k, v in pairs(SORTED_PROFESSIONS) do -- 1.7.9.5