Quantcast

Merge remote branch 'origin/master'

mike [03-08-11 - 17:17]
Merge remote branch 'origin/master'
Filename
Database/Alchemy.lua
Database/Blacksmithing.lua
Database/Cooking.lua
Database/Enchanting.lua
Database/Engineering.lua
Database/FirstAid.lua
Database/Inscription.lua
Database/Jewelcrafting.lua
Database/Leatherworking.lua
Database/Runeforging.lua
Database/Smelting.lua
Database/Tailoring.lua
core.lua
diff --git a/Database/Alchemy.lua b/Database/Alchemy.lua
index 9362e06..569f3ad 100644
--- a/Database/Alchemy.lua
+++ b/Database/Alchemy.lua
@@ -1538,5 +1538,4 @@ function addon:InitAlchemy()
 	recipe:AddTrainer(1386, 2132, 3009, 3184, 3347, 4160, 4611, 5177, 5499, 26951, 26975, 27023, 27029, 28703, 33588)

 	self.InitAlchemy = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Blacksmithing.lua b/Database/Blacksmithing.lua
index af3ad3b..e92c149 100644
--- a/Database/Blacksmithing.lua
+++ b/Database/Blacksmithing.lua
@@ -2924,5 +2924,4 @@ function addon:InitBlacksmithing()
 	recipe:AddVendor(50375, 50382)

 	self.InitBlacksmithing = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Cooking.lua b/Database/Cooking.lua
index 49bbc32..bd07b3b 100644
--- a/Database/Cooking.lua
+++ b/Database/Cooking.lua
@@ -1111,5 +1111,4 @@ function addon:InitCooking()
 	recipe:AddSeason(5)

 	self.InitCooking = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Enchanting.lua b/Database/Enchanting.lua
index a46e540..450dc5d 100644
--- a/Database/Enchanting.lua
+++ b/Database/Enchanting.lua
@@ -1808,5 +1808,4 @@ function addon:InitEnchanting()
 	recipe:AddWorldDrop("Deepholm", "Eastern Kingdoms", "Kalimdor")

 	self.InitEnchanting = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Engineering.lua b/Database/Engineering.lua
index e6393d5..17e6a99 100644
--- a/Database/Engineering.lua
+++ b/Database/Engineering.lua
@@ -1658,5 +1658,4 @@ function addon:InitEngineering()
 	recipe:AddTrainer(5518, 11017)

 	self.InitEngineering = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/FirstAid.lua b/Database/FirstAid.lua
index cd44d97..c19d4e3 100644
--- a/Database/FirstAid.lua
+++ b/Database/FirstAid.lua
@@ -149,5 +149,4 @@ function addon:InitFirstAid()
 	recipe:AddTrainer(2326, 2327, 2329, 2798, 3181, 4211, 4591, 5150, 5759, 5939, 5943, 6094, 16272, 16662, 16731, 17214, 17424, 18990, 18991, 19184, 19478, 22477, 23734, 26956, 26992, 28706, 29233, 33589, 33621, 45540, 49879, 50574)

 	self.InitFirstAid = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Inscription.lua b/Database/Inscription.lua
index 02b6700..e40d0a6 100644
--- a/Database/Inscription.lua
+++ b/Database/Inscription.lua
@@ -2375,5 +2375,4 @@ function addon:InitInscription()
 	recipe:AddTrainer(28702, 30706, 30711, 30713, 30715, 30717, 46716)

 	self.InitInscription = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Jewelcrafting.lua b/Database/Jewelcrafting.lua
index 85759e7..f771cd1 100644
--- a/Database/Jewelcrafting.lua
+++ b/Database/Jewelcrafting.lua
@@ -3010,5 +3010,4 @@ function addon:InitJewelcrafting()
 	recipe:AddWorldDrop("Deepholm", "Eastern Kingdoms", "Kalimdor")

 	self.InitJewelcrafting = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Leatherworking.lua b/Database/Leatherworking.lua
index 66b4e27..99c60d2 100644
--- a/Database/Leatherworking.lua
+++ b/Database/Leatherworking.lua
@@ -3063,6 +3063,5 @@ function addon:InitLeatherworking()
 	recipe:AddTrainer(3007, 3365, 3967, 4212, 4588, 5127, 5564, 26998, 28700, 29507, 33581)

 	self.InitLeatherworking = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end

diff --git a/Database/Runeforging.lua b/Database/Runeforging.lua
index e0ae0d2..afa8087 100644
--- a/Database/Runeforging.lua
+++ b/Database/Runeforging.lua
@@ -92,5 +92,4 @@ function addon:InitRuneforging()
 	recipe:AddTrainer(29194, 29195, 29196, 31084)

 	self.InitRuneforging = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Smelting.lua b/Database/Smelting.lua
index a669d12..a78e0b8 100644
--- a/Database/Smelting.lua
+++ b/Database/Smelting.lua
@@ -191,5 +191,4 @@ function addon:InitSmelting()
 	recipe:AddTrainer(3357, 4254, 5513, 16663)

 	self.InitSmelting = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/Database/Tailoring.lua b/Database/Tailoring.lua
index 57a60c7..060c5f8 100644
--- a/Database/Tailoring.lua
+++ b/Database/Tailoring.lua
@@ -2416,5 +2416,4 @@ function addon:InitTailoring()
 	recipe:AddTrainer(1346, 3363, 4159, 4576, 5153, 9584, 16640, 28699, 33613, 44783, 45559)

 	self.InitTailoring = nil
-	private.profession_init_funcs[recipe.profession] = nil
 end
diff --git a/core.lua b/core.lua
index fdb6ac0..1bba3f5 100644
--- a/core.lua
+++ b/core.lua
@@ -72,7 +72,7 @@ private.acquire_list	= {}
 ------------------------------------------------------------------------------
 -- Constants.
 ------------------------------------------------------------------------------
-private.profession_init_funcs = {}
+local PROFESSION_INIT_FUNCS = {}

 ------------------------------------------------------------------------------
 -- Database tables
@@ -533,18 +533,18 @@ function addon:OnInitialize()
 	-------------------------------------------------------------------------------
 	-- Populate the profession initialization functions.
 	-------------------------------------------------------------------------------
-	private.profession_init_funcs[_G.GetSpellInfo(51304)] = addon.InitAlchemy
-	private.profession_init_funcs[_G.GetSpellInfo(51300)] = addon.InitBlacksmithing
-	private.profession_init_funcs[_G.GetSpellInfo(51296)] = addon.InitCooking
-	private.profession_init_funcs[_G.GetSpellInfo(51313)] = addon.InitEnchanting
-	private.profession_init_funcs[_G.GetSpellInfo(51306)] = addon.InitEngineering
-	private.profession_init_funcs[_G.GetSpellInfo(45542)] = addon.InitFirstAid
-	private.profession_init_funcs[_G.GetSpellInfo(51302)] = addon.InitLeatherworking
-	private.profession_init_funcs[_G.GetSpellInfo(32606)] = addon.InitSmelting
-	private.profession_init_funcs[_G.GetSpellInfo(51309)] = addon.InitTailoring
-	private.profession_init_funcs[_G.GetSpellInfo(51311)] = addon.InitJewelcrafting
-	private.profession_init_funcs[_G.GetSpellInfo(45363)] = addon.InitInscription
-	private.profession_init_funcs[private.runeforging_name] = addon.InitRuneforging
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(51304)] = addon.InitAlchemy
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(51300)] = addon.InitBlacksmithing
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(51296)] = addon.InitCooking
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(51313)] = addon.InitEnchanting
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(51306)] = addon.InitEngineering
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(45542)] = addon.InitFirstAid
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(51302)] = addon.InitLeatherworking
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(32606)] = addon.InitSmelting
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(51309)] = addon.InitTailoring
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(51311)] = addon.InitJewelcrafting
+	PROFESSION_INIT_FUNCS[_G.GetSpellInfo(45363)] = addon.InitInscription
+	PROFESSION_INIT_FUNCS[private.runeforging_name] = addon.InitRuneforging

 	-------------------------------------------------------------------------------
 	-- Hook GameTooltip so we can show information on mobs that drop/sell/train
@@ -907,10 +907,11 @@ function addon:InitializeProfession(profession)
 	if profession == private.professions["Smelting"] then
 		profession = private.mining_name
 	end
-	local func = private.profession_init_funcs[profession]
+	local func = PROFESSION_INIT_FUNCS[profession]

 	if func then
 		func(addon)
+		private.profession_init_funcs[profession] = nil
 	end
 end