This commit is contained in:
Andrew6810
2022-11-05 21:19:42 -07:00
parent b79f4bd588
commit f3e579cb57
386 changed files with 93729 additions and 2 deletions
+155
View File
@@ -0,0 +1,155 @@
-- ------------------------------------------------------------------------------ --
-- TradeSkillMaster_Crafting --
-- http://www.curse.com/addons/wow/tradeskillmaster_crafting --
-- --
-- A TradeSkillMaster Addon (http://tradeskillmaster.com) --
-- All Rights Reserved* - Detailed license information included with addon. --
-- ------------------------------------------------------------------------------ --
-- load the parent file (TSM) into a local variable and register this file as a module
local TSM = select(2, ...)
local Cost = TSM:NewModule("Cost", "AceEvent-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_Crafting") -- loads the localization table
local currentVisited = {}
local cache = { time = 0 }
function Cost:GetMatCost(itemString)
local mat = TSM.db.factionrealm.mats[itemString]
if not mat then return end
if cache.time < (time() - 1) then
cache = {}
cache.time = time()
end
if cache[itemString] then return cache[itemString] end
if currentVisited[itemString] then return end
currentVisited[itemString] = true
local cost = TSM:GetCustomPrice(mat.customValue or TSM.db.global.defaultMatCostMethod, itemString)
currentVisited[itemString] = nil
cache[itemString] = cost
return cost
end
-- gets the value of a crafted item
function Cost:GetCraftValue(itemString)
if type(itemString) == "number" then
-- we got passed a spell
if not TSM.db.factionrealm.crafts[itemString] then return end
itemString = TSM.db.factionrealm.crafts[itemString].itemID
end
if type(itemString) ~= "string" then return end
local operation = TSMAPI:GetItemOperation(itemString, "Crafting")
TSMAPI:UpdateOperation("Crafting", operation and operation[1])
operation = operation and TSM.operations[operation[1]]
local priceMethod = operation and operation.craftPriceMethod or TSM.db.global.defaultCraftPriceMethod
return TSM:GetCustomPrice(priceMethod, itemString)
end
-- gets the cost to create this craft
function Cost:GetCraftCost(itemID)
local spellIDs
if type(itemID) == "string" then
-- we got passed an item
spellIDs = TSM.craftReverseLookup[TSMAPI:GetBaseItemstring(itemID)]
elseif type(itemID) == "number" then
-- we got passed a spell
if TSM.db.factionrealm.crafts[itemID] then
spellIDs = { itemID }
end
end
if not spellIDs or #spellIDs == 0 then return end
local lowestCost
for _, spellID in ipairs(spellIDs) do
local craft = TSM.db.factionrealm.crafts[spellID]
local cost, costIsValid = 0, true
if #spellIDs >= 2 and TSM.db.global.ignoreCDCraftCost and TSM.db.factionrealm.crafts[spellID].hasCD then
costIsValid = false
end
for matID, matQuantity in pairs(craft.mats) do
local MatName = GetItemInfo(matID)
-- if MatName ~= nil and strfind(MatName, "Vellum") then
-- local NewItemString = CheapestVellum(matID)
-- if matID ~= NewItemString then
-- matID = NewItemString
-- end
-- end
local matCost = Cost:GetMatCost(matID)
if not matCost or matCost == 0 then
costIsValid = false
break
end
cost = cost + matQuantity * matCost
end
cost = floor(cost / (craft.numResult) + 0.5) --rounds to nearest gold
if costIsValid then
if not lowestCost or cost < lowestCost then
lowestCost = cost
end
end
end
return lowestCost
end
-- calulates the cost, buyout, and profit for a crafted item
function Cost:GetCraftPrices(itemID)
if not itemID then return end
local cost, buyout, profit
cost = Cost:GetCraftCost(itemID)
buyout = Cost:GetCraftValue(itemID)
if cost and buyout then
profit = floor(buyout - buyout * TSM.db.global.profitPercent - cost + 0.5)
end
return cost, buyout, profit
end
-- gets the spellID, cost, buyout, and profit for the cheapest way to craft the given item
function Cost:GetLowestCraftPrices(itemString, intermediate)
local spellIDs = TSM.craftReverseLookup[itemString]
if not spellIDs then return end
local lowestCost, cheapestSpellID
local soh = "item:76061:0:0:0:0:0:0" -- Spirit of Harmony
for _, spellID in ipairs(spellIDs) do
if TSM.db.factionrealm.crafts[spellID] then
if intermediate and (TSM.db.factionrealm.crafts[spellID].mats[soh] or TSM.db.factionrealm.crafts[spellID].hasCD) then
break
end --exclude spells using SOH or have cooldown from intermediate crafts
local cost = Cost:GetCraftCost(spellID)
if cost and (not lowestCost or cost < lowestCost) then
-- exclude spells with cooldown if option to ignore is enabled or more than one way to craft and not soulbound e.g. BoE
if not TSM.db.global.ignoreCDCraftCost then
if TSM.db.factionrealm.crafts[spellID].hasCD then
if TSMAPI.SOULBOUND_MATS[itemString] or #spellIDs == 1 then
lowestCost = cost
cheapestSpellID = spellID
end
else
lowestCost = cost
cheapestSpellID = spellID
end
elseif not TSM.db.factionrealm.crafts[spellID].hasCD then
lowestCost = cost
cheapestSpellID = spellID
end
end
end
end
if not lowestCost or not cheapestSpellID then return end
local profit, buyout
buyout = Cost:GetCraftValue(itemString)
if buyout then
profit = floor(buyout - buyout * TSM.db.global.profitPercent - lowestCost + 0.5)
end
return cheapestSpellID, lowestCost, buyout, profit
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,625 @@
-- ------------------------------------------------------------------------------ --
-- TradeSkillMaster_Crafting --
-- http://www.curse.com/addons/wow/tradeskillmaster_crafting --
-- --
-- A TradeSkillMaster Addon (http://tradeskillmaster.com) --
-- All Rights Reserved* - Detailed license information included with addon. --
-- ------------------------------------------------------------------------------ --
-- load the parent file (TSM) into a local variable
local TSM = select(2, ...)
TSM.enchantingName = GetSpellInfo(7411)
-- looks up the itemID of the scroll that the enchant makes
-- index = spellID of the enchant
-- value = itemID of scroll
-- Enchant List:
-- WRATH
-- [44506] = 38960, -- Enchant Gloves - Gatherer
-- [44484] = 38951, -- Enchant Gloves - Expertise
-- [44488] = 38953, -- Enchant Gloves - Precision
-- [44489] = 38954, -- Enchant Shield - Dodge
-- [44492] = 38955, -- Enchant Chest - Mighty Health
-- [44500] = 38959, -- Enchant Cloak - Superior Agility
-- [44508] = 38961, -- Enchant Boots - Greater Spirit
-- [44509] = 38962, -- Enchant Chest - Greater Mana Restoration
-- [44513] = 38964, -- Enchant Gloves - Greater Assault
-- [44528] = 38966, -- Enchant Boots - Greater Fortitude
-- [44529] = 38967, -- Enchant Gloves - Major Agility
-- [44555] = 38968, -- Enchant Bracer - Exceptional Intellect
-- [44582] = 38973, -- Enchant Cloak - Minor Power
-- [44584] = 38974, -- Enchant Boots - Greater Vitality
-- [44588] = 38975, -- Enchant Chest - Exceptional Resilience
-- [44589] = 38976, -- Enchant Boots - Superior Agility
-- [44591] = 38978, -- Enchant Cloak - Superior Dodge
-- [44592] = 38979, -- Enchant Gloves - Exceptional Spellpower
-- [44593] = 38980, -- Enchant Bracer - Major Spirit
-- [44598] = 38984, -- Enchant Bracer - Expertise
-- [44616] = 38987, -- Enchant Bracer - Greater Stats
-- [44623] = 38989, -- Enchant Chest - Super Stats
-- [44625] = 38990, -- Enchant Gloves - Armsman
-- [44631] = 38993, -- Enchant Cloak - Shadow Armor
-- [44635] = 38997, -- Enchant Bracer - Greater Spellpower
-- [44575] = 44815, -- Enchant Bracer - Greater Assault
-- [44510] = 38963, -- Enchant Weapon - Exceptional Spirit
-- [44524] = 38965, -- Enchant Weapon - Icebreaker
-- [44576] = 38972, -- Enchant Weapon - Lifeward
-- [44595] = 38981, -- Enchant 2H Weapon - Scourgebane
-- [44621] = 38988, -- Enchant Weapon - Giant Slayer
-- [44629] = 38991, -- Enchant Weapon - Exceptional Spellpower
-- [44630] = 38992, -- Enchant 2H Weapon - Greater Savagery
-- [44633] = 38995, -- Enchant Weapon - Exceptional Agility
-- [44383] = 38949, -- Enchant Shield - Resilience
-- [46594] = 38999, -- Enchant Chest - Dodge
-- [46578] = 38998, -- Enchant Weapon - Deathfrost
-- [47051] = 39000, -- Enchant Cloak - Greater Dodge
-- [47672] = 39001, -- Enchant Cloak - Mighty Stamina
-- [47766] = 39002, -- Enchant Chest - Greater Dodge
-- [47898] = 39003, -- Enchant Cloak - Greater Speed
-- [47899] = 39004, -- Enchant Cloak - Wisdom
-- [47900] = 39005, -- Enchant Chest - Super Health
-- [47901] = 39006, -- Enchant Boots - Tuskarr's Vitality
-- [59625] = 43987, -- Enchant Weapon - Black Magic
-- [59621] = 44493, -- Enchant Weapon - Berserking
-- [59619] = 44497, -- Enchant Weapon - Accuracy
-- [60616] = 38971, -- Enchant Bracer - Assault
-- [60623] = 38986, -- Enchant Boots - Icewalker
-- [60606] = 44449, -- Enchant Boots - Assault
-- [60609] = 44456, -- Enchant Cloak - Speed
-- [60663] = 44457, -- Enchant Cloak - Major Agility
-- [60668] = 44458, -- Enchant Gloves - Crusher
-- [60692] = 44465, -- Enchant Chest - Powerful Stats
-- [60763] = 44469, -- Enchant Boots - Greater Assault
-- [60767] = 44470, -- Enchant Bracer - Superior Spellpower
-- [60621] = 44453, -- Enchant Weapon - Greater Potency
-- [60691] = 44463, -- Enchant 2H Weapon - Massacre
-- [60707] = 44466, -- Enchant Weapon - Superior Potency
-- [60714] = 44467, -- Enchant Weapon - Mighty Spellpower
-- [62256] = 44947, -- Enchant Bracer - Major Stamina
-- [62948] = 45056, -- Enchant Staff - Greater Spellpower
-- [62959] = 45060, -- Enchant Staff - Spellpower
-- [63746] = 45628, -- Enchant Boots - Lesser Accuracy
-- [64441] = 46026, -- Enchant Weapon - Blade Ward
-- [64579] = 46098, -- Enchant Weapon - Blood Draining
-- [71692] = 50816, -- Enchant Gloves - Angler
-- TBC
-- [33990] = 38928, -- Enchant Chest - Major Spirit
-- [33991] = 38929, -- Enchant Chest - Restore Mana Prime
-- [33992] = 38930, -- Enchant Chest - Major Resilience
-- [33993] = 38931, -- Enchant Gloves - Blasting
-- [33994] = 38932, -- Enchant Gloves - Precise Strikes
-- [33995] = 38933, -- Enchant Gloves - Major Strength
-- [33996] = 38934, -- Enchant Gloves - Assault
-- [33997] = 38935, -- Enchant Gloves - Major Spellpower
-- [33999] = 38936, -- Enchant Gloves - Major Healing
-- [34001] = 38937, -- Enchant Bracer - Major Intellect
-- [34002] = 38938, -- Enchant Bracer - Lesser Assault
-- [34003] = 38939, -- Enchant Cloak - Spell Penetration
-- [34004] = 38940, -- Enchant Cloak - Greater Agility
-- [34007] = 38943, -- Enchant Boots - Cat's Swiftness
-- [34008] = 38944, -- Enchant Boots - Boar's Speed
-- [34009] = 38945, -- Enchant Shield - Major Stamina
-- [34010] = 38946, -- Enchant Weapon - Major Healing
-- [42974] = 38948, -- Enchant Weapon - Executioner
-- [42620] = 38947, -- Enchant Weapon - Greater Agility
-- VANILLA
-- [7745] = 38772, -- Enchant 2H Weapon - Minor Impact
-- [7786] = 38779, -- Enchant Weapon - Minor Beastslayer
-- [7788] = 38780, -- Enchant Weapon - Minor Striking
-- [7793] = 38781, -- Enchant 2H Weapon - Lesser Intellect
-- [7418] = 38679, -- Enchant Bracer - Minor Health
-- [7420] = 38766, -- Enchant Chest - Minor Health
-- [7426] = 38767, -- Enchant Chest - Minor Absorption
-- [7428] = 38768, -- Enchant Bracer - Minor Dodge
-- [7443] = 38769, -- Enchant Chest - Minor Mana
-- [7457] = 38771, -- Enchant Bracer - Minor Stamina
-- [7748] = 38773, -- Enchant Chest - Lesser Health
-- [7766] = 38774, -- Enchant Bracer - Minor Spirit
-- [7771] = 38775, -- Enchant Cloak - Minor Protection
-- [7776] = 38776, -- Enchant Chest - Lesser Mana
-- [7779] = 38777, -- Enchant Bracer - Minor Agility
-- [7782] = 38778, -- Enchant Bracer - Minor Strength
-- [7857] = 38782, -- Enchant Chest - Health
-- [7859] = 38783, -- Enchant Bracer - Lesser Spirit
-- [7863] = 38785, -- Enchant Boots - Minor Stamina
-- [7867] = 38786, -- Enchant Boots - Minor Agility
-- [13378] = 38787, -- Enchant Shield - Minor Stamina
-- [13419] = 38789, -- Enchant Cloak - Minor Agility
-- [13421] = 38790, -- Enchant Cloak - Lesser Protection
-- [13464] = 38791, -- Enchant Shield - Lesser Protection
-- [13485] = 38792, -- Enchant Shield - Lesser Spirit
-- [13501] = 38793, -- Enchant Bracer - Lesser Stamina
-- [13536] = 38797, -- Enchant Bracer - Lesser Strength
-- [13538] = 38798, -- Enchant Chest - Lesser Absorption
-- [13607] = 38799, -- Enchant Chest - Mana
-- [13612] = 38800, -- Enchant Gloves - Mining
-- [13617] = 38801, -- Enchant Gloves - Herbalism
-- [13620] = 38802, -- Enchant Gloves - Fishing
-- [13622] = 38803, -- Enchant Bracer - Lesser Intellect
-- [13626] = 38804, -- Enchant Chest - Minor Stats
-- [13631] = 38805, -- Enchant Shield - Lesser Stamina
-- [13635] = 38806, -- Enchant Cloak - Defense
-- [13637] = 38807, -- Enchant Boots - Lesser Agility
-- [13640] = 38808, -- Enchant Chest - Greater Health
-- [13642] = 38809, -- Enchant Bracer - Spirit
-- [13644] = 38810, -- Enchant Boots - Lesser Stamina
-- [13646] = 38811, -- Enchant Bracer - Lesser Dodge
-- [13648] = 38812, -- Enchant Bracer - Stamina
-- [13659] = 38816, -- Enchant Shield - Spirit
-- [13661] = 38817, -- Enchant Bracer - Strength
-- [13663] = 38818, -- Enchant Chest - Greater Mana
-- [13687] = 38819, -- Enchant Boots - Lesser Spirit
-- [13689] = 38820, -- Enchant Shield - Lesser Parry
-- [13698] = 38823, -- Enchant Gloves - Skinning
-- [13700] = 38824, -- Enchant Chest - Lesser Stats
-- [13746] = 38825, -- Enchant Cloak - Greater Defense
-- [13815] = 38827, -- Enchant Gloves - Agility
-- [13817] = 38828, -- Enchant Shield - Stamina
-- [13822] = 38829, -- Enchant Bracer - Intellect
-- [13836] = 38830, -- Enchant Boots - Stamina
-- [13841] = 38831, -- Enchant Gloves - Advanced Mining
-- [13846] = 38832, -- Enchant Bracer - Greater Spirit
-- [13858] = 38833, -- Enchant Chest - Superior Health
-- [13868] = 38834, -- Enchant Gloves - Advanced Herbalism
-- [13882] = 38835, -- Enchant Cloak - Lesser Agility
-- [13887] = 38836, -- Enchant Gloves - Strength
-- [13890] = 38837, -- Enchant Boots - Minor Speed
-- [13905] = 38839, -- Enchant Shield - Greater Spirit
-- [13917] = 38841, -- Enchant Chest - Superior Mana
-- [13931] = 38842, -- Enchant Bracer - Dodge
-- [13935] = 38844, -- Enchant Boots - Agility
-- [13939] = 38846, -- Enchant Bracer - Greater Strength
-- [13941] = 38847, -- Enchant Chest - Stats
-- [13945] = 38849, -- Enchant Bracer - Greater Stamina
-- [13947] = 38850, -- Enchant Gloves - Riding Skill
-- [13948] = 38851, -- Enchant Gloves - Minor Haste
-- [13380] = 38788, -- Enchant 2H Weapon - Lesser Spirit
-- [13503] = 38794, -- Enchant Weapon - Lesser Striking
-- [13529] = 38796, -- Enchant 2H Weapon - Lesser Impact
-- [13653] = 38813, -- Enchant Weapon - Lesser Beastslayer
-- [13655] = 38814, -- Enchant Weapon - Lesser Elemental Slayer
-- [13693] = 38821, -- Enchant Weapon - Striking
-- [13695] = 38822, -- Enchant 2H Weapon - Impact
-- [13898] = 38838, -- Enchant Weapon - Fiery Weapon
-- [13915] = 38840, -- Enchant Weapon - Demonslaying
-- [13937] = 38845, -- Enchant 2H Weapon - Greater Impact
-- [13943] = 38848, -- Enchant Weapon - Greater Striking
-- [20008] = 38852, -- Enchant Bracer - Greater Intellect
-- [20009] = 38853, -- Enchant Bracer - Superior Spirit
-- [20010] = 38854, -- Enchant Bracer - Superior Strength
-- [20011] = 38855, -- Enchant Bracer - Superior Stamina
-- [20012] = 38856, -- Enchant Gloves - Greater Agility
-- [20013] = 38857, -- Enchant Gloves - Greater Strength
-- [20015] = 38859, -- Enchant Cloak - Superior Defense
-- [20016] = 38860, -- Enchant Shield - Vitality
-- [20017] = 38861, -- Enchant Shield - Greater Stamina
-- [20020] = 38862, -- Enchant Boots - Greater Stamina
-- [20023] = 38863, -- Enchant Boots - Greater Agility
-- [20024] = 38864, -- Enchant Boots - Spirit
-- [20025] = 38865, -- Enchant Chest - Greater Stats
-- [20026] = 38866, -- Enchant Chest - Major Health
-- [20028] = 38867, -- Enchant Chest - Major Mana
-- [20029] = 38868, -- Enchant Weapon - Icy Chill
-- [20030] = 38869, -- Enchant 2H Weapon - Superior Impact
-- [20031] = 38870, -- Enchant Weapon - Superior Striking
-- [20032] = 38871, -- Enchant Weapon - Lifestealing
-- [20033] = 38872, -- Enchant Weapon - Unholy Weapon
-- [20034] = 38873, -- Enchant Weapon - Crusader
-- [20035] = 38874, -- Enchant 2H Weapon - Major Spirit
-- [20036] = 38875, -- Enchant 2H Weapon - Major Intellect
-- [21931] = 38876, -- Enchant Weapon - Winter's Might
-- [22749] = 38877, -- Enchant Weapon - Spellpower
-- [22750] = 38878, -- Enchant Weapon - Healing Power
-- [23799] = 38879, -- Enchant Weapon - Strength
-- [23800] = 38880, -- Enchant Weapon - Agility
-- [23803] = 38883, -- Enchant Weapon - Mighty Spirit
-- [23804] = 38884, -- Enchant Weapon - Mighty Intellect
-- [23801] = 38881, -- Enchant Bracer - Mana Regeneration
-- [23802] = 38882, -- Enchant Bracer - Healing Power
-- [25072] = 38885, -- Enchant Gloves - Threat
-- [25073] = 38886, -- Enchant Gloves - Shadow Power
-- [25074] = 38887, -- Enchant Gloves - Frost Power
-- [25078] = 38888, -- Enchant Gloves - Fire Power
-- [25079] = 38889, -- Enchant Gloves - Healing Power
-- [25080] = 38890, -- Enchant Gloves - Superior Agility
-- [25083] = 38893, -- Enchant Cloak - Stealth
-- [25084] = 38894, -- Enchant Cloak - Subtlety
-- [25086] = 38895, -- Enchant Cloak - Dodge
-- [27837] = 38896, -- Enchant 2H Weapon - Agility
-- [27951] = 37603, -- Enchant Boots - Dexterity
-- [27958] = 38912, -- Enchant Chest - Exceptional Mana
-- [27899] = 38897, -- Enchant Bracer - Brawn
-- [27905] = 38898, -- Enchant Bracer - Stats
-- [27906] = 38899, -- Enchant Bracer - Greater Dodge
-- [27911] = 38900, -- Enchant Bracer - Superior Healing
-- [27913] = 38901, -- Enchant Bracer - Restore Mana Prime
-- [27914] = 38902, -- Enchant Bracer - Fortitude
-- [27917] = 38903, -- Enchant Bracer - Spellpower
-- [27944] = 38904, -- Enchant Shield - Lesser Dodge
-- [27945] = 38905, -- Enchant Shield - Intellect
-- [27946] = 38906, -- Enchant Shield - Parry
-- [27948] = 38908, -- Enchant Boots - Vitality
-- [27950] = 38909, -- Enchant Boots - Fortitude
-- [27954] = 38910, -- Enchant Boots - Surefooted
-- [27957] = 38911, -- Enchant Chest - Exceptional Health
-- [27960] = 38913, -- Enchant Chest - Exceptional Stats
-- [27961] = 38914, -- Enchant Cloak - Major Armor
-- [27967] = 38917, -- Enchant Weapon - Major Striking
-- [27968] = 38918, -- Enchant Weapon - Major Intellect
-- [27971] = 38919, -- Enchant 2H Weapon - Savagery
-- [27972] = 38920, -- Enchant Weapon - Potency
-- [27975] = 38921, -- Enchant Weapon - Major Spellpower
-- [27977] = 38922, -- Enchant 2H Weapon - Major Agility
-- [27981] = 38923, -- Enchant Weapon - Sunfire
-- [27982] = 38924, -- Enchant Weapon - Soulfrost
-- [27984] = 38925, -- Enchant Weapon - Mongoose
-- [28003] = 38926, -- Enchant Weapon - Spellsurge
-- [28004] = 38927, -- Enchant Weapon - Battlemaster
-- High Risk Ascension Content
-- [968676] = 967760, -- Enchant Weapon - Unstoppable Assault I
-- [968677] = 967761, -- Enchant Weapon - Unstoppable Assault II
-- [968678] = 967762, -- Enchant Weapon - Unstoppable Assault III
-- [968679] = 967763, -- Enchant Weapon - Lucid Assault I
-- [968680] = 967764, -- Enchant Weapon - Lucid Assault II
-- [968681] = 967765, -- Enchant Weapon - Lucid Assault III
-- [968682] = 967766, -- Enchant Weapon - Spellbinder's Rage I
-- [968683] = 967767, -- Enchant Weapon - Spellbinder's Rage II
-- [968684] = 967768, -- Enchant Weapon - Spellbinder's Rage III
-- [968685] = 967769, -- Enchant Weapon - Ninja's Focus I
-- [968686] = 967770, -- Enchant Weapon - Ninja's Focus II
-- [968687] = 967771, -- Enchant Weapon - Ninja's Focus III
-- [968688] = 967772, -- Enchant Weapon - Grovewarden's Blessing I
-- [968689] = 967773, -- Enchant Weapon - Grovewarden's Blessing II
-- [968690] = 967774, -- Enchant Weapon - Grovewarden's Blessing III
-- [968691] = 967775, -- Enchant Weapon - Viscious Assault I
-- [968692] = 967776, -- Enchant Weapon - Viscious Assault II
-- [968693] = 967777, -- Enchant Weapon - Viscious Assault III
-- [968694] = 967778, -- Enchant Weapon - Arcane Dexterity I
-- [968695] = 967779, -- Enchant Weapon - Arcane Dexterity II
-- [968696] = 967780, -- Enchant Weapon - Arcane Dexterity III
-- [968697] = 967781, -- Enchant Weapon - Arcane Artillery I
-- [968698] = 967782, -- Enchant Weapon - Arcane Artillery II
-- [968699] = 967783, -- Enchant Weapon - Arcane Artillery III
-- [968700] = 967784, -- Enchant Weapon - Arcane Precision I
-- [968701] = 967785, -- Enchant Weapon - Arcane Precision II
-- [968702] = 967786, -- Enchant Weapon - Arcane Precision III
-- [968770] = 967787, -- Enchant Weapon - Crusader II
-- [968771] = 967788, -- Enchant Weapon - Crusader III
-- [1968677] = 1204125, -- Enchant Weapon - Void Assault
-- [1968678] = 1204126, -- Enchant Weapon - Overpowering Void Assault
-- [1968680] = 1204127, -- Enchant Weapon - Dread Assault
-- [1968681] = 1204128, -- Enchant Weapon - Overpowering Dread Assault
-- [1968683] = 1204129, -- Enchant Weapon - Twisted Evoker
-- [1968684] = 1204130, -- Enchant Weapon - Overpowering Twisted Evoker
-- [1968686] = 1204131, -- Enchant Weapon - Twisted Assault
-- [1968687] = 1204132, -- Enchant Weapon - Overpowering Twisted Assault
-- [1968689] = 1204133, -- Enchant Weapon - Twisted Channeler
-- [1968690] = 1204134, -- Enchant Weapon - Overpowering Twisted Channeler
-- [1968692] = 1204135, -- Enchant Weapon - Dread Omen Strikes
-- [1968693] = 1204136, -- Enchant Weapon - Overpowering Dread Omen Strikes
-- [1968695] = 1204137, -- Enchant Weapon - Void Flows
-- [1968696] = 1204138, -- Enchant Weapon - Overpowering Void Flows
-- [1968698] = 1204139, -- Enchant Weapon - Void Blasting
-- [1968699] = 1204140, -- Enchant Weapon - Overpowering Void Blasting
-- [1968701] = 1204141, -- Enchant Weapon - Dread Precision
-- [1968702] = 1204142, -- Enchant Weapon - Overpowering Dread Precision
-- [1968770] = 1204143, -- Enchant Weapon - Twisted Crusader
-- [1968771] = 1204144, -- Enchant Weapon - Overpowering Twisted Crusader
--
TSM.enchantingItemIDs = {
[7418] = 38679, -- Scroll of Enchant Bracer - Minor Health
[7420] = 38766, -- Scroll of Enchant Chest - Minor Health
[7426] = 38767, -- Scroll of Enchant Chest - Minor Absorption
[7428] = 38768, -- Scroll of Enchant Bracer - Minor Deflection
[7443] = 38769, -- Scroll of Enchant Chest - Minor Mana
[7454] = 38770, -- Scroll of Enchant Cloak - Minor Resistance
[7457] = 38771, -- Scroll of Enchant Bracer - Minor Stamina
[7745] = 38772, -- Scroll of Enchant 2H Weapon - Minor Impact
[7748] = 38773, -- Scroll of Enchant Chest - Lesser Health
[7766] = 38774, -- Scroll of Enchant Bracer - Minor Spirit
[7771] = 38775, -- Scroll of Enchant Cloak - Minor Protection
[7776] = 38776, -- Scroll of Enchant Chest - Lesser Mana
[7779] = 38777, -- Scroll of Enchant Bracer - Minor Agility
[7782] = 38778, -- Scroll of Enchant Bracer - Minor Strength
[7786] = 38779, -- Scroll of Enchant Weapon - Minor Beastslayer
[7788] = 38780, -- Scroll of Enchant Weapon - Minor Striking
[7793] = 38781, -- Scroll of Enchant 2H Weapon - Lesser Intellect
[7857] = 38782, -- Scroll of Enchant Chest - Health
[7859] = 38783, -- Scroll of Enchant Bracer - Lesser Spirit
[7861] = 38784, -- Scroll of Enchant Cloak - Lesser Fire Resistance
[7863] = 38785, -- Scroll of Enchant Boots - Minor Stamina
[7867] = 38786, -- Scroll of Enchant Boots - Minor Agility
[13378] = 38787, -- Scroll of Enchant Shield - Minor Stamina
[13380] = 38788, -- Scroll of Enchant 2H Weapon - Lesser Spirit
[13419] = 38789, -- Scroll of Enchant Cloak - Minor Agility
[13421] = 38790, -- Scroll of Enchant Cloak - Lesser Protection
[13464] = 38791, -- Scroll of Enchant Shield - Lesser Protection
[13485] = 38792, -- Scroll of Enchant Shield - Lesser Spirit
[13501] = 38793, -- Scroll of Enchant Bracer - Lesser Stamina
[13503] = 38794, -- Scroll of Enchant Weapon - Lesser Striking
[13522] = 38795, -- Scroll of Enchant Cloak - Lesser Shadow Resistance
[13529] = 38796, -- Scroll of Enchant 2H Weapon - Lesser Impact
[13536] = 38797, -- Scroll of Enchant Bracer - Lesser Strength
[13538] = 38798, -- Scroll of Enchant Chest - Lesser Absorption
[13607] = 38799, -- Scroll of Enchant Chest - Mana
[13612] = 38800, -- Scroll of Enchant Gloves - Mining
[13617] = 38801, -- Scroll of Enchant Gloves - Herbalism
[13620] = 38802, -- Scroll of Enchant Gloves - Fishing
[13622] = 38803, -- Scroll of Enchant Bracer - Lesser Intellect
[13626] = 38804, -- Scroll of Enchant Chest - Minor Stats
[13631] = 38805, -- Scroll of Enchant Shield - Lesser Stamina
[13635] = 38806, -- Scroll of Enchant Cloak - Defense
[13637] = 38807, -- Scroll of Enchant Boots - Lesser Agility
[13640] = 38808, -- Scroll of Enchant Chest - Greater Health
[13642] = 38809, -- Scroll of Enchant Bracer - Spirit
[13644] = 38810, -- Scroll of Enchant Boots - Lesser Stamina
[13646] = 38811, -- Scroll of Enchant Bracer - Lesser Deflection
[13648] = 38812, -- Scroll of Enchant Bracer - Stamina
[13653] = 38813, -- Scroll of Enchant Weapon - Lesser Beastslayer
[13655] = 38814, -- Scroll of Enchant Weapon - Lesser Elemental Slayer
[13657] = 38815, -- Scroll of Enchant Cloak - Fire Resistance
[13659] = 38816, -- Scroll of Enchant Shield - Spirit
[13661] = 38817, -- Scroll of Enchant Bracer - Strength
[13663] = 38818, -- Scroll of Enchant Chest - Greater Mana
[13687] = 38819, -- Scroll of Enchant Boots - Lesser Spirit
[13689] = 38820, -- Scroll of Enchant Shield - Lesser Block
[13693] = 38821, -- Scroll of Enchant Weapon - Striking
[13695] = 38822, -- Scroll of Enchant 2H Weapon - Impact
[13698] = 38823, -- Scroll of Enchant Gloves - Skinning
[13700] = 38824, -- Scroll of Enchant Chest - Lesser Stats
[13746] = 38825, -- Scroll of Enchant Cloak - Greater Defense
[13794] = 38826, -- Scroll of Enchant Cloak - Resistance
[13815] = 38827, -- Scroll of Enchant Gloves - Agility
[13817] = 38828, -- Scroll of Enchant Shield - Stamina
[13822] = 38829, -- Scroll of Enchant Bracer - Intellect
[13836] = 38830, -- Scroll of Enchant Boots - Stamina
[13841] = 38831, -- Scroll of Enchant Gloves - Advanced Mining
[13846] = 38832, -- Scroll of Enchant Bracer - Greater Spirit
[13858] = 38833, -- Scroll of Enchant Chest - Superior Health
[13868] = 38834, -- Scroll of Enchant Gloves - Advanced Herbalism
[13882] = 38835, -- Scroll of Enchant Cloak - Lesser Agility
[13887] = 38836, -- Scroll of Enchant Gloves - Strength
[13890] = 38837, -- Scroll of Enchant Boots - Minor Speed
[13898] = 38838, -- Scroll of Enchant Weapon - Fiery Weapon
[13905] = 38839, -- Scroll of Enchant Shield - Greater Spirit
[13915] = 38840, -- Scroll of Enchant Weapon - Demonslaying
[13917] = 38841, -- Scroll of Enchant Chest - Superior Mana
[13931] = 38842, -- Scroll of Enchant Bracer - Deflection
[13933] = 38843, -- Scroll of Enchant Shield - Frost Resistance
[13935] = 38844, -- Scroll of Enchant Boots - Agility
[13937] = 38845, -- Scroll of Enchant 2H Weapon - Greater Impact
[13939] = 38846, -- Scroll of Enchant Bracer - Greater Strength
[13941] = 38847, -- Scroll of Enchant Chest - Stats
[13943] = 38848, -- Scroll of Enchant Weapon - Greater Striking
[13945] = 38849, -- Scroll of Enchant Bracer - Greater Stamina
[13947] = 38850, -- Scroll of Enchant Gloves - Riding Skill
[13948] = 38851, -- Scroll of Enchant Gloves - Minor Haste
[20008] = 38852, -- Scroll of Enchant Bracer - Greater Intellect
[20009] = 38853, -- Scroll of Enchant Bracer - Superior Spirit
[20010] = 38854, -- Scroll of Enchant Bracer - Superior Strength
[20011] = 38855, -- Scroll of Enchant Bracer - Superior Stamina
[20012] = 38856, -- Scroll of Enchant Gloves - Greater Agility
[20013] = 38857, -- Scroll of Enchant Gloves - Greater Strength
[20014] = 38858, -- Scroll of Enchant Cloak - Greater Resistance
[20015] = 38859, -- Scroll of Enchant Cloak - Superior Defense
[20016] = 38860, -- Scroll of Enchant Shield - Vitality
[20017] = 38861, -- Scroll of Enchant Shield - Greater Stamina
[20020] = 38862, -- Scroll of Enchant Boots - Greater Stamina
[20023] = 38863, -- Scroll of Enchant Boots - Greater Agility
[20024] = 38864, -- Scroll of Enchant Boots - Spirit
[20025] = 38865, -- Scroll of Enchant Chest - Greater Stats
[20026] = 38866, -- Scroll of Enchant Chest - Major Health
[20028] = 38867, -- Scroll of Enchant Chest - Major Mana
[20029] = 38868, -- Scroll of Enchant Weapon - Icy Chill
[20030] = 38869, -- Scroll of Enchant 2H Weapon - Superior Impact
[20031] = 38870, -- Scroll of Enchant Weapon - Superior Striking
[20032] = 38871, -- Scroll of Enchant Weapon - Lifestealing
[20033] = 38872, -- Scroll of Enchant Weapon - Unholy Weapon
[20034] = 38873, -- Scroll of Enchant Weapon - Crusader
[20035] = 38874, -- Scroll of Enchant 2H Weapon - Major Spirit
[20036] = 38875, -- Scroll of Enchant 2H Weapon - Major Intellect
[21931] = 38876, -- Scroll of Enchant Weapon - Winter's Might
[22749] = 38877, -- Scroll of Enchant Weapon - Spellpower
[22750] = 38878, -- Scroll of Enchant Weapon - Healing Power
[23799] = 38879, -- Scroll of Enchant Weapon - Strength
[23800] = 38880, -- Scroll of Enchant Weapon - Agility
[23801] = 38881, -- Scroll of Enchant Bracer - Mana Regeneration
[23802] = 38882, -- Scroll of Enchant Bracer - Healing Power
[23803] = 38883, -- Scroll of Enchant Weapon - Mighty Spirit
[23804] = 38884, -- Scroll of Enchant Weapon - Mighty Intellect
[25072] = 38885, -- Scroll of Enchant Gloves - Threat
[25073] = 38886, -- Scroll of Enchant Gloves - Shadow Power
[25074] = 38887, -- Scroll of Enchant Gloves - Frost Power
[25078] = 38888, -- Scroll of Enchant Gloves - Fire Power
[25079] = 38889, -- Scroll of Enchant Gloves - Healing Power
[25080] = 38890, -- Scroll of Enchant Gloves - Superior Agility
[25081] = 38891, -- Scroll of Enchant Cloak - Greater Fire Resistance
[25082] = 38892, -- Scroll of Enchant Cloak - Greater Nature Resistance
[25083] = 38893, -- Scroll of Enchant Cloak - Stealth
[25084] = 38894, -- Scroll of Enchant Cloak - Subtlety
[25086] = 38895, -- Scroll of Enchant Cloak - Dodge
[27837] = 38896, -- Scroll of Enchant 2H Weapon - Agility
[27899] = 38897, -- Scroll of Enchant Bracer - Brawn
[27905] = 38898, -- Scroll of Enchant Bracer - Stats
[27906] = 38899, -- Scroll of Enchant Bracer - Major Defense
[27911] = 38900, -- Scroll of Enchant Bracer - Superior Healing
[27913] = 38901, -- Scroll of Enchant Bracer - Restore Mana Prime
[27914] = 38902, -- Scroll of Enchant Bracer - Fortitude
[27917] = 38903, -- Scroll of Enchant Bracer - Spellpower
[27944] = 38904, -- Scroll of Enchant Shield - Tough Shield
[27945] = 38905, -- Scroll of Enchant Shield - Intellect
[27946] = 38906, -- Scroll of Enchant Shield - Shield Block
[27947] = 38907, -- Scroll of Enchant Shield - Resistance
[27948] = 38908, -- Scroll of Enchant Boots - Vitality
[27950] = 38909, -- Scroll of Enchant Boots - Fortitude
[27951] = 37603, -- Scroll of Enchant Boots - Dexterity
[27954] = 38910, -- Scroll of Enchant Boots - Surefooted
[27957] = 38911, -- Scroll of Enchant Chest - Exceptional Health
[27958] = 38912, -- Scroll of Enchant Chest - Exceptional Mana
[27960] = 38913, -- Scroll of Enchant Chest - Exceptional Stats
[27961] = 38914, -- Scroll of Enchant Cloak - Major Armor
[27962] = 38915, -- Scroll of Enchant Cloak - Major Resistance
[27967] = 38917, -- Scroll of Enchant Weapon - Major Striking
[27968] = 38918, -- Scroll of Enchant Weapon - Major Intellect
[27971] = 38919, -- Scroll of Enchant 2H Weapon - Savagery
[27972] = 38920, -- Scroll of Enchant Weapon - Potency
[27975] = 38921, -- Scroll of Enchant Weapon - Major Spellpower
[27977] = 38922, -- Scroll of Enchant 2H Weapon - Major Agility
[27981] = 38923, -- Scroll of Enchant Weapon - Sunfire
[27982] = 38924, -- Scroll of Enchant Weapon - Soulfrost
[27984] = 38925, -- Scroll of Enchant Weapon - Mongoose
[28003] = 38926, -- Scroll of Enchant Weapon - Spellsurge
[28004] = 38927, -- Scroll of Enchant Weapon - Battlemaster
[33990] = 38928, -- Scroll of Enchant Chest - Major Spirit
[33991] = 38929, -- Scroll of Enchant Chest - Restore Mana Prime
[33992] = 38930, -- Scroll of Enchant Chest - Major Resilience
[33993] = 38931, -- Scroll of Enchant Gloves - Blasting
[33994] = 38932, -- Scroll of Enchant Gloves - Precise Strikes
[33995] = 38933, -- Scroll of Enchant Gloves - Major Strength
[33996] = 38934, -- Scroll of Enchant Gloves - Assault
[33997] = 38935, -- Scroll of Enchant Gloves - Major Spellpower
[33999] = 38936, -- Scroll of Enchant Gloves - Major Healing
[34001] = 38937, -- Scroll of Enchant Bracer - Major Intellect
[34002] = 38938, -- Scroll of Enchant Bracer - Assault
[34003] = 38939, -- Scroll of Enchant Cloak - Spell Penetration
[34004] = 38940, -- Scroll of Enchant Cloak - Greater Agility
[34005] = 38941, -- Scroll of Enchant Cloak - Greater Arcane Resistance
[34006] = 38942, -- Scroll of Enchant Cloak - Greater Shadow Resistance
[34007] = 38943, -- Scroll of Enchant Boots - Cat's Swiftness
[34008] = 38944, -- Scroll of Enchant Boots - Boar's Speed
[34009] = 38945, -- Scroll of Enchant Shield - Major Stamina
[34010] = 38946, -- Scroll of Enchant Weapon - Major Healing
[42620] = 38947, -- Scroll of Enchant Weapon - Greater Agility
[42974] = 38948, -- Scroll of Enchant Weapon - Executioner
[44383] = 38949, -- Scroll of Enchant Shield - Resilience
[44483] = 38950, -- Scroll of Enchant Cloak - Superior Frost Resistance
[44484] = 38951, -- Scroll of Enchant Gloves - Expertise
[44488] = 38953, -- Scroll of Enchant Gloves - Precision
[44489] = 38954, -- Scroll of Enchant Shield - Defense
[44492] = 38955, -- Scroll of Enchant Chest - Mighty Health
[44494] = 38956, -- Scroll of Enchant Cloak - Superior Nature Resistance
[44500] = 38959, -- Scroll of Enchant Cloak - Superior Agility
[44506] = 38960, -- Scroll of Enchant Gloves - Gatherer
[44508] = 38961, -- Scroll of Enchant Boots - Greater Spirit
[44509] = 38962, -- Scroll of Enchant Chest - Greater Mana Restoration
[44510] = 38963, -- Scroll of Enchant Weapon - Exceptional Spirit
[44513] = 38964, -- Scroll of Enchant Gloves - Greater Assault
[44524] = 38965, -- Scroll of Enchant Weapon - Icebreaker
[44528] = 38966, -- Scroll of Enchant Boots - Greater Fortitude
[44529] = 38967, -- Scroll of Enchant Gloves - Major Agility
[44555] = 38968, -- Scroll of Enchant Bracers - Exceptional Intellect
[44556] = 38969, -- Scroll of Enchant Cloak - Superior Fire Resistance
[44575] = 44815, -- Scroll of Enchant Bracers - Greater Assault
[44576] = 38972, -- Scroll of Enchant Weapon - Lifeward
[44582] = 38973, -- Scroll of Enchant Cloak - Spell Piercing
[44584] = 38974, -- Scroll of Enchant Boots - Greater Vitality
[44588] = 38975, -- Scroll of Enchant Chest - Exceptional Resilience
[44589] = 38976, -- Scroll of Enchant Boots - Superior Agility
[44590] = 38977, -- Scroll of Enchant Cloak - Superior Shadow Resistance
[44591] = 38978, -- Scroll of Enchant Cloak - Titanweave
[44592] = 38979, -- Scroll of Enchant Gloves - Exceptional Spellpower
[44593] = 38980, -- Scroll of Enchant Bracers - Major Spirit
[44595] = 38981, -- Scroll of Enchant 2H Weapon - Scourgebane
[44596] = 38982, -- Scroll of Enchant Cloak - Superior Arcane Resistance
[44598] = 38984, -- Scroll of Enchant Bracer - Expertise
[44612] = 38985, -- Scroll of Enchant Gloves - Greater Blasting
[44616] = 38987, -- Scroll of Enchant Bracers - Greater Stats
[44621] = 38988, -- Scroll of Enchant Weapon - Giant Slayer
[44623] = 38989, -- Scroll of Enchant Chest - Super Stats
[44625] = 38990, -- Scroll of Enchant Gloves - Armsman
[44629] = 38991, -- Scroll of Enchant Weapon - Exceptional Spellpower
[44630] = 38992, -- Scroll of Enchant 2H Weapon - Greater Savagery
[44631] = 38993, -- Scroll of Enchant Cloak - Shadow Armor
[44633] = 38995, -- Scroll of Enchant Weapon - Exceptional Agility
[44635] = 38997, -- Scroll of Enchant Bracers - Greater Spellpower
[46578] = 38998, -- Scroll of Enchant Weapon - Deathfrost
[46594] = 38999, -- Scroll of Enchant Chest - Defense
[47051] = 39000, -- Scroll of Enchant Cloak - Steelweave
[47672] = 39001, -- Scroll of Enchant Cloak - Mighty Armor
[47766] = 39002, -- Scroll of Enchant Chest - Greater Defense
[47898] = 39003, -- Scroll of Enchant Cloak - Greater Speed
[47899] = 39004, -- Scroll of Enchant Cloak - Wisdom
[47900] = 39005, -- Scroll of Enchant Chest - Super Health
[47901] = 39006, -- Scroll of Enchant Boots - Tuskarr's Vitality
[59619] = 44497, -- Scroll of Enchant Weapon - Accuracy
[59621] = 44493, -- Scroll of Enchant Weapon - Berserking
[59625] = 43987, -- Scroll of Enchant Weapon - Black Magic
[60606] = 44449, -- Scroll of Enchant Boots - Assault
[60609] = 44456, -- Scroll of Enchant Cloak - Speed
[60616] = 38971, -- Scroll of Enchant Bracers - Striking
[60621] = 44453, -- Scroll of Enchant Weapon - Greater Potency
[60623] = 38986, -- Scroll of Enchant Boots - Icewalker
[60653] = 44455, -- Scroll of Enchant Shield - Greater Intellect
[60663] = 44457, -- Scroll of Enchant Cloak - Major Agility
[60668] = 44458, -- Scroll of Enchant Gloves - Crusher
[60691] = 44463, -- Scroll of Enchant 2H Weapon - Massacre
[60692] = 44465, -- Scroll of Enchant Chest - Powerful Stats
[60707] = 44466, -- Scroll of Enchant Weapon - Superior Potency
[60714] = 44467, -- Scroll of Enchant Weapon - Mighty Spellpower
[60763] = 44469, -- Scroll of Enchant Boots - Greater Assault
[60767] = 44470, -- Scroll of Enchant Bracer - Superior Spellpower
[62256] = 44947, -- Scroll of Enchant Bracer - Major Stamina
[62257] = 44946, -- Scroll of Enchant Weapon - Titanguard
[62948] = 45056, -- Scroll of Enchant Staff - Greater Spellpower
[62959] = 45060, -- Scroll of Enchant Staff - Spellpower
[63746] = 45628, -- Scroll of Enchant Boots - Lesser Accuracy
[64441] = 46026, -- Scroll of Enchant Weapon - Blade Ward
[64579] = 46098, -- Scroll of Enchant Weapon - Blood Draining
[71692] = 50816, -- Scroll of Enchant Gloves - Angler
[968676] = 967760, -- Scroll of Enchant Weapon - Unstoppable Assault I
[968677] = 967761, -- Scroll of Enchant Weapon - Unstoppable Assault II
[968678] = 967762, -- Scroll of Enchant Weapon - Unstoppable Assault III
[968679] = 967763, -- Scroll of Enchant Weapon - Lucid Assault I
[968680] = 967764, -- Scroll of Enchant Weapon - Lucid Assault II
[968681] = 967765, -- Scroll of Enchant Weapon - Lucid Assault III
[968682] = 967766, -- Scroll of Enchant Weapon - Spellbinder's Rage I
[968683] = 967767, -- Scroll of Enchant Weapon - Spellbinder's Rage II
[968684] = 967768, -- Scroll of Enchant Weapon - Spellbinder's Rage III
[968685] = 967769, -- Scroll of Enchant Weapon - Ninja's Focus I
[968686] = 967770, -- Scroll of Enchant Weapon - Ninja's Focus II
[968687] = 967771, -- Scroll of Enchant Weapon - Ninja's Focus III
[968688] = 967772, -- Scroll of Enchant Weapon - Grovewarden's Blessing I
[968689] = 967773, -- Scroll of Enchant Weapon - Grovewarden's Blessing II
[968690] = 967774, -- Scroll of Enchant Weapon - Grovewarden's Blessing III
[968691] = 967775, -- Scroll of Enchant Weapon - Viscious Assault I
[968692] = 967776, -- Scroll of Enchant Weapon - Viscious Assault II
[968693] = 967777, -- Scroll of Enchant Weapon - Viscious Assault III
[968694] = 967778, -- Scroll of Enchant Weapon - Arcane Dexterity I
[968695] = 967779, -- Scroll of Enchant Weapon - Arcane Dexterity II
[968696] = 967780, -- Scroll of Enchant Weapon - Arcane Dexterity III
[968697] = 967781, -- Scroll of Enchant Weapon - Arcane Artillery I
[968698] = 967782, -- Scroll of Enchant Weapon - Arcane Artillery II
[968699] = 967783, -- Scroll of Enchant Weapon - Arcane Artillery III
[968700] = 967784, -- Scroll of Enchant Weapon - Arcane Precision I
[968701] = 967785, -- Scroll of Enchant Weapon - Arcane Precision II
[968702] = 967786, -- Scroll of Enchant Weapon - Arcane Precision III
[968770] = 967787, -- Scroll of Enchant Weapon - Crusader II
[968771] = 967788, -- Scroll of Enchant Weapon - Crusader III
[1968677] = 1204125, -- Scroll of Enchant Weapon - Void Assault
[1968678] = 1204126, -- Scroll of Enchant Weapon - Overpowering Void Assault
[1968680] = 1204127, -- Scroll of Enchant Weapon - Dread Assault
[1968681] = 1204128, -- Scroll of Enchant Weapon - Overpowering Dread Assault
[1968683] = 1204129, -- Scroll of Enchant Weapon - Twisted Evoker
[1968684] = 1204130, -- Scroll of Enchant Weapon - Overpowering Twisted Evoker
[1968686] = 1204131, -- Scroll of Enchant Weapon - Twisted Assault
[1968687] = 1204132, -- Scroll of Enchant Weapon - Overpowering Twisted Assault
[1968689] = 1204133, -- Scroll of Enchant Weapon - Twisted Channeler
[1968690] = 1204134, -- Scroll of Enchant Weapon - Overpowering Twisted Channeler
[1968692] = 1204135, -- Scroll of Enchant Weapon - Dread Omen Strikes
[1968693] = 1204136, -- Scroll of Enchant Weapon - Overpowering Dread Omen Strikes
[1968695] = 1204137, -- Scroll of Enchant Weapon - Void Flows
[1968696] = 1204138, -- Scroll of Enchant Weapon - Overpowering Void Flows
[1968698] = 1204139, -- Scroll of Enchant Weapon - Void Blasting
[1968699] = 1204140, -- Scroll of Enchant Weapon - Overpowering Void Blasting
[1968701] = 1204141, -- Scroll of Enchant Weapon - Dread Precision
[1968702] = 1204142, -- Scroll of Enchant Weapon - Overpowering Dread Precision
[1968770] = 1204143, -- Scroll of Enchant Weapon - Twisted Crusader
[1968771] = 1204144, -- Scroll of Enchant Weapon - Overpowering Twisted Crusader
}
@@ -0,0 +1,188 @@
-- ------------------------------------------------------------------------------ --
-- TradeSkillMaster_Crafting --
-- http://www.curse.com/addons/wow/tradeskillmaster_crafting --
-- --
-- A TradeSkillMaster Addon (http://tradeskillmaster.com) --
-- All Rights Reserved* - Detailed license information included with addon. --
-- ------------------------------------------------------------------------------ --
--load the parent file (TSM) into a local variable and register this file as a module
local TSM = select(2, ...)
local Gather = TSM:NewModule("Gather", "AceEvent-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_Crafting") -- loads the localization table
local next = next
local private = { shoppingItems = {} }
function Gather:BuyFromMerchant(neededMats)
for i = 1, GetMerchantNumItems() do
local itemString = TSMAPI:GetItemString(GetMerchantItemLink(i))
if neededMats[itemString] then
local maxStack = GetMerchantItemMaxStack(i)
local toBuy = neededMats[itemString]
while toBuy > 0 do
BuyMerchantItem(i, math.min(toBuy, maxStack))
toBuy = toBuy - maxStack
TSM.db.factionrealm.gathering.gatheredMats = true
end
end
end
end
function Gather:gatherItems(source, task)
local items = TSM.db.factionrealm.gathering.availableMats
if source == L["Vendor"] then
Gather:BuyFromMerchant(items)
elseif source == UnitName("player") and (task == L["Visit Bank"] or task == L["Visit Guild Bank"]) then
Gather:GatherBank(items)
elseif source == UnitName("player") and task == L["Mail Items"] then
Gather:MailItems(items)
elseif source == L["Auction House"] then
if TSMAPI:AHTabIsVisible("Shopping") then
private.shoppingItems = {}
for itemString, quantity in pairs(items) do
tinsert(private.shoppingItems, { itemString = itemString, quantity = quantity })
end
Gather:ShoppingSearch(private.shoppingItems[1].itemString, private.shoppingItems[1].quantity)
else
TSM:Printf(L["Please switch to the Shopping Tab to perform the gathering search."])
end
end
end
function Gather:GatherBank(moveItems)
local next = next
if next(moveItems) == nil then
TSM:Print(L["Nothing to Gather"])
else
TSM:Print(L["Gathering Crafting Mats"])
TSMAPI:MoveItems(moveItems, Gather.PrintMsg)
TSM.db.factionrealm.gathering.gatheredMats = true
end
end
function Gather.PrintMsg(message)
if message then
TSM:Print(message)
end
end
function Gather:MerchantSells(neededItem)
for i = 1, GetMerchantNumItems() do
local itemString = TSMAPI:GetItemString(GetMerchantItemLink(i))
if neededItem == itemString then
return true
end
end
return false
end
function Gather:MailItems(neededItems)
local next = next
if next(neededItems) == nil then
TSM:Print(L["Nothing to Mail"])
else
local crafter = TSM.db.factionrealm.gathering.crafter
if crafter then
TSM:Print(format(L["Mailing Craft Mats to %s"], crafter))
TSMAPI:ModuleAPI("Mailing", "mailItems", neededItems, crafter, Gather.PrintMsg)
TSM.db.factionrealm.gathering.gatheredMats = true
end
end
end
local function ShoppingNextSearch()
if next(private.shoppingItems) then
Gather:ShoppingSearch(private.shoppingItems[1].itemString, private.shoppingItems[1].quantity)
end
end
local function ShoppingCallback(remainingQty, boughtItem, stackSize)
if not boughtItem then
if next(private.shoppingItems) then
local name = TSMAPI:GetSafeItemInfo(private.shoppingItems[1].itemString)
TSM:Print("No Auctions found for", name)
tremove(private.shoppingItems, 1)
TSMAPI:CreateTimeDelay("shoppingSearchThrottle", 0.5, ShoppingNextSearch)
end
else
TSM.Inventory.gatherQuantity = remainingQty
if TSM.Inventory.gatherItem and boughtItem ~= TSM.Inventory.gatherItem then
for itemString, data in pairs(TSMAPI.Conversions[TSM.Inventory.gatherItem] or {}) do
if itemString == boughtItem then
TSM.db.factionrealm.gathering.destroyingMats[boughtItem] = (TSM.db.factionrealm.gathering.destroyingMats[boughtItem] or 0) + stackSize
end
end
end
if max(TSM.Inventory.gatherQuantity, 0) == 0 and next(private.shoppingItems) then
tremove(private.shoppingItems, 1)
TSMAPI:CreateTimeDelay("shoppingSearchThrottle", 0.5, ShoppingNextSearch)
end
end
end
function Gather:ShoppingSearch(itemString, need, ignoreMaxQty)
TSM.Inventory.gatherQuantity = nil
local matPrice = TSMAPI:FormatTextMoney(TSM.Cost:GetMatCost(itemString))
if not TSM.db.factionrealm.gathering.destroyDisable then
if TSMAPI.InkConversions[itemString] then
TSM.Inventory.gatherItem = itemString
if TSM.db.factionrealm.gathering.evenStacks then
if ignoreMaxQty then
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/even", ShoppingCallback)
else
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/even/x" .. need, ShoppingCallback)
end
elseif ignoreMaxQty then
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString), ShoppingCallback)
else
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/x" .. need, ShoppingCallback)
end
elseif TSMAPI:GetDisenchantData(itemString) then
TSM.Inventory.gatherItem = itemString
if ignoreMaxQty then
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/exact", ShoppingCallback)
else
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/exact/x" .. need, ShoppingCallback)
end
elseif TSMAPI.Conversions[itemString] then
TSM.Inventory.gatherItem = itemString
local convertSource
for _, data in pairs(TSMAPI.Conversions[itemString]) do
convertSource = data.source
break
end
if convertSource == "mill" or convertSource == "prospect" then
if TSM.db.factionrealm.gathering.evenStacks then
if ignoreMaxQty then
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/even", ShoppingCallback)
else
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/even/x" .. need, ShoppingCallback)
end
elseif ignoreMaxQty then
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString), ShoppingCallback)
else
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/x" .. need, ShoppingCallback)
end
else
TSMAPI:ModuleAPI("Shopping", "runSearch", TSMAPI:GetSafeItemInfo(itemString) .. "/exact/x" .. need, ShoppingCallback)
end
else
TSM.Inventory.gatherItem = nil
if ignoreMaxQty then
TSMAPI:ModuleAPI("Shopping", "runSearch", TSMAPI:GetSafeItemInfo(itemString) .. "/exact", ShoppingCallback)
else
TSMAPI:ModuleAPI("Shopping", "runSearch", TSMAPI:GetSafeItemInfo(itemString) .. "/exact/x" .. need, ShoppingCallback)
end
end
else
TSM.Inventory.gatherItem = nil
if ignoreMaxQty then
TSMAPI:ModuleAPI("Shopping", "runSearch", TSMAPI:GetSafeItemInfo(itemString) .. "/exact", ShoppingCallback)
else
TSMAPI:ModuleAPI("Shopping", "runSearch", TSMAPI:GetSafeItemInfo(itemString) .. "/exact/x" .. need, ShoppingCallback)
end
end
end
@@ -0,0 +1,340 @@
-- ------------------------------------------------------------------------------ --
-- TradeSkillMaster_Crafting --
-- http://www.curse.com/addons/wow/tradeskillmaster_crafting --
-- --
-- A TradeSkillMaster Addon (http://tradeskillmaster.com) --
-- All Rights Reserved* - Detailed license information included with addon. --
-- ------------------------------------------------------------------------------ --
-- load the parent file (TSM) into a local variable and register this file as a module
local TSM = select(2, ...)
local Inventory = TSM:NewModule("Inventory", "AceEvent-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_Crafting") -- loads the localization table
-- gets the number of an item in the current player's bags
function Inventory:GetPlayerBagNum(itemString)
if not itemString then return end
if TSMAPI.SOULBOUND_MATS[itemString] then
return GetItemCount(itemString)
else
local bags = TSMAPI:ModuleAPI("ItemTracker", "playerbags", UnitName("player")) or {}
return bags and bags[itemString] or 0
end
end
function Inventory:GetTotals()
local bagTotal, auctionTotal, otherTotal, total = {}, {}, {}, {}
for _, player in pairs(TSMAPI:ModuleAPI("ItemTracker", "playerlist") or {}) do
if player == UnitName("player") or not TSM.db.global.ignoreCharacters[player] then
local bags = TSMAPI:ModuleAPI("ItemTracker", "playerbags", player) or {}
local bank = TSMAPI:ModuleAPI("ItemTracker", "playerbank", player) or {}
local mail = TSMAPI:ModuleAPI("ItemTracker", "playermail", player) or {}
local auctions = TSMAPI:ModuleAPI("ItemTracker", "playerauctions", player) or {}
for itemString, quantity in pairs(bags) do
if player == UnitName("player") then
bagTotal[itemString] = (bagTotal[itemString] or 0) + quantity
total[itemString] = (total[itemString] or 0) + quantity
else
otherTotal[itemString] = (otherTotal[itemString] or 0) + quantity
total[itemString] = (total[itemString] or 0) + quantity
end
end
for itemString, quantity in pairs(bank) do
otherTotal[itemString] = (otherTotal[itemString] or 0) + quantity
total[itemString] = (total[itemString] or 0) + quantity
end
for itemString, quantity in pairs(mail) do
otherTotal[itemString] = (otherTotal[itemString] or 0) + quantity
total[itemString] = (total[itemString] or 0) + quantity
end
for itemString, quantity in pairs(auctions) do
auctionTotal[itemString] = (auctionTotal[itemString] or 0) + quantity
total[itemString] = (total[itemString] or 0) + quantity
end
end
end
for itemString in pairs(TSMAPI.SOULBOUND_MATS) do
local bagNum = GetItemCount(itemString)
local bankNum = GetItemCount(itemString, true) - GetItemCount(itemString)
bagTotal[itemString] = (bagTotal[itemString] or 0) + bagNum
otherTotal[itemString] = (otherTotal[itemString] or 0) + bankNum
total[itemString] = (total[itemString] or 0) + bagNum + bankNum
end
-- add gbank counts of all non-ignored guilds
for _, guild in pairs(TSMAPI:ModuleAPI("ItemTracker", "guildlist") or {}) do
if not TSM.db.global.ignoreGuilds[guild] then
local gbank = TSMAPI:ModuleAPI("ItemTracker", "guildbank", guild) or {}
for itemString, quantity in pairs(gbank) do
otherTotal[itemString] = (otherTotal[itemString] or 0) + quantity
total[itemString] = (total[itemString] or 0) + quantity
end
end
end
return bagTotal, auctionTotal, otherTotal, total
end
-- gets the total number of some item that they have
function Inventory:GetTotalQuantity(itemString)
if not itemString then return 0 end
local count = 0
-- add bags/bank/mail/auction counts of all non-ignored characters (always including current character)
for _, player in pairs(TSMAPI:ModuleAPI("ItemTracker", "playerlist") or {}) do
if player == UnitName("player") or not TSM.db.global.ignoreCharacters[player] then
local bags = TSMAPI:ModuleAPI("ItemTracker", "playerbags", player) or {}
local bank = TSMAPI:ModuleAPI("ItemTracker", "playerbank", player) or {}
local mail = TSMAPI:ModuleAPI("ItemTracker", "playermail", player) or {}
local auctions = TSMAPI:ModuleAPI("ItemTracker", "playerauctions", player) or {}
count = count + (bags[itemString] or 0)
count = count + (bank[itemString] or 0)
count = count + (mail[itemString] or 0)
count = count + (auctions[itemString] or 0)
end
end
-- add gbank counts of all non-ignored guilds
for _, guild in pairs(TSMAPI:ModuleAPI("ItemTracker", "guildlist") or {}) do
if not TSM.db.global.ignoreGuilds[guild] then
local bank = TSMAPI:ModuleAPI("ItemTracker", "guildbank", guild) or {}
count = count + (bank[itemString] or 0)
end
end
if TSMAPI.SOULBOUND_MATS[itemString] then
count = count + GetItemCount(itemString, true)
end
return count
end
function Inventory:GetItemSources(crafter, neededMats)
if not neededMats then return end
local sources = {}
local gbank = {}
local next = next
local crafterBags = TSMAPI:ModuleAPI("ItemTracker", "playerbags", crafter) or {}
local crafterMail = TSMAPI:ModuleAPI("ItemTracker", "playermail", crafter) or {}
local crafterBank = TSMAPI:ModuleAPI("ItemTracker", "playerbank", crafter) or {}
-- add vendor items
local task = {}
local items = {}
for itemString, quantity in pairs(neededMats) do
if TSMAPI:GetVendorCost(itemString) then
local vendorNeed = quantity - ((crafterBags[itemString] or 0) + (crafterMail[itemString] or 0) + (crafterBank[itemString] or 0))
if vendorNeed > 0 then
items[itemString] = vendorNeed
end
elseif TSMAPI.Conversions[itemString] and TSMAPI.InkConversions[itemString] then
local tradeItem, data = next(TSMAPI.Conversions[itemString])
if data.source == "vendortrade" then
local num = floor(Inventory:GetTotalQuantity(tradeItem) * data.rate)
if quantity > Inventory:GetTotalQuantity(itemString) and num >= (quantity - Inventory:GetTotalQuantity(itemString)) then
items[itemString] = quantity - Inventory:GetTotalQuantity(itemString)
neededMats[tradeItem] = (neededMats[tradeItem] or 0) + quantity / data.rate -- add the qty of IOD to needed mats
end
end
end
end
if next(items) then
tinsert(task, { taskType = L["Visit Vendor"], items = items })
tinsert(sources, { sourceName = L["Vendor"], isCrafter = false, isVendor = true, isAH = false, tasks = task })
end
-- double check if crafter already has all the items needed
local shortItems = {}
for itemString, quantity in pairs(neededMats) do
local soulboundBagCount
if TSMAPI.SOULBOUND_MATS[itemString] then
soulboundBagCount = GetItemCount(itemString)
end
local need = max(quantity - (crafterBags[itemString] or soulboundBagCount or 0), 0)
if need > 0 then
shortItems[itemString] = need
end
end
if not next(shortItems) then return end
-- add bags/bank/mail "tasks" for needed items of all non-ignored characters (always include crafter)
for _, player in pairs(TSMAPI:ModuleAPI("ItemTracker", "playerlist") or {}) do
if player == crafter or not TSM.db.global.ignoreCharacters[player] then
local task = {}
local bags = TSMAPI:ModuleAPI("ItemTracker", "playerbags", player) or {}
local bank = TSMAPI:ModuleAPI("ItemTracker", "playerbank", player) or {}
local guild = TSMAPI:ModuleAPI("ItemTracker", "playerguild", player) or {}
local gbank = {}
if guild and not TSM.db.global.ignoreGuilds[guild] then
gbank = TSMAPI:ModuleAPI("ItemTracker", "guildbank", guild) or {}
end
local mail = TSMAPI:ModuleAPI("ItemTracker", "playermail", player) or {}
local bankItems = {}
local gbankItems = {}
local mailItems = {}
local bagItems = {}
for itemString in pairs(neededMats) do
local soulboundBagCount, soulboundBankCount
if TSMAPI.SOULBOUND_MATS[itemString] then
soulboundBagCount = GetItemCount(itemString)
soulboundBankCount = GetItemCount(itemString, true) - soulboundBagCount
end
if (bank[itemString] or (soulboundBankCount and soulboundBankCount > 0)) and shortItems[itemString] then
if shortItems[itemString] - (crafterMail[itemString] or 0) - (player ~= crafter and bags[itemString] or 0) > 0 then
bankItems[itemString] = bank[itemString] or soulboundBankCount
end
end
if gbank[itemString] and shortItems[itemString] then
if shortItems[itemString] - (crafterMail[itemString] or 0) - (player ~= crafter and bags[itemString] or 0) > 0 then
gbankItems[itemString] = gbank[itemString]
end
end
if mail[itemString] and shortItems[itemString] then
mailItems[itemString] = mail[itemString]
end
if bags[itemString] and shortItems[itemString] then
if player ~= crafter then
if shortItems[itemString] - (crafterMail[itemString] or 0) > 0 then
bagItems[itemString] = bags[itemString]
end
end
end
end
-- add mail tasks for destroyable items bought through shopping search (exclude items already added to mail tasks)
for itemString, quantity in pairs(TSM.db.factionrealm.gathering.destroyingMats) do
if mail[itemString] and not shortItems[itemString] then
mailItems[itemString] = quantity
end
end
if next(bankItems) then
tinsert(task, { taskType = L["Visit Bank"], items = bankItems })
end
if next(gbankItems) then
tinsert(task, { taskType = L["Visit Guild Bank"], items = gbankItems })
end
if next(mailItems) then
tinsert(task, { taskType = L["Collect Mail"], items = mailItems })
end
if next(bagItems) then
tinsert(task, { taskType = L["Mail Items"], items = bagItems })
end
if next(task) then
tinsert(sources, { sourceName = player, isCrafter = player == crafter, isVendor = false, isAH = false, tasks = task, isCurrent = (player == UnitName("player")) })
end
end
end
-- add auction house tasks
local auctionTask = {}
local auctionItems = {}
for itemString, quantity in pairs(neededMats) do
if not TSMAPI.SOULBOUND_MATS[itemString] and not TSMAPI:GetVendorCost(itemString) then
local need
if TSM.Inventory.gatherItem == itemString and TSM.Inventory.gatherQuantity then
need = TSM.Inventory.gatherQuantity
else
need = max(quantity - (TSM.Inventory:GetTotalQuantity(itemString) or 0), 0)
end
if need > 0 then
auctionItems[itemString] = need
end
end
end
if next(auctionItems) then
tinsert(auctionTask, { taskType = L["Search for Mats"], items = auctionItems })
tinsert(sources, { sourceName = L["Auction House"], isCrafter = false, isVendor = false, isAH = true, tasks = auctionTask })
end
-- add destroying tasks
local destroyingTask, millItems, prospectItems, transformItems, deItems = {}, {}, {}, {}, {}
for itemString, quantity in pairs(neededMats) do
local need = max(quantity - (TSM.Inventory:GetTotalQuantity(itemString) or 0), 0)
-- conversion items
for destroyItem, data in pairs(TSMAPI.Conversions[itemString] or {}) do
if TSM.db.factionrealm.gathering.destroyingMats[destroyItem] then
if need > 0 then
local destroyNeed
if data.source == "mill" then
destroyNeed = floor(TSM.db.factionrealm.gathering.destroyingMats[destroyItem] / 5)
if destroyNeed > 0 then
millItems[destroyItem] = (millItems[destroyItem] or 0) + destroyNeed
end
elseif data.source == "prospect" then
destroyNeed = floor(TSM.db.factionrealm.gathering.destroyingMats[destroyItem] / 5)
if destroyNeed > 0 then
prospectItems[destroyItem] = (prospectItems[destroyItem] or 0) + destroyNeed
end
elseif data.source == "transform" then
if data.rate == 1 / 3 then
destroyNeed = floor(TSM.db.factionrealm.gathering.destroyingMats[destroyItem] / 3)
elseif data.rate == 1 / 10 then
destroyNeed = floor(TSM.db.factionrealm.gathering.destroyingMats[destroyItem] / 10)
else
destroyNeed = TSM.db.factionrealm.gathering.destroyingMats[destroyItem]
end
if destroyNeed > 0 then
transformItems[destroyItem] = (transformItems[destroyItem] or 0) + destroyNeed
end
end
else
TSM.db.factionrealm.gathering.destroyingMats[destroyItem] = nil
end
end
end
-- disenchantable items
if next(TSM.db.factionrealm.gathering.destroyingMats) then
for deItemString, quantity in pairs(TSM.db.factionrealm.gathering.destroyingMats) do
if Inventory:IsDisenchantable(deItemString) then
if need > 0 then
deItems[deItemString] = quantity
else
TSM.db.factionrealm.gathering.destroyingMats[deItemString] = nil
end
end
end
end
end
if next(millItems) then
tinsert(destroyingTask, { taskType = L["Milling"], items = millItems })
end
if next(prospectItems) then
tinsert(destroyingTask, { taskType = L["Prospect"], items = prospectItems })
end
if next(transformItems) then
tinsert(destroyingTask, { taskType = L["Transform"], items = transformItems })
end
if next(deItems) then
tinsert(destroyingTask, { taskType = L["Disenchant"], items = deItems })
end
if next(destroyingTask) then
tinsert(sources, { sourceName = L["Destroying"], isCrafter = false, isVendor = false, isAH = true, tasks = destroyingTask })
end
sort(sources, function(a, b)
if a.isCurrent then return true end
if b.isCurrent then return false end
if a.isAH then return false end
if b.isAH then return true end
if a.isVendor then return false end
if b.isVendor then return true end
if a.isCrafter then return false end
if b.isCrafter then return true end
return a.sourceName < b.sourceName
end)
return sources
end
function Inventory:IsDisenchantable(itemString)
local _, link, quality, _, _, iType = TSMAPI:GetSafeItemInfo(itemString)
local WEAPON, ARMOR = GetAuctionItemClasses()
if itemString and not TSMAPI.DisenchantingData.notDisenchantable[itemString] and (iType == ARMOR or iType == WEAPON) then
return true
end
end
File diff suppressed because it is too large Load Diff
+257
View File
@@ -0,0 +1,257 @@
-- ------------------------------------------------------------------------------ --
-- TradeSkillMaster_Crafting --
-- http://www.curse.com/addons/wow/tradeskillmaster_crafting --
-- --
-- A TradeSkillMaster Addon (http://tradeskillmaster.com) --
-- All Rights Reserved* - Detailed license information included with addon. --
-- ------------------------------------------------------------------------------ --
-- load the parent file (TSM) into a local variable and register this file as a module
local TSM = select(2, ...)
local Queue = TSM:NewModule("Queue")
local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_Crafting") -- loads the localization table
local MAX_QUEUE_STAGES = 10
local inventoryTotals = {}
local notified = {}
function Queue:ValidateOperation(operation, opName)
if not operation then return end
if operation.minRestock > operation.maxRestock then
-- invalid cause min > max restock quantity (shouldn't happen)
if not notified[opName] then
notified[opName] = true
TSM:Printf(L["'%s' is an invalid operation! Min restock of %d is higher than max restock of %d."], opName, operation.minRestock, operation.maxRestock)
end
return
end
return true
end
function Queue:CreateRestockQueue(groupInfo)
TSM:UpdateCraftReverseLookup()
local numItems = 0
for _, data in pairs(groupInfo) do
for _, opName in ipairs(data.operations) do
TSMAPI:UpdateOperation("Crafting", opName)
local opSettings = TSM.operations[opName]
if Queue:ValidateOperation(opSettings, opName) then
-- it's a valid operation
for itemString in pairs(data.items) do
itemString = TSMAPI:GetItemString(itemString)
local spellID = TSM.craftReverseLookup[itemString] and TSM.craftReverseLookup[itemString][1]
if spellID and TSM.db.factionrealm.crafts[spellID] then
local maxQueueCount = max(opSettings.maxRestock - TSM.Inventory:GetTotalQuantity(itemString), 0)
local numToQueue = 0
if not opSettings.minProfit then
-- no minimum, so queue as many as we can
numToQueue = maxQueueCount
else
-- queue it if the profit is at least the min profit
local cheapestSpellID, cost, _, profit = TSM.Cost:GetLowestCraftPrices(itemString)
local minProfit = TSM:GetCustomPrice(opSettings.minProfit, itemString)
if minProfit and profit and profit >= minProfit then
spellID = cheapestSpellID
numToQueue = maxQueueCount
end
end
local craft = TSM.db.factionrealm.crafts[spellID]
craft.queued = floor(numToQueue / craft.numResult)
craft.queued = craft.queued >= opSettings.minRestock and craft.queued or 0
if craft.queued > 0 then
numItems = numItems + 1
end
end
end
end
end
end
if numItems==0 then
TSM:Printf("There are no items to restock.")
end
TSMAPI:FireEvent("CRAFTING:QUEUE:RESTOCKED", numItems)
end
function Queue:HasLoop(itemString, steps, visited)
steps = steps + 1
if steps > 10 then return true end
if visited[itemString] then return true end
visited[itemString] = true
local craftCost = TSM:GetCustomPrice("Crafting", itemString)
local mat = TSM.db.factionrealm.mats[itemString]
local lowestCost = TSM:GetCustomPrice(mat.customValue or TSM.db.global.defaultMatCostMethod, itemString)
if craftCost and lowestCost and craftCost <= lowestCost and (not TSM.db.global.neverCraftInks or not TSMAPI.InkConversions[itemString]) then
local spellID = TSM.Cost:GetLowestCraftPrices(itemString, true)
if spellID and TSM.db.factionrealm.crafts[spellID] then
for matItemString in pairs(TSM.db.factionrealm.crafts[spellID].mats) do
if Queue:HasLoop(matItemString, steps, CopyTable(visited)) then
return true
end
end
end
end
end
function Queue:GetIntermediateCrafts(mats, usedItems, usedMats, tempMats)
local subCrafts = {}
for profession, data in pairs(mats) do
tempMats[profession] = tempMats[profession] or {}
for itemString, quantity in pairs(data) do
usedItems[itemString] = usedItems[itemString] or 0
local numHave = (inventoryTotals[itemString] or 0) - usedItems[itemString]
if TSMAPI.SOULBOUND_MATS[itemString] then
numHave = numHave + GetItemCount(itemString, true)
end
if numHave > 0 then
if numHave >= quantity then
usedItems[itemString] = usedItems[itemString] + quantity
tempMats[profession][itemString] = (tempMats[profession][itemString] or 0) + quantity
quantity = 0
mats[profession][itemString] = nil
else
usedItems[itemString] = numHave
quantity = quantity - numHave
tempMats[profession][itemString] = (tempMats[profession][itemString] or 0) + numHave
mats[profession][itemString] = mats[profession][itemString] - numHave
end
end
if quantity > 0 and not Queue:HasLoop(itemString, 0, {}) then
local mat = TSM.db.factionrealm.mats[itemString]
local craftCost = TSM:GetCustomPrice("Crafting", itemString)
local lowestCost = TSM:GetCustomPrice(mat.customValue or TSM.db.global.defaultMatCostMethod, itemString)
if craftCost and lowestCost and craftCost <= lowestCost and (not TSM.db.global.neverCraftInks or not TSMAPI.InkConversions[itemString]) then
local spellID = TSM.Cost:GetLowestCraftPrices(itemString, true)
if spellID and TSM.db.factionrealm.crafts[spellID] then
local numResult = TSM.db.factionrealm.crafts[spellID].numResult
quantity = ceil(quantity / numResult)
subCrafts[TSM.db.factionrealm.crafts[spellID].profession] = subCrafts[TSM.db.factionrealm.crafts[spellID].profession] or {}
subCrafts[TSM.db.factionrealm.crafts[spellID].profession][spellID] = (subCrafts[TSM.db.factionrealm.crafts[spellID].profession][spellID] or 0) + quantity
TSM.db.factionrealm.crafts[spellID].queued = TSM.db.factionrealm.crafts[spellID].queued + quantity
TSM.db.factionrealm.crafts[spellID].intermediateQueued = (TSM.db.factionrealm.crafts[spellID].intermediateQueued or 0) + quantity
mats[profession][itemString] = nil
usedMats[profession] = usedMats[profession] or {}
usedMats[profession][itemString] = numHave
end
end
end
end
end
local newSubCrafts
for profession, data in pairs(subCrafts) do
for spellID, quantity in pairs(data) do
newSubCrafts = true
for itemString, matQuantity in pairs(TSM.db.factionrealm.crafts[spellID].mats) do
mats[profession] = mats[profession] or {}
mats[profession][itemString] = (mats[profession][itemString] or 0) + matQuantity * quantity
end
end
end
return newSubCrafts and subCrafts
end
function Queue:GetQueue()
local tempCrafts, queuedCrafts, mats = {}, {}, {}
local totalCost, totalProfit
-- first queue up all the normally queued stuff
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
if data.intermediateQueued then
data.queued = max(data.queued - data.intermediateQueued, 0)
data.intermediateQueued = nil
end
if data.queued > 0 then
local cost, buyout, profit = TSM.Cost:GetCraftPrices(spellID)
if cost then
totalCost = (totalCost or 0) + cost * data.queued
end
if profit then
totalProfit = (totalProfit or 0) + profit * data.queued
end
tempCrafts[data.profession] = tempCrafts[data.profession] or {}
tempCrafts[data.profession][spellID] = data.queued
for itemString, quantity in pairs(data.mats) do
mats[data.profession] = mats[data.profession] or {}
mats[data.profession][itemString] = (mats[data.profession][itemString] or 0) + quantity * data.queued
end
end
end
for profession, data in pairs(tempCrafts) do
queuedCrafts[profession] = queuedCrafts[profession] or {}
tinsert(queuedCrafts[profession], 1, { crafts = data })
end
-- queue intermediate crafts
local usedItems, usedMats, tempMats = {}, {}, {}
inventoryTotals = select(4, TSM.Inventory:GetTotals())
for i = 1, MAX_QUEUE_STAGES - 1 do
local subCrafts = Queue:GetIntermediateCrafts(mats, usedItems, usedMats, tempMats)
if not subCrafts then break end
for profession, data in pairs(subCrafts) do
queuedCrafts[profession] = queuedCrafts[profession] or {}
tinsert(queuedCrafts[profession], 1, { crafts = data })
end
end
-- readd usedMats back in
for profession, data in pairs(tempMats) do
for itemString, quantity in pairs(data) do
mats[profession][itemString] = (mats[profession][itemString] or 0) + quantity
end
end
for profession, data in pairs(usedMats) do
if mats[profession] then
for itemString, quantity in pairs(data) do
mats[profession][itemString] = (mats[profession][itemString] or 0) + quantity
end
end
end
-- give each stage the appropriate name
for profession, stages in pairs(queuedCrafts) do
for i, stageInfo in ipairs(stages) do
stageInfo.name = format(L["Stage %d"], i)
end
end
totalCost = totalCost or "---"
totalProfit = totalProfit or "---"
return queuedCrafts, mats, totalCost, totalProfit
end
function Queue:ClearQueue()
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
data.queued = 0
data.intermediateQueued = nil
end
end
function Queue:addQueue(spellID, quantity)
local craft = TSM.db.factionrealm.crafts[spellID]
if not craft then return end
quantity = quantity or 1
craft.queued = craft.queued + quantity
TSM.CraftingGUI:UpdateQueue()
end
function Queue:removeQueue(spellID, quantity)
local craft = TSM.db.factionrealm.crafts[spellID]
if not craft then return end
quantity = quantity or 1
craft.queued = max(craft.queued - quantity, 0)
TSM.CraftingGUI:UpdateQueue()
end
function Queue:getQueue(spellID)
local craft = TSM.db.factionrealm.crafts[spellID]
return craft.queued
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,63 @@
-- ------------------------------------------------------------------------------ --
-- TradeSkillMaster_Crafting --
-- http://www.curse.com/addons/wow/tradeskillmaster_crafting --
-- --
-- A TradeSkillMaster Addon (http://tradeskillmaster.com) --
-- All Rights Reserved* - Detailed license information included with addon. --
-- ------------------------------------------------------------------------------ --
-- load the parent file (TSM) into a local variable and register this file as a module
local TSM = select(2, ...)
local Sync = TSM:NewModule("Sync")
local syncQueue = {}
function Sync:OnEnable()
Sync:BroadcastTradeSkillData()
end
function Sync:OpenTradeSkill()
if not TSM.isSyncing then return end
local tradeString = strsub(select(3, ("|"):split(TSM.isSyncing.link)), 2)
SetItemRef(tradeString, TSM.isSyncing.link, "LeftButton", ChatFrame1)
end
function Sync:BroadcastTradeSkillData(timerUp)
if not timerUp then
TSMAPI:CreateTimeDelay("craftingSyncDelay", 3, function() Sync:BroadcastTradeSkillData(true) end)
return
end
local player = UnitName("player")
local playerTradeSkills = TSM.db.factionrealm.tradeSkills[player]
if not playerTradeSkills then return end
local packet = {tradeSkills={}, accountKey=TSMAPI.Sync:GetAccountKey()}
for name, data in pairs(playerTradeSkills) do
if data.accountKey == TSMAPI.Sync:GetAccountKey() then
packet.tradeSkills[player.."~"..name] = data.link
end
end
TSMAPI.Sync:BroadcastData("Crafting", "TRADESKILLS", packet)
end
function Sync:ProcessTradeSkills(data)
for key, link in pairs(data.tradeSkills) do
local player, tradeSkill = ("~"):split(key)
if not (TSM.db.factionrealm.tradeSkills[player] and TSM.db.factionrealm.tradeSkills[player][tradeSkill] and TSM.db.factionrealm.tradeSkills[player][tradeSkill].link == link) then
tinsert(syncQueue, {link=link, accountKey=data.accountKey, player=player})
end
end
TSMAPI:CreateTimeDelay("craftingSyncProcessQueue", 0, Sync.ProcessQueue)
end
function Sync:ProcessQueue()
if TSM.isSyncing then return TSMAPI:CreateTimeDelay("craftingSyncProcessQueue", 0.1, Sync.ProcessQueue) end
TSM.isSyncing = tremove(syncQueue, 1)
Sync:OpenTradeSkill()
TSMAPI:CreateTimeDelay("craftingSyncProcessQueue", 1, Sync.ProcessQueue)
end
function Sync:Callback(key, data, source)
if key == "TRADESKILLS" then
Sync:ProcessTradeSkills(data)
end
end
+330
View File
@@ -0,0 +1,330 @@
-- ------------------------------------------------------------------------------ --
-- TradeSkillMaster_Crafting --
-- http://www.curse.com/addons/wow/tradeskillmaster_crafting --
-- --
-- A TradeSkillMaster Addon (http://tradeskillmaster.com) --
-- All Rights Reserved* - Detailed license information included with addon. --
-- ------------------------------------------------------------------------------ --
-- load the parent file (TSM) into a local variable and register this file as a module
local TSM = select(2, ...)
local Util = TSM:NewModule("Util")
-- local VELLUM_ID = "item:38682:0:0:0:0:0:0"
local scanTooltip
function GetTradeSkillReagentItemLink(skillIndex, reagentLink)
if not scanTooltip then
scanTooltip = CreateFrame("GameTooltip", "TSMCraftingScanTooltip", UIParent, "GameTooltipTemplate")
scanTooltip:SetOwner(UIParent, "ANCHOR_NONE")
end
scanTooltip:ClearLines()
scanTooltip:SetTradeSkillItem(skillIndex, reagentLink)
return select(2, scanTooltip:GetItem())
end
function Util:IsProfessionReady()
if GetTradeSkillLine() == "UNKNOWN" or not GetNumTradeSkills() or GetNumTradeSkills() <= 0 or InCombatLockdown() then
return
end
for index=1, GetNumTradeSkills() do
local itemLink = GetTradeSkillItemLink(index)
local spellLink = GetTradeSkillRecipeLink(index)
if itemLink and spellLink and strfind(spellLink, "enchant:") then
local spellID, itemID, craftName
if strfind(itemLink, "enchant:") then
-- result of craft is enchant
spellID = Util:GetSpellID(index)
itemID = TSM.enchantingItemIDs[spellID] and "item:"..TSM.enchantingItemIDs[spellID]..":0:0:0:0:0:0"
elseif strfind(itemLink, "item:") then
-- result of craft is item
itemID = TSMAPI:GetItemString(itemLink)
spellID = Util:GetSpellID(index)
else
return
end
if itemID and spellID then
for i=1, GetTradeSkillNumReagents(index) do
local link = GetTradeSkillReagentItemLink(index, i)
local name, _, quantity = GetTradeSkillReagentInfo(index, i)
if not name or not link then
return
end
end
end
end
end
return true
end
function Util:ScanCurrentProfession()
if not Util:IsProfessionReady() then return TSMAPI:CreateTimeDelay("craftingScanDelay", 0.1, Util.ScanCurrentProfession) end
local newCrafts = {}
local playerName = UnitName("player")
local currentTradeSkill = GetTradeSkillLine()
local subClasses = {GetTradeSkillSubClasses()}
local currentSubClass = 0
local usedItems = {}
local presetGroupInfo = {}
local reagentLinkCache = {}
for index=1, GetNumTradeSkills() do
local itemLink = GetTradeSkillItemLink(index)
local spellLink = GetTradeSkillRecipeLink(index)
if not itemLink then
local skillName, skillType = GetTradeSkillInfo(index)
if skillType == "header" then
for j=1, #subClasses do
if skillName == subClasses[j] then
currentSubClass = j
break
end
end
end
elseif spellLink and strfind(spellLink, "enchant:") then
local spellID, itemID, craftName
if strfind(itemLink, "enchant:") then
-- result of craft is enchant
spellID = Util:GetSpellID(index)
itemID = TSM.enchantingItemIDs[spellID] and "item:"..TSM.enchantingItemIDs[spellID]..":0:0:0:0:0:0"
craftName = GetSpellInfo(spellID)
elseif strfind(itemLink, "item:") then
-- result of craft is item
itemID = TSMAPI:GetItemString(itemLink)
craftName = TSMAPI:GetSafeItemInfo(itemLink)
spellID = Util:GetSpellID(index)
end
if itemID and spellID then
local lNum, hNum = GetTradeSkillNumMade(index)
local numMade = floor(((lNum or 1) + (hNum or 1))/2)
local hasCD = select(2, GetTradeSkillCooldown(index)) and true or nil
local mats = {}
if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then
local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0"
mats[VellumString] = 1
local name = TSMAPI:GetSafeItemInfo(VellumString) or nil
TSM.db.factionrealm.mats[VellumString] = TSM.db.factionrealm.mats[VellumString] or {}
TSM.db.factionrealm.mats[VellumString].name = TSM.db.factionrealm.mats[VellumString].name or name
numMade = 1
end
local isValid = true
for i=1, GetTradeSkillNumReagents(index) do
local name, texture, quantity = GetTradeSkillReagentInfo(index, i)
if not name then
isValid = false
break
end
if not reagentLinkCache[name.."\001"..texture] then
reagentLinkCache[name.."\001"..texture] = GetTradeSkillReagentItemLink(index, i)
end
local matID = TSMAPI:GetItemString(reagentLinkCache[name.."\001"..texture])
if not matID then
isValid = false
break
end
mats[matID] = quantity
TSM.db.factionrealm.mats[matID] = TSM.db.factionrealm.mats[matID] or {}
TSM.db.factionrealm.mats[matID].name = TSM.db.factionrealm.mats[matID].name or name
end
if isValid then
local players = TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].players or {}
players[playerName] = true
local queued = TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].queued or 0
local intermediateQueued = TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].intermediateQueued or nil
newCrafts[spellID] = {name=craftName, itemID=itemID, mats=mats, hasCD=hasCD, numResult=numMade, queued=queued, intermediateQueued=intermediateQueued, players=players, profession=currentTradeSkill}
if not usedItems[itemID] then
usedItems[itemID] = true
local itemString = TSMAPI:GetItemString(itemID)
if itemString then
for matItemString in pairs(mats) do
if not presetGroupInfo[matItemString] then
presetGroupInfo[matItemString] = TSMAPI:JoinGroupPath("Professions", currentTradeSkill, "Materials")
end
end
presetGroupInfo[itemString] = TSMAPI:JoinGroupPath("Professions", currentTradeSkill, "Crafts")
end
end
end
end
end
end
-- search for and remove any spells that we can't craft anymore
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
if data.profession == currentTradeSkill then
local hasCrafters = false
for player in pairs(data.players) do
if player ~= playerName or newCrafts[spellID] then
hasCrafters = true
break
end
end
if not hasCrafters then
TSM.db.factionrealm.crafts[spellID] = nil
end
end
end
-- save the new craft info
for spellID, data in pairs(newCrafts) do
TSM.db.factionrealm.crafts[spellID] = data
end
TSM.CraftingGUI:PromptPresetGroups(currentTradeSkill, presetGroupInfo) --Bugged, asks after every login. Not saving prompt result between sessions. Either saving or loading bug (works fine on /reload though).
end
function Util:StartScanSyncedProfessionThread()
local function callback()
TradeSkillFrame:Show()
CloseTradeSkill()
TSM.isSyncing = nil
end
TSMAPI.Threading:Start(Util.ScanSyncedProfessionThread, 0.5, callback)
end
function Util.ScanSyncedProfessionThread(self)
local ready
for i=1, 10 do
if Util:IsProfessionReady() then
ready = true
break
end
self:Sleep(0.1)
end
if not ready then return end
local newCrafts = {}
local reagentLinkCache = {}
local _, playerName = IsTradeSkillLinked()
local currentTradeSkill = GetTradeSkillLine()
if playerName ~= TSM.isSyncing.player then return end
for index=1, GetNumTradeSkills() do
local itemLink = GetTradeSkillItemLink(index)
local spellLink = GetTradeSkillRecipeLink(index)
if itemLink and spellLink and strfind(spellLink, "enchant:") then
local spellID, itemID, craftName
if strfind(itemLink, "enchant:") then
-- result of craft is enchant
spellID = Util:GetSpellID(index)
itemID = TSM.enchantingItemIDs[spellID] and "item:"..TSM.enchantingItemIDs[spellID]..":0:0:0:0:0:0"
craftName = GetSpellInfo(spellID)
elseif strfind(itemLink, "item:") then
-- result of craft is item
itemID = TSMAPI:GetItemString(itemLink)
craftName = TSMAPI:GetSafeItemInfo(itemLink)
spellID = Util:GetSpellID(index)
end
if itemID and spellID then
local lNum, hNum = GetTradeSkillNumMade(index)
local numMade = floor(((lNum or 1) + (hNum or 1))/2)
local hasCD = select(2, GetTradeSkillCooldown(index)) and true or nil
local mats = {}
if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then
local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0"
mats[VellumString] = 1
local name = TSMAPI:GetSafeItemInfo(VellumString) or nil
TSM.db.factionrealm.mats[VellumString] = TSM.db.factionrealm.mats[VellumString] or {}
TSM.db.factionrealm.mats[VellumString].name = TSM.db.factionrealm.mats[VellumString].name or name
numMade = 1
end
local isValid = true
for i=1, GetTradeSkillNumReagents(index) do
local name, texture, quantity = GetTradeSkillReagentInfo(index, i)
if not name then
isValid = false
break
end
if not reagentLinkCache[name.."\001"..texture] then
reagentLinkCache[name.."\001"..texture] = GetTradeSkillReagentItemLink(index, i)
end
local matID = TSMAPI:GetItemString(reagentLinkCache[name.."\001"..texture])
if not matID then
isValid = false
break
end
mats[matID] = quantity
TSM.db.factionrealm.mats[matID] = TSM.db.factionrealm.mats[matID] or {}
TSM.db.factionrealm.mats[matID].name = TSM.db.factionrealm.mats[matID].name or name
end
if isValid then
local players = TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].players or {}
players[playerName] = true
local queued = TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].queued or 0
local intermediateQueued = TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].intermediateQueued or nil
newCrafts[spellID] = {name=craftName, itemID=itemID, mats=mats, hasCD=hasCD, numResult=numMade, queued=queued, intermediateQueued=intermediateQueued, players=players, profession=currentTradeSkill}
end
end
end
self:Yield()
if currentTradeSkill ~= GetTradeSkillLine() or select(2, IsTradeSkillLinked()) ~= TSM.isSyncing.player then return end
end
-- search for and remove any spells that we can't craft anymore
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
if data.profession == currentTradeSkill then
local hasCrafters = false
for player in pairs(data.players) do
if player ~= playerName or newCrafts[spellID] then
hasCrafters = true
break
end
end
if not hasCrafters then
TSM.db.factionrealm.crafts[spellID] = nil
end
end
end
-- save the new craft info
for spellID, data in pairs(newCrafts) do
TSM.db.factionrealm.crafts[spellID] = data
end
local playerName = select(2, IsTradeSkillLinked())
local skillName, level, maxLevel = GetTradeSkillLine()
TSM.db.factionrealm.tradeSkills[playerName] = TSM.db.factionrealm.tradeSkills[playerName] or {}
TSM.db.factionrealm.tradeSkills[playerName][skillName] = TSM.db.factionrealm.tradeSkills[playerName][skillName] or {}
TSM.db.factionrealm.tradeSkills[playerName][skillName].link = TSM.isSyncing.link
TSM.db.factionrealm.tradeSkills[playerName][skillName].accountKey = TSM.isSyncing.accountKey
TSM.db.factionrealm.tradeSkills[playerName][skillName].level = level
TSM.db.factionrealm.tradeSkills[playerName][skillName].maxLevel = maxLevel
end
function Util:GetSpellID(index)
local spellLink = GetTradeSkillRecipeLink(index)
if not spellLink then return end
return TSMAPI:GetItemID(spellLink)
end
function Util:FormatTime(seconds)
if seconds == 0 then return end
local hours = floor(seconds/3600)
local mins = floor((seconds%3600)/60)
local secs = seconds % 60
local str = ""
if hours > 0 then
str = str..format("%dh", hours)
end
if mins > 0 then
str = str..format("%dm", mins)
end
if secs > 0 then
str = str..format("%ds", secs)
end
return str
end
@@ -0,0 +1,312 @@
-- load the parent file (TSM) into a local variable
local TSM = select(2, ...)
TSM.VellumInfo = {
[7418] = 52510,
[7420] = 52510,
[7426] = 52510,
[7428] = 52510,
[7443] = 52510,
[7454] = 52510,
[7457] = 52510,
[7745] = 52511,
[7748] = 52510,
[7766] = 52510,
[7771] = 52510,
[7776] = 52510,
[7779] = 52510,
[7782] = 52510,
[7786] = 52511,
[7788] = 52511,
[7793] = 52511,
[7857] = 52510,
[7859] = 52510,
[7861] = 52510,
[7863] = 52510,
[7867] = 52510,
[13378] = 52510,
[13380] = 52511,
[13419] = 52510,
[13421] = 52510,
[13464] = 52510,
[13485] = 52510,
[13501] = 52510,
[13503] = 52511,
[13522] = 52510,
[13529] = 52511,
[13536] = 52510,
[13538] = 52510,
[13607] = 52510,
[13612] = 52510,
[13617] = 52510,
[13620] = 52510,
[13622] = 52510,
[13626] = 52510,
[13631] = 52510,
[13635] = 52510,
[13637] = 52510,
[13640] = 52510,
[13642] = 52510,
[13644] = 52510,
[13646] = 52510,
[13648] = 52510,
[13653] = 52511,
[13655] = 52511,
[13657] = 52510,
[13659] = 52510,
[13661] = 52510,
[13663] = 52510,
[13687] = 52510,
[13689] = 52510,
[13693] = 52511,
[13695] = 52511,
[13698] = 52510,
[13700] = 52510,
[13746] = 52510,
[13794] = 52510,
[13815] = 52510,
[13817] = 52510,
[13822] = 52510,
[13836] = 52510,
[13841] = 52510,
[13846] = 52510,
[13858] = 52510,
[13868] = 52510,
[13882] = 52510,
[13887] = 52510,
[13890] = 52510,
[13898] = 52511,
[13905] = 52510,
[13915] = 52511,
[13917] = 52510,
[13931] = 52510,
[13933] = 52510,
[13935] = 52510,
[13937] = 52511,
[13939] = 52510,
[13941] = 52510,
[13943] = 52511,
[13945] = 52510,
[13947] = 52510,
[13948] = 52510,
[20008] = 52510,
[20009] = 52510,
[20010] = 52510,
[20011] = 52510,
[20012] = 52510,
[20013] = 52510,
[20014] = 52510,
[20015] = 52510,
[20016] = 52510,
[20017] = 52510,
[20020] = 52510,
[20023] = 52510,
[20024] = 52510,
[20025] = 52510,
[20026] = 52510,
[20028] = 52510,
[20029] = 52511,
[20030] = 52511,
[20031] = 52511,
[20032] = 52511,
[20033] = 52511,
[20034] = 52511,
[20035] = 52511,
[20036] = 52511,
[21931] = 52511,
[22749] = 52511,
[22750] = 52511,
[23799] = 52511,
[23800] = 52511,
[23801] = 52510,
[23802] = 52510,
[23803] = 52511,
[23804] = 52511,
[25072] = 52510,
[25073] = 52510,
[25074] = 52510,
[25078] = 52510,
[25079] = 52510,
[25080] = 52510,
[25081] = 52510,
[25082] = 52510,
[25083] = 52510,
[25084] = 52510,
[25086] = 52510,
[27837] = 52511,
[27899] = 52510,
[27905] = 52510,
[27906] = 52510,
[27911] = 52510,
[27913] = 52510,
[27914] = 52510,
[27917] = 52510,
[27944] = 52510,
[27945] = 52510,
[27946] = 52510,
[27947] = 52510,
[27948] = 52510,
[27950] = 52510,
[27951] = 52510,
[27954] = 52510,
[27957] = 52510,
[27958] = 52510,
[27960] = 52510,
[27961] = 52510,
[27962] = 52510,
[27967] = 52511,
[27968] = 52511,
[27971] = 52511,
[27972] = 52511,
[27975] = 52511,
[27977] = 52511,
[27981] = 52511,
[27982] = 52511,
[27984] = 52511,
[28003] = 52511,
[28004] = 52511,
[33990] = 52510,
[33991] = 52510,
[33992] = 52510,
[33993] = 52510,
[33994] = 52510,
[33995] = 52510,
[33996] = 52510,
[33997] = 52510,
[33999] = 52510,
[34001] = 52510,
[34002] = 52510,
[34003] = 52510,
[34004] = 52510,
[34005] = 52510,
[34006] = 52510,
[34007] = 52510,
[34008] = 52510,
[34009] = 52510,
[34010] = 52511,
[42620] = 52511,
[42974] = 52511,
[44383] = 52510,
[44483] = 52510,
[44484] = 52510,
[44488] = 52510,
[44489] = 52510,
[44492] = 52510,
[44494] = 52510,
[44500] = 52510,
[44506] = 52510,
[44508] = 52510,
[44509] = 52510,
[44510] = 52511,
[44513] = 52510,
[44524] = 52511,
[44528] = 52510,
[44529] = 52510,
[44555] = 52510,
[44556] = 52510,
[44575] = 52510,
[44576] = 52511,
[44582] = 52510,
[44584] = 52510,
[44588] = 52510,
[44589] = 52510,
[44590] = 52510,
[44591] = 52510,
[44592] = 52510,
[44593] = 52510,
[44595] = 52511,
[44596] = 52510,
[44598] = 52510,
[44612] = 52510,
[44616] = 52510,
[44621] = 52511,
[44623] = 52510,
[44625] = 52510,
[44629] = 52511,
[44630] = 52511,
[44631] = 52510,
[44633] = 52511,
[44635] = 52510,
[46578] = 52511,
[46594] = 52510,
[47051] = 52510,
[47672] = 52510,
[47766] = 52510,
[47898] = 52510,
[47899] = 52510,
[47900] = 52510,
[47901] = 52510,
[59619] = 52511,
[59621] = 52511,
[59625] = 52511,
[60606] = 52510,
[60609] = 52510,
[60616] = 52510,
[60621] = 52511,
[60623] = 52510,
[60653] = 52510,
[60663] = 52510,
[60668] = 52510,
[60691] = 52511,
[60692] = 52510,
[60707] = 52511,
[60714] = 52511,
[60763] = 52510,
[60767] = 52510,
[62256] = 52510,
[62257] = 52511,
[62948] = 52511,
[62959] = 52511,
[63746] = 52510,
[64441] = 52511,
[64579] = 52511,
[71692] = 52510,
[968676] = 52511,
[968677] = 52511,
[968678] = 52511,
[968679] = 52511,
[968680] = 52511,
[968681] = 52511,
[968682] = 52511,
[968683] = 52511,
[968684] = 52511,
[968685] = 52511,
[968686] = 52511,
[968687] = 52511,
[968688] = 52511,
[968689] = 52511,
[968690] = 52511,
[968691] = 52511,
[968692] = 52511,
[968693] = 52511,
[968694] = 52511,
[968695] = 52511,
[968696] = 52511,
[968697] = 52511,
[968698] = 52511,
[968699] = 52511,
[968700] = 52511,
[968701] = 52511,
[968702] = 52511,
[968770] = 52511,
[968771] = 52511,
[1968677] = 52511,
[1968678] = 52511,
[1968680] = 52511,
[1968681] = 52511,
[1968683] = 52511,
[1968684] = 52511,
[1968686] = 52511,
[1968687] = 52511,
[1968689] = 52511,
[1968690] = 52511,
[1968692] = 52511,
[1968693] = 52511,
[1968695] = 52511,
[1968696] = 52511,
[1968698] = 52511,
[1968699] = 52511,
[1968701] = 52511,
[1968702] = 52511,
[1968770] = 52511,
[1968771] = 52511}