Quantcast

Added RECIPE_TO_SPELL_MAP - generated in reverse key/pair order from SPELL_TO_RECIPE_MAP.

James D. Callahan III [03-20-10 - 08:37]
Added RECIPE_TO_SPELL_MAP - generated in reverse key/pair order from SPELL_TO_RECIPE_MAP.
Filename
Datamine.lua
diff --git a/Datamine.lua b/Datamine.lua
index 54e6839..0eefdda 100644
--- a/Datamine.lua
+++ b/Datamine.lua
@@ -589,6 +589,13 @@ local SPELL_TO_RECIPE_MAP = {
 	[67144] = 47636,	[67147] = 47637,
 }

+local RECIPE_TO_SPELL_MAP = {}
+
+do
+	for spell_id, recipe_id in pairs(SPELL_TO_RECIPE_MAP) do
+		RECIPE_TO_SPELL_MAP[recipe_id] = spell_id
+	end
+end

 -------------------------------------------------------------------------------
 -- Look up table of spell IDs for recipes which do not have a player flag