Mercurial > wow > reagentmaker
view data.lua @ 0:eba26c900e99
Initial commit, save state before using secure menus
author | contrebasse |
---|---|
date | Mon, 28 Mar 2011 22:32:26 +0200 |
parents | |
children | ed0582126cae |
line wrap: on
line source
local addonName, A = ... A.Mill = "/use "..GetSpellInfo(51005) A.data = { -- Mill [39151] = { -- Alabaster Pigment {2447,5, spell = A.Mill}, -- Peacebloom {765,5, spell = A.Mill}, -- Silverleaf {2449,5, spell = A.Mill}}, -- Earthroot [39224] = { -- Dusky Pigment {785,5, spell = A.Mill}, -- Mageroyal {2450,5, spell = A.Mill}, -- Briarthorn {2452,5, spell = A.Mill}, -- Swiftthistle {2453,5, spell = A.Mill}, -- Bruiseweed {3820,5, spell = A.Mill}}, -- Stranglekelp [39338] = { -- Golden Pigment {3369,5, spell = A.Mill}, -- Grave Moss {3355,5, spell = A.Mill}, -- Wild Steelbloom {3356,5, spell = A.Mill}, -- Kingsblood {3357,5, spell = A.Mill}}, -- Liferoot [39339] = { -- Emerald Pigment {3818,5, spell = A.Mill}, -- Fadeleaf {3821,5, spell = A.Mill}, -- Goldthorn {3358,5, spell = A.Mill}, -- Khadgar's Whisker {3819,5, spell = A.Mill}}, -- Dragon's Teeth [39340] = { -- Violet Pigment {4625,5, spell = A.Mill}, -- Firebloom {8831,5, spell = A.Mill}, -- Purple Lotus {8836,5, spell = A.Mill}, -- Arthas' Tears {8838,5, spell = A.Mill}, -- Sungrass {8839,5, spell = A.Mill}, -- Blindweed {8845,5, spell = A.Mill}, -- Ghost Mushroom {8846,5, spell = A.Mill}}, -- Gromsblood [39341] = { -- Silvery Pigment {13464,5, spell = A.Mill}, -- Golden Sansam {13463,5, spell = A.Mill}, -- Dreamfoil {13465,5, spell = A.Mill}, -- Mountain Silversage {13466,5, spell = A.Mill}, -- Sorrowmoss {13467,5, spell = A.Mill}}, -- Icecap [39342] = { -- Nether Pigment {22786,5, spell = A.Mill}, -- Dreaming Glory {22785,5, spell = A.Mill}, -- Felweed {22789,5, spell = A.Mill}, -- Terocone {22787,5, spell = A.Mill}, -- Ragveil {22790,5, spell = A.Mill}, -- Ancient Lichen {22793,5, spell = A.Mill}, -- Mana Thistle {22791,5, spell = A.Mill}, -- Netherbloom {22792,5, spell = A.Mill}}, -- Nightmare Vine [39343] = { -- Azure Pigment {37921,5, spell = A.Mill}, -- Deadnettle {36901,5, spell = A.Mill}, -- Goldclover {36907,5, spell = A.Mill}, -- Talandra's Rose {36904,5, spell = A.Mill}, -- Tiger Lily {39970,5, spell = A.Mill}, -- Fire Leaf {39969,5, spell = A.Mill}, -- Fire Seed {36903,5, spell = A.Mill}, -- Fire Seed {36906,5, spell = A.Mill}, -- Icethorn {36905,5, spell = A.Mill}}, -- Icethorn [61979] = { -- Ashen Pigment {52983,5, spell = A.Mill}, -- Cinderbloom {52985,5, spell = A.Mill}, -- Azshara's Veil {52984,5, spell = A.Mill}, -- Stormvine {52986,5, spell = A.Mill}, -- Heartblossom {52988,5, spell = A.Mill}, -- Whiptail {52987,5, spell = A.Mill}}, -- Twilight Jasmine -- To add : pigments, enchants, elementals } 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 local sfind = string.find 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 link = GetTradeSkillReagentItemLink(i, 1) local reagentID = A.link2ID(link) -- 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] or not A.data[itemID][skillName] then A.data[itemID] = {[skillName] = {reagentID,reagentCount}} end else end -- if end -- if end -- for end