view data.lua @ 8:17844b0b88c1

Finish disabling the reagent's reagent tooltip, and fill some data about prospection (unfinished)
author contrebasse
date Sat, 02 Apr 2011 22:11:51 +0200
parents ed0582126cae
children 70f7d02c2cec
line wrap: on
line source
local addonName, A = ...

MillID = 51005
macroMill = "/cast "..GetSpellInfo(MillID).."\n/use "
ProspectID = 31252
macroProspect = "/cast "..GetSpellInfo(ProspectID).."\n/use "
A.data = {
	-- Mill
	[39151] = { -- Alabaster Pigment
		spell = macroMill,
		spellID = MillID,
		{2447,5}, -- Peacebloom
		{765,5},  -- Silverleaf
		{2449,5}}, -- Earthroot
	[39224] = { -- Dusky Pigment
		spell = macroMill,
		spellID = MillID,
		{785,5},  -- Mageroyal
		{2450,5}, -- Briarthorn
		{2452,5}, -- Swiftthistle
		{2453,5}, -- Bruiseweed
		{3820,5}}, -- Stranglekelp
	[39338] = { -- Golden Pigment
		spell = macroMill,
		spellID = MillID,
		{3369,5}, -- Grave Moss
		{3355,5}, -- Wild Steelbloom
		{3356,5}, -- Kingsblood
		{3357,5}}, -- Liferoot
	[39339] = { -- Emerald Pigment
		spell = macroMill,
		spellID = MillID,
		{3818,5}, -- Fadeleaf
		{3821,5}, -- Goldthorn
		{3358,5}, -- Khadgar's Whisker
		{3819,5}}, -- Dragon's Teeth
	[39340] = { -- Violet Pigment
		spell = macroMill,
		spellID = MillID,
		{4625,5}, -- Firebloom
		{8831,5}, -- Purple Lotus
		{8836,5}, -- Arthas' Tears
		{8838,5}, -- Sungrass
		{8839,5}, -- Blindweed
		{8845,5}, -- Ghost Mushroom
		{8846,5}}, -- Gromsblood
	[39341] = { -- Silvery Pigment
		spell = macroMill,
		spellID = MillID,
		{13464,5}, -- Golden Sansam
		{13463,5}, -- Dreamfoil
		{13465,5}, -- Mountain Silversage
		{13466,5}, -- Sorrowmoss
		{13467,5}}, -- Icecap
	[39342] = { -- Nether Pigment
		spell = macroMill,
		spellID = MillID,
		{22786,5}, -- Dreaming Glory
		{22785,5}, -- Felweed
		{22789,5}, -- Terocone
		{22787,5}, -- Ragveil
		{22790,5}, -- Ancient Lichen
		{22793,5}, -- Mana Thistle
		{22791,5}, -- Netherbloom
		{22792,5}}, -- Nightmare Vine
	[39343] = { -- Azure Pigment
		spellID = MillID,
		spell = macroMill,
		{37921,5}, -- Deadnettle
		{36901,5}, -- Goldclover
		{36907,5}, -- Talandra's Rose
		{36904,5}, -- Tiger Lily
		{39970,5}, -- Fire Leaf
		{39969,5}, -- Fire Seed
		{36903,5}, -- Fire Seed
		{36906,5}, -- Icethorn
		{36905,5}}, -- Icethorn
	[61979] = { -- Ashen Pigment
		spell = macroMill,
		spellID = MillID,
		{52983,5}, -- Cinderbloom
		{52985,5}, -- Azshara's Veil
		{52984,5}, -- Stormvine
		{52986,5}, -- Heartblossom
		{52988,5}, -- Whiptail
		{52987,5}}, -- Twilight Jasmine

	-- Prospect
	[774] = { -- Malachite
		spell = macroMill,
		spellID = MillID,
		{2770,5,0.5}}, -- Copper Ore
	[818] = { -- Tigerseye
		spell = macroMill,
		spellID = MillID,
		{2770,5,0.5}}, -- Copper Ore
	[1210] = { -- Shadowgem
		spell = macroMill,
		spellID = MillID,
		{2771,50.38}, -- Tin Ore
		{2770,5,0.1}}, -- Copper Ore
	[1705] = { -- Lesser Moonstone
		spell = macroMill,
		spellID = MillID,
		{2771,5,0.38}, -- Tin Ore
		{2772,5,0.35}}, -- Iron Ore
	[1206] = { -- Moss Agate
		spell = macroMill,
		spellID = MillID,
		{2771,5,0.37}}, -- Tin Ore
	[1529] = { -- Jade
		spell = macroMill,
		spellID = MillID,
		{2772,5,0.35}, -- Iron Ore
		{2771,5,0.03}}, -- Tin Ore
	[7909] = { -- Aquamarine
		spell = macroMill,
		spellID = MillID,
		{3858,5,0.35}, -- Mithril Ore
		{2772,5,0.05}, -- Iron Ore
		{2771,5,0.03}}, -- Tin Ore
	[3864] = { -- Citrine
		spell = macroMill,
		spellID = MillID,
		{2772,5,0.36}, -- Iron Ore
		{3858,5,0.35}, -- Mithril Ore
		{2771,5,0.03}}, -- Tin Ore
	[7910] = { -- Star Ruby
		spell = macroMill,
		spellID = MillID,
		{3858,5,0.36}, -- Mithril Ore
		{10620,5,0.15}, -- Thorium Ore
		{2772,5,0.05}}, -- Iron Ore
	[12799] = { -- Large Opal
		spell = macroMill,
		spellID = MillID,
		{10620,5,0.31}, -- Thorium Ore
		{3858,5,0.03}}, -- Mithril Ore
	[12361] = { -- Blue Sapphire
		spell = macroMill,
		spellID = MillID,
		{10620,5,0.31}, -- Thorium Ore
		{3858,5,0.02}}, -- Mithril Ore
	[12800] = { -- Azerothian Diamond
		spell = macroMill,
		spellID = MillID,
		{10620,5,0.31}, -- Thorium Ore
		{3858,5,0.02}}, -- Mithril Ore
	[12364] = { -- Huge Emerald
		spell = macroMill,
		spellID = MillID,
		{10620,5,0.31}, -- Thorium Ore
		{3858,5,0.02}}, -- Mithril Ore
	[23112] = { -- Golden Draenite
		spell = macroMill,
		spellID = MillID,
		{23424,5,0.19}, -- Fel Iron Ore
		{23425,5,0.18}}, -- Adamantite Ore
	-- To be continued...


	-- To add : enchants, elementals, prospecting
}
A.data[43103] = A.data[39224] -- Verdant Pigment
A.data[43104] = A.data[39338] -- Burnt Pigment
A.data[43105] = A.data[39339] -- Indigo Pigment
A.data[43106] = A.data[39340] -- Ruby Pigment
A.data[43107] = A.data[39341] -- Sapphire Pigment
A.data[43108] = A.data[39342] -- Ebon Pigment
A.data[43109] = A.data[39343] -- Icy Pigment
A.data[61980] = A.data[61979] -- Burning Embers


-- @todo improve scanning
-- @todo rescan when a new refipe appears (TRADESKILL_UPDATE ?)
-- @todo be sure that skillName is unique, or use something else
-- @todo add support for multi-reagents recipes
function A:ScanSimpleRecipes()
	for i = 1,GetNumTradeSkills() do
		local skillName, skillType, numAvailable, isExpanded, serviceType, numSkillUps = GetTradeSkillInfo(i)
		if skillType ~= "header" then
			if GetTradeSkillNumReagents(i) == 1 then
				-- item ID
				local itemID = A.link2ID(GetTradeSkillItemLink(i))

				-- reagent ID
				local reagentID = A.link2ID(GetTradeSkillReagentItemLink(i, 1))

				-- reagent number needed
				local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(i, 1)

				-- skillName or...???
				if not reagentID or not reagentCount or not skillName or not itemID then
					A.DEBUG("Erreur de scan :")
					print(itemID," ",skillName," ",reagentID," ",reagentCount)
				end

				if not A.data[itemID] then
					A.data[itemID] = {{reagentID,reagentCount}}
				end
			end -- if
		end -- if
	end -- for

end