Enchanting fixes, reverted Crafting module to previous version that s… (#1)
* Enchanting fixes, reverted Crafting module to previous version that supports Ascension specific crafts and Vellums. * Updated enchanting names from DB * Added the remaining Ascension specific recipes * Replace SpellNames2IDs.lua with UnitCastingSpellID * Bugfix: Ascension uses exact quality QueryAuctionItems, TSM was designed for quality or higher * Bugfix: Properly get list of Professions via index * Replaced factionrealm with realm Ascension does not have strict faction seperation * GetTradeSkillCooldown -> SpellHasBaseCooldown GetTradeSkillCooldown only tells you if a spell is on CD, not if it has a CD Data is from DB, which isn't populated fully yet. * Implement backported API GetSpellBaseCooldown * bugfix: hasCD is nil if no cd, not 0
This commit is contained in:
@@ -15,7 +15,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("TradeSkillMaster_Crafting") -- loa
|
||||
local currentVisited = {}
|
||||
local cache = { time = 0 }
|
||||
function Cost:GetMatCost(itemString)
|
||||
local mat = TSM.db.factionrealm.mats[itemString]
|
||||
local mat = TSM.db.realm.mats[itemString]
|
||||
if not mat then return end
|
||||
|
||||
if cache.time < (time() - 1) then
|
||||
@@ -37,8 +37,8 @@ end
|
||||
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
|
||||
if not TSM.db.realm.crafts[itemString] then return end
|
||||
itemString = TSM.db.realm.crafts[itemString].itemID
|
||||
end
|
||||
if type(itemString) ~= "string" then return end
|
||||
local operation = TSMAPI:GetItemOperation(itemString, "Crafting")
|
||||
@@ -56,7 +56,7 @@ function Cost:GetCraftCost(itemID)
|
||||
spellIDs = TSM.craftReverseLookup[TSMAPI:GetBaseItemstring(itemID)]
|
||||
elseif type(itemID) == "number" then
|
||||
-- we got passed a spell
|
||||
if TSM.db.factionrealm.crafts[itemID] then
|
||||
if TSM.db.realm.crafts[itemID] then
|
||||
spellIDs = { itemID }
|
||||
end
|
||||
end
|
||||
@@ -64,20 +64,20 @@ function Cost:GetCraftCost(itemID)
|
||||
|
||||
local lowestCost
|
||||
for _, spellID in ipairs(spellIDs) do
|
||||
local craft = TSM.db.factionrealm.crafts[spellID]
|
||||
local craft = TSM.db.realm.crafts[spellID]
|
||||
local cost, costIsValid = 0, true
|
||||
if #spellIDs >= 2 and TSM.db.global.ignoreCDCraftCost and TSM.db.factionrealm.crafts[spellID].hasCD then
|
||||
if #spellIDs >= 2 and TSM.db.global.ignoreCDCraftCost and TSM.db.realm.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
|
||||
-- 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
|
||||
@@ -119,15 +119,15 @@ function Cost:GetLowestCraftPrices(itemString, intermediate)
|
||||
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
|
||||
if TSM.db.realm.crafts[spellID] then
|
||||
if intermediate and (TSM.db.realm.crafts[spellID].mats[soh] or TSM.db.realm.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 TSM.db.realm.crafts[spellID].hasCD then
|
||||
if TSMAPI.SOULBOUND_MATS[itemString] or #spellIDs == 1 then
|
||||
lowestCost = cost
|
||||
cheapestSpellID = spellID
|
||||
@@ -136,7 +136,7 @@ function Cost:GetLowestCraftPrices(itemString, intermediate)
|
||||
lowestCost = cost
|
||||
cheapestSpellID = spellID
|
||||
end
|
||||
elseif not TSM.db.factionrealm.crafts[spellID].hasCD then
|
||||
elseif not TSM.db.realm.crafts[spellID].hasCD then
|
||||
lowestCost = cost
|
||||
cheapestSpellID = spellID
|
||||
end
|
||||
|
||||
@@ -85,6 +85,7 @@ function GUI:OnEnable()
|
||||
GUI:RegisterEvent("TRADE_SKILL_FILTER_UPDATE", "EventHandler")
|
||||
GUI:RegisterEvent("UPDATE_TRADESKILL_RECAST", "EventHandler")
|
||||
GUI:RegisterEvent("CHAT_MSG_SKILL", "EventHandler")
|
||||
GUI:RegisterEvent("UNIT_SPELLCAST_START", "EventHandler")
|
||||
GUI:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "EventHandler")
|
||||
GUI:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "EventHandler")
|
||||
GUI:RegisterEvent("UNIT_SPELLCAST_FAILED", "EventHandler")
|
||||
@@ -116,7 +117,7 @@ function GUI:OnEnable()
|
||||
|
||||
GUI:UpdateTradeSkills()
|
||||
GUI.gatheringFrame = GUI:CreateGatheringFrame()
|
||||
if next(TSM.db.factionrealm.gathering.neededMats) then
|
||||
if next(TSM.db.realm.gathering.neededMats) then
|
||||
TSMAPI:CreateTimeDelay("gatheringShowThrottle", 0.3, GUI:ShowGatheringFrame())
|
||||
end
|
||||
end
|
||||
@@ -203,7 +204,7 @@ end
|
||||
function GUI:OpenFirstProfession()
|
||||
TSM.db.global.showingDefaultFrame = nil
|
||||
local link
|
||||
for playerName, professions in pairs(TSM.db.factionrealm.tradeSkills) do
|
||||
for playerName, professions in pairs(TSM.db.realm.tradeSkills) do
|
||||
for _, data in pairs(professions) do
|
||||
link = data.link
|
||||
if link then break end
|
||||
@@ -244,22 +245,25 @@ function GUI:EventHandler(event, ...)
|
||||
GUI.frame.content.professionsTab.craftInfoFrame.buttonsFrame.inputBox:SetNumber(GetTradeskillRepeatCount())
|
||||
elseif event == "CHAT_MSG_SKILL" and not IsTradeSkillLinked() then
|
||||
local skillName, level, maxLevel = GetTradeSkillLine()
|
||||
if skillName and skillName ~= "UNKNOWN" and TSM.db.factionrealm.tradeSkills[UnitName("player")] and TSM.db.factionrealm.tradeSkills[UnitName("player")][skillName] then
|
||||
TSM.db.factionrealm.tradeSkills[UnitName("player")][skillName].level = level
|
||||
TSM.db.factionrealm.tradeSkills[UnitName("player")][skillName].maxLevel = maxLevel
|
||||
if skillName and skillName ~= "UNKNOWN" and TSM.db.realm.tradeSkills[UnitName("player")] and TSM.db.realm.tradeSkills[UnitName("player")][skillName] then
|
||||
TSM.db.realm.tradeSkills[UnitName("player")][skillName].level = level
|
||||
TSM.db.realm.tradeSkills[UnitName("player")][skillName].maxLevel = maxLevel
|
||||
end
|
||||
elseif event == "UNIT_SPELLCAST_START" then
|
||||
local unit = ...
|
||||
if unit ~= "player" then return end
|
||||
TSM.currentspell = UnitCastingSpellID("player")
|
||||
elseif event == "UNIT_SPELLCAST_SUCCEEDED" then
|
||||
-- local unit, _, _, _, spellID = ... -- parameter ... doesn't provide spellID in 3.3.5a
|
||||
local unit, spellName = ...
|
||||
local spellID = TSM.SpellName2ID[spellName]
|
||||
|
||||
-- we only care about our spells
|
||||
local unit = ...
|
||||
if unit ~= "player" then return end
|
||||
-- if spell is not related to crafting, ignore
|
||||
local craft = TSM.currentspell and TSM.db.realm.crafts[TSM.currentspell]
|
||||
if not craft then return end
|
||||
-- if spellID == nil then
|
||||
-- TSM:Printf("Could not find spellID for %s", spellName)
|
||||
-- end
|
||||
|
||||
local craft = spellID and TSM.db.factionrealm.crafts[spellID]
|
||||
if unit ~= "player" or not craft then return end
|
||||
|
||||
-- decrements the number of this craft that are queued to be crafted
|
||||
craft.queued = craft.queued - 1
|
||||
if GUI.isCrafting and GUI.isCrafting.quantity > 0 then
|
||||
@@ -268,19 +272,17 @@ function GUI:EventHandler(event, ...)
|
||||
--GUI:UpdateQueue()
|
||||
end
|
||||
end
|
||||
|
||||
TSM.currentspell = nil
|
||||
-- TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue)
|
||||
elseif event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED" or event == "UNIT_SPELLCAST_FAILED_QUIET" then
|
||||
-- local unit, _, _, _, spellID = ... -- parameter ... doesn't provide spellID in 3.3.5a
|
||||
local unit, spellName = ...
|
||||
local spellID = TSM.SpellName2ID[spellName]
|
||||
local unit = ...
|
||||
if unit ~= "player" then return end
|
||||
|
||||
-- if spellID == nil then
|
||||
-- TSM:Printf("Could not find spellID for %s", spellName)
|
||||
-- end
|
||||
|
||||
if unit ~= "player" then return end
|
||||
if GUI.isCrafting and spellID == GUI.isCrafting.spellID then
|
||||
if GUI.isCrafting and TSM.currentspell == GUI.isCrafting.spellID then
|
||||
GUI.isCrafting.quantity = 0
|
||||
TSMAPI:CreateTimeDelay("craftingQueueUpdateThrottle", 0.2, GUI.UpdateQueue)
|
||||
end
|
||||
@@ -308,7 +310,7 @@ function GUI:UpdateTradeSkills()
|
||||
local skillName, header
|
||||
local tradeSkill1, tradeSkill2, cook, firstAid
|
||||
|
||||
for i = 5, 8 do
|
||||
for i = 1, GetNumSkillLines() do
|
||||
skillName = GetSkillLineInfo(i)
|
||||
if skillName == "Professions" then --TRADE_SKILLS ) then
|
||||
tradeSkill1, header = GetSkillLineInfo(i + 1);
|
||||
@@ -324,14 +326,7 @@ function GUI:UpdateTradeSkills()
|
||||
else
|
||||
tradeSkill2=i+2
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for i = 5, 10 do
|
||||
skillName = GetSkillLineInfo(i)
|
||||
if skillName == "Cooking" then
|
||||
elseif skillName == "Cooking" then
|
||||
cook = i
|
||||
elseif skillName == "First Aid" then
|
||||
firstAid = i
|
||||
@@ -342,31 +337,31 @@ function GUI:UpdateTradeSkills()
|
||||
local playerName = UnitName("player")
|
||||
|
||||
if not playerName then return end
|
||||
TSM.db.factionrealm.tradeSkills[playerName] = TSM.db.factionrealm.tradeSkills[playerName] or {}
|
||||
TSM.db.realm.tradeSkills[playerName] = TSM.db.realm.tradeSkills[playerName] or {}
|
||||
-- SpellBook_UpdateProfTab()
|
||||
|
||||
-- local tradeSkill1, tradeSkill2, _, _, cook, firstAid = GetProfessions() -- GetProfessions API added in Cata
|
||||
-- local btns = { PrimaryProfession1SpellButtonBottom, PrimaryProfession2SpellButtonBottom, SecondaryProfession3SpellButtonRight, SecondaryProfession4SpellButtonRight }
|
||||
local old = TSM.db.factionrealm.tradeSkills[playerName]
|
||||
--TSM.db.factionrealm.tradeSkills[playerName] = {}
|
||||
local old = TSM.db.realm.tradeSkills[playerName]
|
||||
--TSM.db.realm.tradeSkills[playerName] = {}
|
||||
-- for i, id in pairs({ "tradeSkill1", "tradeSkill2", "cook", "firstAid" }) do
|
||||
for i, id in pairs({ tradeSkill1, tradeSkill2, cook, firstAid }) do -- needs to be pairs since may not be continuous indices
|
||||
-- if not btns[i]:GetParent().missingHeader:IsVisible() then
|
||||
-- local skillName, _, level, maxLevel = GetProfessionInfo(id) -- Also added in Cata
|
||||
local skillName, _, _, skillRank, _, _, skillMaxRank = GetSkillLineInfo(id)
|
||||
if skillName ~= nil then
|
||||
TSM.db.factionrealm.tradeSkills[playerName][skillName] = old[skillName] or {}
|
||||
TSM.db.factionrealm.tradeSkills[playerName][skillName].level = skillRank
|
||||
TSM.db.factionrealm.tradeSkills[playerName][skillName].maxLevel = skillMaxRank
|
||||
TSM.db.factionrealm.tradeSkills[playerName][skillName].isSecondary = (i > 2) and true
|
||||
TSM.db.realm.tradeSkills[playerName][skillName] = old[skillName] or {}
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].level = skillRank
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].maxLevel = skillMaxRank
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].isSecondary = (i > 2) and true
|
||||
|
||||
-- local spellBookSlot = btns[i]:GetID() + btns[i]:GetParent().spellOffset
|
||||
local _, link = GetSpellLink(skillName)
|
||||
if link then
|
||||
TSM.db.factionrealm.tradeSkills[playerName][skillName].link = link
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].link = link
|
||||
if skillName == GetTradeSkillLine() and i <= 2 and not TSM.isSyncing then
|
||||
TSM.db.factionrealm.tradeSkills[playerName][skillName].account = nil
|
||||
TSM.db.factionrealm.tradeSkills[playerName][skillName].accountKey = TSMAPI.Sync:GetAccountKey()
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].account = nil
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].accountKey = TSMAPI.Sync:GetAccountKey()
|
||||
TSM.Sync:BroadcastTradeSkillData()
|
||||
end
|
||||
end
|
||||
@@ -375,18 +370,18 @@ function GUI:UpdateTradeSkills()
|
||||
end
|
||||
|
||||
--tidy up crafts if player unlearned a profession
|
||||
for spellid, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellid, data in pairs(TSM.db.realm.crafts) do
|
||||
for player in pairs(data.players) do
|
||||
if not TSM.db.factionrealm.tradeSkills[player] or not TSM.db.factionrealm.tradeSkills[player][data.profession] then
|
||||
TSM.db.factionrealm.crafts[spellid].players[player] = nil
|
||||
if not TSM.db.realm.tradeSkills[player] or not TSM.db.realm.tradeSkills[player][data.profession] then
|
||||
TSM.db.realm.crafts[spellid].players[player] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--remove craft if no players
|
||||
for spellid, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellid, data in pairs(TSM.db.realm.crafts) do
|
||||
if not next(data.players) then
|
||||
TSM.db.factionrealm.crafts[spellid] = nil
|
||||
TSM.db.realm.crafts[spellid] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -613,7 +608,7 @@ function GUI:CreateQueueFrame(parent)
|
||||
GameTooltip:SetOwner(self, "ANCHOR_NONE")
|
||||
-- GameTooltip:SetPoint("LEFT", self, "RIGHT")
|
||||
GameTooltip:SetPoint("LEFT", self, "LEFT")
|
||||
GameTooltip:AddLine(TSM.db.factionrealm.crafts[data.spellID].name .. " (x" .. data.numQueued .. ")")
|
||||
GameTooltip:AddLine(TSM.db.realm.crafts[data.spellID].name .. " (x" .. data.numQueued .. ")")
|
||||
|
||||
local cost = TSM.Cost:GetCraftPrices(data.spellID)
|
||||
if data.profit then
|
||||
@@ -665,8 +660,8 @@ function GUI:CreateQueueFrame(parent)
|
||||
end
|
||||
end
|
||||
|
||||
for itemID, matQuantity in pairs(TSM.db.factionrealm.crafts[data.spellID].mats) do
|
||||
local name = TSMAPI:GetSafeItemInfo(itemID) or (TSM.db.factionrealm.mats[itemID] and TSM.db.factionrealm.mats[itemID].name) or "?"
|
||||
for itemID, matQuantity in pairs(TSM.db.realm.crafts[data.spellID].mats) do
|
||||
local name = TSMAPI:GetSafeItemInfo(itemID) or (TSM.db.realm.mats[itemID] and TSM.db.realm.mats[itemID].name) or "?"
|
||||
|
||||
local itemIDx = itemID
|
||||
|
||||
@@ -675,19 +670,13 @@ function GUI:CreateQueueFrame(parent)
|
||||
if strfind(name, "Vellum") then
|
||||
velName = name
|
||||
end
|
||||
if (velName ~= nil) and (not strfind(velName, "III")) then
|
||||
local VellumReplacePrice = TSM.Cost:GetMatCost(itemIDx)
|
||||
|
||||
if strfind(velName, "Weapon Vellum") then
|
||||
if VellumReplacePrice > TSM.Cost:GetMatCost("item:43146:0:0:0:0:0:0") then
|
||||
itemIDx = "item:43146:0:0:0:0:0:0"
|
||||
name = TSMAPI:GetSafeItemInfo(itemIDx)
|
||||
end
|
||||
if (velName ~= nil) then
|
||||
if strfind(velName, "Weapon") then
|
||||
itemIDx = "item:52511:0:0:0:0:0:0"
|
||||
name = TSMAPI:GetSafeItemInfo(itemIDx)
|
||||
else
|
||||
if VellumReplacePrice > TSM.Cost:GetMatCost("item:43145:0:0:0:0:0:0") then
|
||||
itemIDx = "item:43145:0:0:0:0:0:0"
|
||||
name = TSMAPI:GetSafeItemInfo(itemIDx)
|
||||
end
|
||||
itemIDx = "item:52510:0:0:0:0:0:0"
|
||||
name = TSMAPI:GetSafeItemInfo(itemIDx)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -716,9 +705,9 @@ function GUI:CreateQueueFrame(parent)
|
||||
else
|
||||
if data.isTitle then
|
||||
if data.stage then
|
||||
TSM.db.factionrealm.queueStatus.collapsed[data.profession .. data.stage] = not TSM.db.factionrealm.queueStatus.collapsed[data.profession .. data.stage]
|
||||
TSM.db.realm.queueStatus.collapsed[data.profession .. data.stage] = not TSM.db.realm.queueStatus.collapsed[data.profession .. data.stage]
|
||||
else
|
||||
TSM.db.factionrealm.queueStatus.collapsed[data.profession] = not TSM.db.factionrealm.queueStatus.collapsed[data.profession]
|
||||
TSM.db.realm.queueStatus.collapsed[data.profession] = not TSM.db.realm.queueStatus.collapsed[data.profession]
|
||||
end
|
||||
GUI:UpdateQueue()
|
||||
elseif data.index then
|
||||
@@ -825,10 +814,10 @@ function GUI:CreateQueueFrame(parent)
|
||||
GUI:UpdateGatherSelectionWindow()
|
||||
if GUI.gatheringFrame:IsShown() then
|
||||
GUI.gatheringFrame:Hide()
|
||||
TSM.db.factionrealm.gathering.crafter = nil
|
||||
TSM.db.factionrealm.gathering.neededMats = {}
|
||||
TSM.db.factionrealm.gathering.gatheredMats = false
|
||||
TSM.db.factionrealm.sourceStatus.collapsed = {}
|
||||
TSM.db.realm.gathering.crafter = nil
|
||||
TSM.db.realm.gathering.neededMats = {}
|
||||
TSM.db.realm.gathering.gatheredMats = false
|
||||
TSM.db.realm.sourceStatus.collapsed = {}
|
||||
end
|
||||
end)
|
||||
frame.clearBtn = btn
|
||||
@@ -962,7 +951,7 @@ function GUI:CreateProfessionsTab(parent)
|
||||
local player = UnitName("player")
|
||||
local function UpdateProfession(self)
|
||||
local list = {}
|
||||
for playerName, professionData in pairs(TSM.db.factionrealm.tradeSkills) do
|
||||
for playerName, professionData in pairs(TSM.db.realm.tradeSkills) do
|
||||
for name, data in pairs(professionData) do
|
||||
if not data.isSecondary and playerName == player then -- only display current player profs until blizz fix it
|
||||
list[playerName .. "~" .. name] = format("%s %d/%d - %s", name, data.level or "?", data.maxLevel or "?", playerName)
|
||||
@@ -993,7 +982,7 @@ function GUI:CreateProfessionsTab(parent)
|
||||
CastSpellByName(profession)
|
||||
end
|
||||
else
|
||||
local link = TSM.db.factionrealm.tradeSkills[playerName][profession].link
|
||||
local link = TSM.db.realm.tradeSkills[playerName][profession].link
|
||||
if not link then
|
||||
TSM:Printf(L["Profession data not found for %s on %s. Logging into this player and opening the profession may solve this issue."], profession, playerName)
|
||||
return OnValueChanged(_, _, currentSelection)
|
||||
@@ -1199,7 +1188,7 @@ function GUI:CreateCraftInfoFrame(parent)
|
||||
local function OnEnter(self)
|
||||
if not frame.index then return end
|
||||
local spellID = TSM.Util:GetSpellID(frame.index)
|
||||
local itemID = spellID and TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].itemID
|
||||
local itemID = spellID and TSM.db.realm.crafts[spellID] and TSM.db.realm.crafts[spellID].itemID
|
||||
if itemID then
|
||||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
|
||||
TSMAPI:SafeTooltipLink(itemID)
|
||||
@@ -1402,20 +1391,20 @@ function GUI:CreateCraftInfoFrame(parent)
|
||||
queueBtn:RegisterForClicks("AnyUp")
|
||||
queueBtn:SetScript("OnClick", function(_, button)
|
||||
local spellID = TSM.Util:GetSpellID(frame.index)
|
||||
if not spellID or not TSM.db.factionrealm.crafts[spellID] then return end
|
||||
if not spellID or not TSM.db.realm.crafts[spellID] then return end
|
||||
|
||||
TSM.db.factionrealm.crafts[spellID].queued = max(TSM.db.factionrealm.crafts[spellID].queued, 0)
|
||||
TSM.db.realm.crafts[spellID].queued = max(TSM.db.realm.crafts[spellID].queued, 0)
|
||||
if button == "LeftButton" then
|
||||
if IsModifiedClick() then
|
||||
TSM.db.factionrealm.crafts[spellID].queued = select(3, GetTradeSkillInfo(frame.index)) or 0
|
||||
TSM.db.realm.crafts[spellID].queued = select(3, GetTradeSkillInfo(frame.index)) or 0
|
||||
else
|
||||
TSM.db.factionrealm.crafts[spellID].queued = (TSM.db.factionrealm.crafts[spellID].queued or 0) + buttonsFrame.inputBox:GetNumber()
|
||||
TSM.db.realm.crafts[spellID].queued = (TSM.db.realm.crafts[spellID].queued or 0) + buttonsFrame.inputBox:GetNumber()
|
||||
end
|
||||
elseif button == "RightButton" then
|
||||
if IsModifiedClick() then
|
||||
TSM.db.factionrealm.crafts[spellID].queued = 0
|
||||
TSM.db.realm.crafts[spellID].queued = 0
|
||||
else
|
||||
TSM.db.factionrealm.crafts[spellID].queued = max((TSM.db.factionrealm.crafts[spellID].queued or 0) - buttonsFrame.inputBox:GetNumber(), 0)
|
||||
TSM.db.realm.crafts[spellID].queued = max((TSM.db.realm.crafts[spellID].queued or 0) - buttonsFrame.inputBox:GetNumber(), 0)
|
||||
end
|
||||
end
|
||||
GUI:UpdateQueue()
|
||||
@@ -1455,7 +1444,7 @@ function GUI:CreateCraftInfoFrame(parent)
|
||||
-- Enable display of items created
|
||||
local lNum, hNum = GetTradeSkillNumMade(skillIndex)
|
||||
local numMade = floor(((lNum or 1) + (hNum or 1)) / 2)
|
||||
if altVerb == ENSCRIBE then
|
||||
if altVerb ~= nil and strfind(name,"Enchant ") then
|
||||
numMade = 1
|
||||
end
|
||||
if numMade > 1 then
|
||||
@@ -1469,7 +1458,7 @@ function GUI:CreateCraftInfoFrame(parent)
|
||||
-- The code below is heavily based on the code in Blizzard_TradeSkillUI.lua.
|
||||
local toolsInfo = BuildColoredListString(GetTradeSkillTools(skillIndex))
|
||||
self.infoFrame.toolsText:SetText(toolsInfo and REQUIRES_LABEL .. " " .. toolsInfo or "")
|
||||
local cooldown, isDayCooldown = GetTradeSkillCooldown(skillIndex)
|
||||
local cooldown = GetTradeSkillCooldown(skillIndex)
|
||||
if not cooldown then
|
||||
self.infoFrame.cooldownText:SetText("");
|
||||
elseif cooldown > 60 * 60 * 24 then --Cooldown is greater than 1 day.
|
||||
@@ -1492,15 +1481,14 @@ function GUI:CreateCraftInfoFrame(parent)
|
||||
end
|
||||
end
|
||||
|
||||
if altVerb == ENSCRIBE then
|
||||
-- if altVerb == ENSCRIBE then
|
||||
if altVerb ~= nil and strfind(name,"Enchant ") then
|
||||
createAllBtn:SetText(L["Enchant Vellum"])
|
||||
-- createAllBtn.vellum = TSMAPI:GetSafeItemInfo("item:38682:0:0:0:0:0:0")
|
||||
if strfind(name, "Weapon") or strfind(name, "Staff") then
|
||||
createAllBtn.vellum = TSMAPI:GetSafeItemInfo("item:43146:0:0:0:0:0:0") -- Weapon Vellum III
|
||||
createAllBtn.vellum = TSMAPI:GetSafeItemInfo("item:52511:0:0:0:0:0:0") -- Weapon Vellum
|
||||
else
|
||||
createAllBtn.vellum = TSMAPI:GetSafeItemInfo("item:43145:0:0:0:0:0:0") -- Armor Vellum III
|
||||
createAllBtn.vellum = TSMAPI:GetSafeItemInfo("item:52510:0:0:0:0:0:0") -- Armor Vellum
|
||||
end
|
||||
|
||||
else
|
||||
createAllBtn:SetText(CREATE_ALL)
|
||||
createAllBtn.vellum = nil
|
||||
@@ -1535,8 +1523,8 @@ function GUI:CreateGroupsTab(parent)
|
||||
RestockGroups = groupTree
|
||||
|
||||
local function OnCreateBtnClick()
|
||||
if TSM.db.factionrealm.tradeSkills[UnitName("player")][GetTradeSkillLine()] then
|
||||
TSM.db.factionrealm.tradeSkills[UnitName("player")][GetTradeSkillLine()].prompted = nil
|
||||
if TSM.db.realm.tradeSkills[UnitName("player")][GetTradeSkillLine()] then
|
||||
TSM.db.realm.tradeSkills[UnitName("player")][GetTradeSkillLine()].prompted = nil
|
||||
end
|
||||
private.forceCreateGroups = true
|
||||
TSM.Util:ScanCurrentProfession()
|
||||
@@ -1631,8 +1619,8 @@ function GUI:UpdateProfessionsTabST()
|
||||
|
||||
if not numAvailableAllCache[spellID] then
|
||||
local numAvailableAll = math.huge
|
||||
if spellID and TSM.db.factionrealm.crafts[spellID] then
|
||||
for itemString, quantity in pairs(TSM.db.factionrealm.crafts[spellID].mats) do
|
||||
if spellID and TSM.db.realm.crafts[spellID] then
|
||||
for itemString, quantity in pairs(TSM.db.realm.crafts[spellID].mats) do
|
||||
numAvailableAll = min(numAvailableAll, floor((inventoryTotals[itemString] or 0) / quantity))
|
||||
end
|
||||
end
|
||||
@@ -1755,12 +1743,12 @@ function GUI:UpdateQueue()
|
||||
for profession, crafts in pairs(queuedCrafts) do
|
||||
local professionColor, playerColor
|
||||
local players = {}
|
||||
for player, data in pairs(TSM.db.factionrealm.tradeSkills) do
|
||||
for player, data in pairs(TSM.db.realm.tradeSkills) do
|
||||
if data[profession] then
|
||||
tinsert(players, player)
|
||||
end
|
||||
end
|
||||
if TSM.db.factionrealm.tradeSkills[UnitName("player")][profession] then
|
||||
if TSM.db.realm.tradeSkills[UnitName("player")][profession] then
|
||||
playerColor = "|cffffffff"
|
||||
if profession == currentProfession then
|
||||
professionColor = "|cffffffff"
|
||||
@@ -1772,7 +1760,7 @@ function GUI:UpdateQueue()
|
||||
professionColor = "|cffff0000"
|
||||
end
|
||||
|
||||
local professionCollapsed = TSM.db.factionrealm.queueStatus.collapsed[profession]
|
||||
local professionCollapsed = TSM.db.realm.queueStatus.collapsed[profession]
|
||||
local row = {
|
||||
cols = {
|
||||
{
|
||||
@@ -1786,7 +1774,7 @@ function GUI:UpdateQueue()
|
||||
|
||||
if not professionCollapsed then
|
||||
for _, stage in ipairs(crafts) do
|
||||
local stageCollapsed = TSM.db.factionrealm.queueStatus.collapsed[profession .. stage.name]
|
||||
local stageCollapsed = TSM.db.realm.queueStatus.collapsed[profession .. stage.name]
|
||||
local row = {
|
||||
cols = {
|
||||
{
|
||||
@@ -1809,7 +1797,7 @@ function GUI:UpdateQueue()
|
||||
velName = GetItemInfo(TSM.VellumInfo[spellID])
|
||||
end
|
||||
|
||||
for itemID, quantity in pairs(TSM.db.factionrealm.crafts[spellID].mats) do
|
||||
for itemID, quantity in pairs(TSM.db.realm.crafts[spellID].mats) do
|
||||
|
||||
local MatName = GetItemInfo(itemID)
|
||||
if MatName ~= nil and velName ~= nil and strfind(MatName, "Vellum") then
|
||||
@@ -1824,12 +1812,6 @@ function GUI:UpdateQueue()
|
||||
canCraft = min(canCraft, floor(numHave / quantity))
|
||||
end
|
||||
|
||||
-- local velName
|
||||
-- local VELLUM_ID = "item:38682:0:0:0:0:0:0"
|
||||
-- if TSM.db.factionrealm.crafts[spellID].mats[VELLUM_ID] then
|
||||
-- velName = GetItemInfo(VELLUM_ID) or TSM.db.factionrealm.mats[VELLUM_ID].name
|
||||
-- end
|
||||
|
||||
local color
|
||||
local craftIndex = skillIndexLookup[spellID]
|
||||
if canCraft >= numQueued then
|
||||
@@ -1857,7 +1839,7 @@ function GUI:UpdateQueue()
|
||||
|
||||
local extra = ""
|
||||
if not craftIndex then
|
||||
if TSM.db.factionrealm.crafts[spellID].players[UnitName("player")] and TSM.db.factionrealm.crafts[spellID].profession == currentProfession then
|
||||
if TSM.db.realm.crafts[spellID].players[UnitName("player")] and TSM.db.realm.crafts[spellID].profession == currentProfession then
|
||||
extra = "|cffff0000[Filtered]|r "
|
||||
end
|
||||
end
|
||||
@@ -1865,7 +1847,7 @@ function GUI:UpdateQueue()
|
||||
local row = {
|
||||
cols = {
|
||||
{
|
||||
value = " " .. extra .. color .. TSM.db.factionrealm.crafts[spellID].name .. " (x" .. numQueued .. ")" .. "|r",
|
||||
value = " " .. extra .. color .. TSM.db.realm.crafts[spellID].name .. " (x" .. numQueued .. ")" .. "|r",
|
||||
},
|
||||
},
|
||||
spellID = spellID,
|
||||
@@ -1946,8 +1928,8 @@ function GUI:UpdateQueue()
|
||||
local row = {
|
||||
cols = {
|
||||
{
|
||||
value = color .. TSM.db.factionrealm.mats[itemString].name .. "|r",
|
||||
args = { TSM.db.factionrealm.mats[itemString].name },
|
||||
value = color .. TSM.db.realm.mats[itemString].name .. "|r",
|
||||
args = { TSM.db.realm.mats[itemString].name },
|
||||
},
|
||||
{
|
||||
value = color .. need .. "|r",
|
||||
@@ -2035,7 +2017,7 @@ function GUI:CreatePromptFrame(parent)
|
||||
yesBtn:SetScript("OnClick", function()
|
||||
TSM:Printf(L["Created profession group for %s."], frame.profession)
|
||||
TSMAPI:CreatePresetGroups(frame.presetGroupInfo)
|
||||
TSM.db.factionrealm.tradeSkills[UnitName("player")][frame.profession].prompted = true
|
||||
TSM.db.realm.tradeSkills[UnitName("player")][frame.profession].prompted = true
|
||||
frame:Hide()
|
||||
GUI:UpdateProfessionsTabST()
|
||||
end)
|
||||
@@ -2055,7 +2037,7 @@ function GUI:CreatePromptFrame(parent)
|
||||
noBtn:SetHeight(20)
|
||||
noBtn:SetText(L["No Thanks"])
|
||||
noBtn:SetScript("OnClick", function()
|
||||
TSM.db.factionrealm.tradeSkills[UnitName("player")][frame.profession].prompted = true
|
||||
TSM.db.realm.tradeSkills[UnitName("player")][frame.profession].prompted = true
|
||||
frame:Hide()
|
||||
end)
|
||||
frame.noBtn = noBtn
|
||||
@@ -2066,7 +2048,7 @@ end
|
||||
function GUI:PromptPresetGroups(currentTradeSkill, presetGroupInfo)
|
||||
GUI:RestoreFilters()
|
||||
|
||||
if TSM.db.factionrealm.tradeSkills[UnitName("player")][currentTradeSkill] and not TSM.db.factionrealm.tradeSkills[UnitName("player")][currentTradeSkill].prompted then
|
||||
if TSM.db.realm.tradeSkills[UnitName("player")][currentTradeSkill] and not TSM.db.realm.tradeSkills[UnitName("player")][currentTradeSkill].prompted then
|
||||
GUI.frame.prompt.profession = currentTradeSkill
|
||||
GUI.frame.prompt.presetGroupInfo = presetGroupInfo
|
||||
GUI.frame.prompt:Show()
|
||||
@@ -2148,7 +2130,7 @@ function GUI:UpdateGatherSelectionWindow()
|
||||
local crafters = {}
|
||||
local numCrafters = 0
|
||||
for profession, _ in pairs(queuedCrafts) do
|
||||
for player, data in pairs(TSM.db.factionrealm.tradeSkills) do
|
||||
for player, data in pairs(TSM.db.realm.tradeSkills) do
|
||||
if data[profession] then
|
||||
crafters[player] = player
|
||||
numCrafters = numCrafters + 1
|
||||
@@ -2174,7 +2156,7 @@ function GUI:UpdateGatherSelectionWindow()
|
||||
local professions = {}
|
||||
local numProfessions = 0
|
||||
for profession, _ in pairs(queuedCrafts) do
|
||||
if TSM.db.factionrealm.tradeSkills[private.gather.player][profession] then
|
||||
if TSM.db.realm.tradeSkills[private.gather.player][profession] then
|
||||
professions[profession] = profession
|
||||
numProfessions = numProfessions + 1
|
||||
end
|
||||
@@ -2289,9 +2271,9 @@ function GUI:CreateGatheringFrame()
|
||||
local function OnCraftRowClicked(_, data)
|
||||
if data.isTitle then
|
||||
if data.task then
|
||||
TSM.db.factionrealm.sourceStatus.collapsed[data.source .. data.task] = not TSM.db.factionrealm.sourceStatus.collapsed[data.source .. data.task]
|
||||
TSM.db.realm.sourceStatus.collapsed[data.source .. data.task] = not TSM.db.realm.sourceStatus.collapsed[data.source .. data.task]
|
||||
else
|
||||
TSM.db.factionrealm.sourceStatus.collapsed[data.source] = not TSM.db.factionrealm.sourceStatus.collapsed[data.source]
|
||||
TSM.db.realm.sourceStatus.collapsed[data.source] = not TSM.db.realm.sourceStatus.collapsed[data.source]
|
||||
end
|
||||
GUI:UpdateGathering()
|
||||
end
|
||||
@@ -2356,10 +2338,10 @@ function GUI:CreateGatheringFrame()
|
||||
--checkbox:SetPoint("BOTTOMRIGHT", checkboxFrame, "BOTTOMRIGHT")
|
||||
checkbox1:SetHeight(18)
|
||||
checkbox1:SetWidth(185)
|
||||
checkbox1:SetValue(TSM.db.factionrealm.gathering.destroyDisable)
|
||||
checkbox1:SetValue(TSM.db.realm.gathering.destroyDisable)
|
||||
checkbox1:SetLabel(L[" Disable Destroying Search"])
|
||||
checkbox1:SetCallback("OnValueChanged", function(_, _, value)
|
||||
TSM.db.factionrealm.gathering.destroyDisable = value
|
||||
TSM.db.realm.gathering.destroyDisable = value
|
||||
end)
|
||||
|
||||
local checkbox2 = TSMAPI.GUI:CreateCheckBox(checkboxFrame, L["If checked, the AH destroying search will only look for even stacks"])
|
||||
@@ -2368,10 +2350,10 @@ function GUI:CreateGatheringFrame()
|
||||
--checkbox:SetPoint("BOTTOMRIGHT", checkboxFrame, "BOTTOMRIGHT")
|
||||
checkbox2:SetHeight(18)
|
||||
checkbox2:SetWidth(100)
|
||||
checkbox2:SetValue(TSM.db.factionrealm.gathering.evenStacks)
|
||||
checkbox2:SetValue(TSM.db.realm.gathering.evenStacks)
|
||||
checkbox2:SetLabel(L["Even Stacks"])
|
||||
checkbox2:SetCallback("OnValueChanged", function(_, _, value)
|
||||
TSM.db.factionrealm.gathering.evenStacks = value
|
||||
TSM.db.realm.gathering.evenStacks = value
|
||||
end)
|
||||
TSMAPI.Design:SetFrameColor(checkboxFrame)
|
||||
|
||||
@@ -2384,11 +2366,11 @@ function GUI:CreateGatheringFrame()
|
||||
btn:SetScript("OnClick", function()
|
||||
private.gather = {}
|
||||
GUI.gatheringFrame:Hide()
|
||||
TSM.db.factionrealm.gathering.availableMats = {}
|
||||
TSM.db.factionrealm.gathering.crafter = nil
|
||||
TSM.db.factionrealm.gathering.neededMats = {}
|
||||
TSM.db.factionrealm.gathering.gatheredMats = false
|
||||
TSM.db.factionrealm.gathering.destroyingMats = {}
|
||||
TSM.db.realm.gathering.availableMats = {}
|
||||
TSM.db.realm.gathering.crafter = nil
|
||||
TSM.db.realm.gathering.neededMats = {}
|
||||
TSM.db.realm.gathering.gatheredMats = false
|
||||
TSM.db.realm.gathering.destroyingMats = {}
|
||||
private.currentSource = nil
|
||||
end)
|
||||
|
||||
@@ -2408,7 +2390,7 @@ end
|
||||
|
||||
function GUI:StartGathering()
|
||||
GUI.frame.gather:Hide()
|
||||
TSM.db.factionrealm.gathering.gatheredMats = false
|
||||
TSM.db.realm.gathering.gatheredMats = false
|
||||
local _, queuedMats = TSM.Queue:GetQueue()
|
||||
|
||||
local neededMats = {}
|
||||
@@ -2423,9 +2405,9 @@ function GUI:StartGathering()
|
||||
if not next(neededMats) then
|
||||
TSM:Print(L["Nothing To Gather"])
|
||||
else
|
||||
TSM.db.factionrealm.gathering.crafter = private.gather.player
|
||||
TSM.db.factionrealm.gathering.professions = private.gather.professions
|
||||
TSM.db.factionrealm.gathering.neededMats = neededMats
|
||||
TSM.db.realm.gathering.crafter = private.gather.player
|
||||
TSM.db.realm.gathering.professions = private.gather.professions
|
||||
TSM.db.realm.gathering.neededMats = neededMats
|
||||
GUI.gatheringFrame:Show()
|
||||
GUI:UpdateGathering()
|
||||
end
|
||||
@@ -2434,13 +2416,13 @@ end
|
||||
|
||||
function GUI:UpdateGathering()
|
||||
if not GUI.gatheringFrame or not GUI.gatheringFrame:IsVisible() then return end
|
||||
if not TSM.db.factionrealm.gathering.crafter or not next(TSM.db.factionrealm.gathering.neededMats) then return end
|
||||
if not TSM.db.realm.gathering.crafter or not next(TSM.db.realm.gathering.neededMats) then return end
|
||||
|
||||
-- recheck the craft queue and update neededMats
|
||||
local _, queuedMats = TSM.Queue:GetQueue()
|
||||
local neededMats = {}
|
||||
for profession, data in pairs(queuedMats) do
|
||||
if TSM.db.factionrealm.gathering.professions[profession] then
|
||||
if TSM.db.realm.gathering.professions[profession] then
|
||||
for itemString, quantity in pairs(data) do
|
||||
neededMats[itemString] = (neededMats[itemString] or 0) + quantity
|
||||
end
|
||||
@@ -2449,9 +2431,9 @@ function GUI:UpdateGathering()
|
||||
|
||||
local stData = {}
|
||||
local sources = {}
|
||||
local crafter = TSM.db.factionrealm.gathering.crafter
|
||||
local crafter = TSM.db.realm.gathering.crafter
|
||||
local professionList = {}
|
||||
for profession in pairs(TSM.db.factionrealm.gathering.professions) do
|
||||
for profession in pairs(TSM.db.realm.gathering.professions) do
|
||||
tinsert(professionList, profession)
|
||||
end
|
||||
|
||||
@@ -2466,18 +2448,18 @@ function GUI:UpdateGathering()
|
||||
end
|
||||
if not next(shortItems) then
|
||||
GUI.gatheringFrame:Hide()
|
||||
if TSM.db.factionrealm.gathering.gatheredMats == true then
|
||||
if TSM.db.realm.gathering.gatheredMats == true then
|
||||
TSM:Print("Finished Gathering")
|
||||
TSM.db.factionrealm.gathering.gatheredMats = false
|
||||
TSM.db.factionrealm.gathering.crafter = nil
|
||||
TSM.db.factionrealm.gathering.neededMats = {}
|
||||
TSM.db.factionrealm.gathering.gatheredMats = false
|
||||
TSM.db.factionrealm.sourceStatus.collapsed = {}
|
||||
TSM.db.factionrealm.gathering.destroyingMats = {}
|
||||
TSM.db.realm.gathering.gatheredMats = false
|
||||
TSM.db.realm.gathering.crafter = nil
|
||||
TSM.db.realm.gathering.neededMats = {}
|
||||
TSM.db.realm.gathering.gatheredMats = false
|
||||
TSM.db.realm.sourceStatus.collapsed = {}
|
||||
TSM.db.realm.gathering.destroyingMats = {}
|
||||
end
|
||||
return
|
||||
else
|
||||
TSM.db.factionrealm.gathering.neededMats = CopyTable(neededMats)
|
||||
TSM.db.realm.gathering.neededMats = CopyTable(neededMats)
|
||||
end
|
||||
|
||||
sort(professionList)
|
||||
@@ -2505,8 +2487,8 @@ function GUI:UpdateGathering()
|
||||
local row = {
|
||||
cols = {
|
||||
{
|
||||
value = color .. TSM.db.factionrealm.mats[itemString].name .. "|r",
|
||||
args = { TSM.db.factionrealm.mats[itemString].name },
|
||||
value = color .. TSM.db.realm.mats[itemString].name .. "|r",
|
||||
args = { TSM.db.realm.mats[itemString].name },
|
||||
},
|
||||
{
|
||||
value = color .. need .. "|r",
|
||||
@@ -2519,7 +2501,7 @@ function GUI:UpdateGathering()
|
||||
},
|
||||
itemString = itemString,
|
||||
order = order,
|
||||
name = TSM.db.factionrealm.mats[itemString].name,
|
||||
name = TSM.db.realm.mats[itemString].name,
|
||||
}
|
||||
tinsert(stData, row)
|
||||
end
|
||||
@@ -2548,7 +2530,7 @@ function GUI:UpdateGathering()
|
||||
else
|
||||
color = "|cffffff00"
|
||||
end
|
||||
local sourceCollapsed = TSM.db.factionrealm.sourceStatus.collapsed[source.sourceName]
|
||||
local sourceCollapsed = TSM.db.realm.sourceStatus.collapsed[source.sourceName]
|
||||
local row = {
|
||||
cols = {
|
||||
{
|
||||
@@ -2562,7 +2544,7 @@ function GUI:UpdateGathering()
|
||||
|
||||
if not sourceCollapsed then
|
||||
for _, task in ipairs(source.tasks) do
|
||||
local tasksCollapsed = TSM.db.factionrealm.sourceStatus.collapsed[source.sourceName .. task.taskType]
|
||||
local tasksCollapsed = TSM.db.realm.sourceStatus.collapsed[source.sourceName .. task.taskType]
|
||||
local row = {
|
||||
cols = {
|
||||
{
|
||||
@@ -2681,7 +2663,7 @@ function GUI:UpdateGathering()
|
||||
end
|
||||
end
|
||||
-- store the available mats from source
|
||||
TSM.db.factionrealm.gathering.availableMats = CopyTable(availableMats)
|
||||
TSM.db.realm.gathering.availableMats = CopyTable(availableMats)
|
||||
|
||||
GUI.gatheringFrame.gatherButton:SetText(L["Gather Items"])
|
||||
if next(stData) then
|
||||
@@ -2753,7 +2735,7 @@ end
|
||||
|
||||
function CheapestVellum(itemPassed)
|
||||
|
||||
-- Get Cheapest vellum, lower vellum types can be replaced by III
|
||||
-- Return one of the two vellum available
|
||||
local MatName = GetItemInfo(itemPassed)
|
||||
-- MatName is sometimes nil ???
|
||||
if MatName ~= nil then
|
||||
@@ -2761,12 +2743,11 @@ function CheapestVellum(itemPassed)
|
||||
if strfind(MatName, "Vellum") then
|
||||
velName = MatName
|
||||
end
|
||||
if (velName ~= nil) and (not strfind(velName, "III")) then
|
||||
local VellumReplacePrice = TSM.Cost:GetMatCost(itemPassed) or 0
|
||||
if strfind(velName, "Weapon Vellum") then
|
||||
if VellumReplacePrice > (TSM.Cost:GetMatCost("item:43146:0:0:0:0:0:0") or 0) then itemPassed = "item:43146:0:0:0:0:0:0" end
|
||||
if (velName ~= nil) then
|
||||
if strfind(velName, "Weapon") then
|
||||
itemPassed = "item:52511:0:0:0:0:0:0"
|
||||
else
|
||||
if VellumReplacePrice > (TSM.Cost:GetMatCost("item:43145:0:0:0:0:0:0") or 0) then itemPassed = "item:43145:0:0:0:0:0:0" end
|
||||
itemPassed = "item:52510:0:0:0:0:0:0"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,7 +14,7 @@ TSM.enchantingName = GetSpellInfo(7411)
|
||||
-- looks up the itemID of the scroll that the enchant makes
|
||||
-- index = spellID of the enchant
|
||||
-- value = itemID of scroll
|
||||
TSM.enchantingItemIDs = {
|
||||
--TSM.enchantingItemIDs = {
|
||||
-- -- MOP
|
||||
-- [110764] = 79061, -- Enchant Weapon - Pandamonium
|
||||
-- [104338] = 74700, -- Enchant Bracer - Mastery
|
||||
@@ -341,263 +341,365 @@ TSM.enchantingItemIDs = {
|
||||
-- [28003] = 38926, -- Enchant Weapon - Spellsurge
|
||||
-- [28004] = 38927, -- Enchant Weapon - Battlemaster
|
||||
|
||||
[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
|
||||
}
|
||||
-- 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
|
||||
}
|
||||
|
||||
@@ -23,14 +23,14 @@ function Gather:BuyFromMerchant(neededMats)
|
||||
while toBuy > 0 do
|
||||
BuyMerchantItem(i, math.min(toBuy, maxStack))
|
||||
toBuy = toBuy - maxStack
|
||||
TSM.db.factionrealm.gathering.gatheredMats = true
|
||||
TSM.db.realm.gathering.gatheredMats = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Gather:gatherItems(source, task)
|
||||
local items = TSM.db.factionrealm.gathering.availableMats
|
||||
local items = TSM.db.realm.gathering.availableMats
|
||||
|
||||
if source == L["Vendor"] then
|
||||
Gather:BuyFromMerchant(items)
|
||||
@@ -58,7 +58,7 @@ function Gather:GatherBank(moveItems)
|
||||
else
|
||||
TSM:Print(L["Gathering Crafting Mats"])
|
||||
TSMAPI:MoveItems(moveItems, Gather.PrintMsg)
|
||||
TSM.db.factionrealm.gathering.gatheredMats = true
|
||||
TSM.db.realm.gathering.gatheredMats = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -83,11 +83,11 @@ function Gather:MailItems(neededItems)
|
||||
if next(neededItems) == nil then
|
||||
TSM:Print(L["Nothing to Mail"])
|
||||
else
|
||||
local crafter = TSM.db.factionrealm.gathering.crafter
|
||||
local crafter = TSM.db.realm.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
|
||||
TSM.db.realm.gathering.gatheredMats = true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -111,7 +111,7 @@ local function ShoppingCallback(remainingQty, boughtItem, stackSize)
|
||||
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
|
||||
TSM.db.realm.gathering.destroyingMats[boughtItem] = (TSM.db.realm.gathering.destroyingMats[boughtItem] or 0) + stackSize
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -125,10 +125,10 @@ 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 not TSM.db.realm.gathering.destroyDisable then
|
||||
if TSMAPI.InkConversions[itemString] then
|
||||
TSM.Inventory.gatherItem = itemString
|
||||
if TSM.db.factionrealm.gathering.evenStacks then
|
||||
if TSM.db.realm.gathering.evenStacks then
|
||||
if ignoreMaxQty then
|
||||
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/even", ShoppingCallback)
|
||||
else
|
||||
@@ -154,7 +154,7 @@ function Gather:ShoppingSearch(itemString, need, ignoreMaxQty)
|
||||
break
|
||||
end
|
||||
if convertSource == "mill" or convertSource == "prospect" then
|
||||
if TSM.db.factionrealm.gathering.evenStacks then
|
||||
if TSM.db.realm.gathering.evenStacks then
|
||||
if ignoreMaxQty then
|
||||
TSMAPI:ModuleAPI("Shopping", "runDestroySearch", TSMAPI:GetSafeItemInfo(itemString) .. "/even", ShoppingCallback)
|
||||
else
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
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
|
||||
for itemString, quantity in pairs(TSM.db.realm.gathering.destroyingMats) do
|
||||
if mail[itemString] and not shortItems[itemString] then
|
||||
mailItems[itemString] = quantity
|
||||
end
|
||||
@@ -256,44 +256,44 @@
|
||||
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 TSM.db.realm.gathering.destroyingMats[destroyItem] then
|
||||
if need > 0 then
|
||||
local destroyNeed
|
||||
if data.source == "mill" then
|
||||
destroyNeed = floor(TSM.db.factionrealm.gathering.destroyingMats[destroyItem] / 5)
|
||||
destroyNeed = floor(TSM.db.realm.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)
|
||||
destroyNeed = floor(TSM.db.realm.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)
|
||||
destroyNeed = floor(TSM.db.realm.gathering.destroyingMats[destroyItem] / 3)
|
||||
elseif data.rate == 1 / 10 then
|
||||
destroyNeed = floor(TSM.db.factionrealm.gathering.destroyingMats[destroyItem] / 10)
|
||||
destroyNeed = floor(TSM.db.realm.gathering.destroyingMats[destroyItem] / 10)
|
||||
else
|
||||
destroyNeed = TSM.db.factionrealm.gathering.destroyingMats[destroyItem]
|
||||
destroyNeed = TSM.db.realm.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
|
||||
TSM.db.realm.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 next(TSM.db.realm.gathering.destroyingMats) then
|
||||
for deItemString, quantity in pairs(TSM.db.realm.gathering.destroyingMats) do
|
||||
if Inventory:IsDisenchantable(deItemString) then
|
||||
if need > 0 then
|
||||
deItems[deItemString] = quantity
|
||||
else
|
||||
TSM.db.factionrealm.gathering.destroyingMats[deItemString] = nil
|
||||
TSM.db.realm.gathering.destroyingMats[deItemString] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -342,7 +342,7 @@ function Options:LoadGeneralSettings(container)
|
||||
{
|
||||
type = "CheckBox",
|
||||
label = L["Gather All Professions by Default if Only One Crafter"],
|
||||
settingInfo = { TSM.db.factionrealm.gathering, "gatherAll" },
|
||||
settingInfo = { TSM.db.realm.gathering, "gatherAll" },
|
||||
relativeWidth = 1,
|
||||
tooltip = L["If checked, if there is only one crafter for the craft queue clicking gather will gather for all professions for that crafter"],
|
||||
},
|
||||
@@ -491,7 +491,7 @@ function Options:UpdateCraftST()
|
||||
if not craftST then return end
|
||||
local stData = {}
|
||||
local bagTotal, auctionTotal, otherTotal = TSM.Inventory:GetTotals()
|
||||
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellID, data in pairs(TSM.db.realm.crafts) do
|
||||
local isFiltered
|
||||
local name, link = TSMAPI:GetSafeItemInfo(data.itemID)
|
||||
|
||||
@@ -572,7 +572,7 @@ function Options:LoadCraftsPage(container)
|
||||
filters = {filter="", profession="", dpSelection="all", haveMats=nil, queueIncr=1}
|
||||
|
||||
local professionList = { [""] = L["<None>"] }
|
||||
for _, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for _, data in pairs(TSM.db.realm.crafts) do
|
||||
professionList[data.profession] = data.profession
|
||||
end
|
||||
|
||||
@@ -704,7 +704,7 @@ function Options:LoadCraftsPage(container)
|
||||
local handlers = {
|
||||
OnClick = function(st, data, self, button)
|
||||
if not data then return end
|
||||
local craft = TSM.db.factionrealm.crafts[data.spellID]
|
||||
local craft = TSM.db.realm.crafts[data.spellID]
|
||||
if button == "LeftButton" then
|
||||
craft.queued = craft.queued + filters.queueIncr
|
||||
elseif button == "RightButton" then
|
||||
@@ -747,7 +747,7 @@ function Options:LoadCraftsPage(container)
|
||||
end
|
||||
|
||||
function Options:ResetDefaultPrice()
|
||||
for itemString, data in pairs(TSM.db.factionrealm.mats) do
|
||||
for itemString, data in pairs(TSM.db.realm.mats) do
|
||||
if data.customValue then
|
||||
data.customValue = nil
|
||||
end
|
||||
@@ -757,12 +757,12 @@ end
|
||||
|
||||
function Options:UpdateMatST()
|
||||
local items = {}
|
||||
for _, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for _, data in pairs(TSM.db.realm.crafts) do
|
||||
if filters.ddSelection == "none" or data.profession == filters.ddSelection then
|
||||
for itemString in pairs(data.mats) do
|
||||
if filters.dpSelection == "all" or (filters.dpSelection == "default" and not TSM.db.factionrealm.mats[itemString].customValue) or (filters.dpSelection == "custom" and TSM.db.factionrealm.mats[itemString].customValue) then
|
||||
if TSM.db.factionrealm.mats[itemString] and TSM.db.factionrealm.mats[itemString].name then -- sanity check
|
||||
items[itemString] = TSM.db.factionrealm.mats[itemString].name
|
||||
if filters.dpSelection == "all" or (filters.dpSelection == "default" and not TSM.db.realm.mats[itemString].customValue) or (filters.dpSelection == "custom" and TSM.db.realm.mats[itemString].customValue) then
|
||||
if TSM.db.realm.mats[itemString] and TSM.db.realm.mats[itemString].name then -- sanity check
|
||||
items[itemString] = TSM.db.realm.mats[itemString].name
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -776,7 +776,7 @@ function Options:UpdateMatST()
|
||||
if strfind(strlower(name), filters.filter) then
|
||||
local professions = {}
|
||||
local professionList = {}
|
||||
for _, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for _, data in pairs(TSM.db.realm.crafts) do
|
||||
if data.mats[itemString] then
|
||||
if not professions[data.profession] then
|
||||
professions[data.profession] = true
|
||||
@@ -787,7 +787,7 @@ function Options:UpdateMatST()
|
||||
sort(professionList)
|
||||
local professionsUsed = table.concat(professionList, ",")
|
||||
|
||||
local mat = TSM.db.factionrealm.mats[itemString]
|
||||
local mat = TSM.db.realm.mats[itemString]
|
||||
local cost = TSM:GetCustomPrice(mat.customValue or TSM.db.global.defaultMatCostMethod, itemString) or 0
|
||||
local quantity = inventoryTotals[itemString] or 0
|
||||
tinsert(stData, {
|
||||
@@ -824,7 +824,7 @@ function Options:LoadMaterialsPage(container)
|
||||
filters = {filter="", ddSelection="none", dpSelection="all"}
|
||||
|
||||
local ddList = { ["none"] = L["<None>"] }
|
||||
for _, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for _, data in pairs(TSM.db.realm.crafts) do
|
||||
ddList[data.profession] = data.profession
|
||||
end
|
||||
|
||||
@@ -962,7 +962,7 @@ end
|
||||
-- Material Options Window
|
||||
function Options:ShowMatOptionsWindow(parent, itemString)
|
||||
if Options.OpenWindow then Options.OpenWindow:Hide() end
|
||||
local mat = TSM.db.factionrealm.mats[itemString]
|
||||
local mat = TSM.db.realm.mats[itemString]
|
||||
if not mat then return end
|
||||
local link = select(2, TSMAPI:GetSafeItemInfo(itemString)) or mat.name
|
||||
local cost = TSM:GetCustomPrice(mat.customValue or TSM.db.global.defaultMatCostMethod, itemString) or 0
|
||||
|
||||
@@ -43,7 +43,7 @@ function Queue:CreateRestockQueue(groupInfo)
|
||||
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
|
||||
if spellID and TSM.db.realm.crafts[spellID] then
|
||||
local maxQueueCount = max(opSettings.maxRestock - TSM.Inventory:GetTotalQuantity(itemString), 0)
|
||||
local numToQueue = 0
|
||||
|
||||
@@ -60,7 +60,7 @@ function Queue:CreateRestockQueue(groupInfo)
|
||||
end
|
||||
end
|
||||
|
||||
local craft = TSM.db.factionrealm.crafts[spellID]
|
||||
local craft = TSM.db.realm.crafts[spellID]
|
||||
craft.queued = floor(numToQueue / craft.numResult)
|
||||
craft.queued = craft.queued >= opSettings.minRestock and craft.queued or 0
|
||||
if craft.queued > 0 then
|
||||
@@ -84,12 +84,12 @@ function Queue:HasLoop(itemString, steps, visited)
|
||||
if visited[itemString] then return true end
|
||||
visited[itemString] = true
|
||||
local craftCost = TSM:GetCustomPrice("Crafting", itemString)
|
||||
local mat = TSM.db.factionrealm.mats[itemString]
|
||||
local mat = TSM.db.realm.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 spellID and TSM.db.realm.crafts[spellID] then
|
||||
for matItemString in pairs(TSM.db.realm.crafts[spellID].mats) do
|
||||
if Queue:HasLoop(matItemString, steps, CopyTable(visited)) then
|
||||
return true
|
||||
end
|
||||
@@ -123,18 +123,18 @@ function Queue:GetIntermediateCrafts(mats, usedItems, usedMats, tempMats)
|
||||
end
|
||||
|
||||
if quantity > 0 and not Queue:HasLoop(itemString, 0, {}) then
|
||||
local mat = TSM.db.factionrealm.mats[itemString]
|
||||
local mat = TSM.db.realm.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
|
||||
if spellID and TSM.db.realm.crafts[spellID] then
|
||||
local numResult = TSM.db.realm.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
|
||||
subCrafts[TSM.db.realm.crafts[spellID].profession] = subCrafts[TSM.db.realm.crafts[spellID].profession] or {}
|
||||
subCrafts[TSM.db.realm.crafts[spellID].profession][spellID] = (subCrafts[TSM.db.realm.crafts[spellID].profession][spellID] or 0) + quantity
|
||||
TSM.db.realm.crafts[spellID].queued = TSM.db.realm.crafts[spellID].queued + quantity
|
||||
TSM.db.realm.crafts[spellID].intermediateQueued = (TSM.db.realm.crafts[spellID].intermediateQueued or 0) + quantity
|
||||
mats[profession][itemString] = nil
|
||||
usedMats[profession] = usedMats[profession] or {}
|
||||
usedMats[profession][itemString] = numHave
|
||||
@@ -148,7 +148,7 @@ function Queue:GetIntermediateCrafts(mats, usedItems, usedMats, tempMats)
|
||||
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
|
||||
for itemString, matQuantity in pairs(TSM.db.realm.crafts[spellID].mats) do
|
||||
mats[profession] = mats[profession] or {}
|
||||
mats[profession][itemString] = (mats[profession][itemString] or 0) + matQuantity * quantity
|
||||
end
|
||||
@@ -162,7 +162,7 @@ function Queue:GetQueue()
|
||||
local totalCost, totalProfit
|
||||
|
||||
-- first queue up all the normally queued stuff
|
||||
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellID, data in pairs(TSM.db.realm.crafts) do
|
||||
if data.intermediateQueued then
|
||||
data.queued = max(data.queued - data.intermediateQueued, 0)
|
||||
data.intermediateQueued = nil
|
||||
@@ -229,14 +229,14 @@ function Queue:GetQueue()
|
||||
end
|
||||
|
||||
function Queue:ClearQueue()
|
||||
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellID, data in pairs(TSM.db.realm.crafts) do
|
||||
data.queued = 0
|
||||
data.intermediateQueued = nil
|
||||
end
|
||||
end
|
||||
|
||||
function Queue:addQueue(spellID, quantity)
|
||||
local craft = TSM.db.factionrealm.crafts[spellID]
|
||||
local craft = TSM.db.realm.crafts[spellID]
|
||||
if not craft then return end
|
||||
quantity = quantity or 1
|
||||
craft.queued = craft.queued + quantity
|
||||
@@ -244,7 +244,7 @@ function Queue:addQueue(spellID, quantity)
|
||||
end
|
||||
|
||||
function Queue:removeQueue(spellID, quantity)
|
||||
local craft = TSM.db.factionrealm.crafts[spellID]
|
||||
local craft = TSM.db.realm.crafts[spellID]
|
||||
if not craft then return end
|
||||
quantity = quantity or 1
|
||||
craft.queued = max(craft.queued - quantity, 0)
|
||||
@@ -252,6 +252,6 @@ function Queue:removeQueue(spellID, quantity)
|
||||
end
|
||||
|
||||
function Queue:getQueue(spellID)
|
||||
local craft = TSM.db.factionrealm.crafts[spellID]
|
||||
local craft = TSM.db.realm.crafts[spellID]
|
||||
return craft.queued
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@ function Sync:BroadcastTradeSkillData(timerUp)
|
||||
return
|
||||
end
|
||||
local player = UnitName("player")
|
||||
local playerTradeSkills = TSM.db.factionrealm.tradeSkills[player]
|
||||
local playerTradeSkills = TSM.db.realm.tradeSkills[player]
|
||||
if not playerTradeSkills then return end
|
||||
|
||||
local packet = {tradeSkills={}, accountKey=TSMAPI.Sync:GetAccountKey()}
|
||||
@@ -42,7 +42,7 @@ 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
|
||||
if not (TSM.db.realm.tradeSkills[player] and TSM.db.realm.tradeSkills[player][tradeSkill] and TSM.db.realm.tradeSkills[player][tradeSkill].link == link) then
|
||||
tinsert(syncQueue, {link=link, accountKey=data.accountKey, player=player})
|
||||
end
|
||||
end
|
||||
|
||||
@@ -102,38 +102,14 @@ function Util:ScanCurrentProfession()
|
||||
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 hasCD = GetSpellBaseCooldown(spellID) > 0 and 1 or nil
|
||||
local mats = {}
|
||||
if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then
|
||||
-- mats[VELLUM_ID] = 1
|
||||
-- local name = TSMAPI:GetSafeItemInfo(VELLUM_ID) or (GetLocale() == "enUS" and "Enchanting Vellum") or nil
|
||||
-- TSM.db.factionrealm.mats[VELLUM_ID] = TSM.db.factionrealm.mats[VELLUM_ID] or {}
|
||||
-- TSM.db.factionrealm.mats[VELLUM_ID].name = TSM.db.factionrealm.mats[VELLUM_ID].name or name
|
||||
local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0"
|
||||
|
||||
|
||||
|
||||
-- -- Get Cheapest vellum, lower vellum types can be replaced by III
|
||||
-- local velName
|
||||
-- if TSM.VellumInfo[spellID] then
|
||||
-- velName = GetItemInfo(TSM.VellumInfo[spellID])
|
||||
-- end
|
||||
-- if (velName ~= nil) and (not strfind(velName, "III")) then
|
||||
-- local VellumReplacePrice = TSM.Cost:GetMatCost(VellumString)
|
||||
|
||||
-- if strfind(GetSpellInfo(spellID), "Weapon") or strfind(GetSpellInfo(spellID), "Staff")then
|
||||
-- if VellumReplacePrice > TSM.Cost:GetMatCost("item:43146:0:0:0:0:0:0") then VellumString = "item:43146:0:0:0:0:0:0" end
|
||||
-- else
|
||||
-- if VellumReplacePrice > TSM.Cost:GetMatCost("item:43145:0:0:0:0:0:0") then VellumString = "item:4314:0:0:0:0:0:0" end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
|
||||
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
|
||||
TSM.db.realm.mats[VellumString] = TSM.db.realm.mats[VellumString] or {}
|
||||
TSM.db.realm.mats[VellumString].name = TSM.db.realm.mats[VellumString].name or name
|
||||
numMade = 1
|
||||
end
|
||||
|
||||
@@ -154,15 +130,15 @@ function Util:ScanCurrentProfession()
|
||||
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
|
||||
TSM.db.realm.mats[matID] = TSM.db.realm.mats[matID] or {}
|
||||
TSM.db.realm.mats[matID].name = TSM.db.realm.mats[matID].name or name
|
||||
end
|
||||
|
||||
if isValid then
|
||||
local players = TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].players or {}
|
||||
local players = TSM.db.realm.crafts[spellID] and TSM.db.realm.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
|
||||
local queued = TSM.db.realm.crafts[spellID] and TSM.db.realm.crafts[spellID].queued or 0
|
||||
local intermediateQueued = TSM.db.realm.crafts[spellID] and TSM.db.realm.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
|
||||
@@ -182,7 +158,7 @@ function Util:ScanCurrentProfession()
|
||||
end
|
||||
|
||||
-- search for and remove any spells that we can't craft anymore
|
||||
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellID, data in pairs(TSM.db.realm.crafts) do
|
||||
if data.profession == currentTradeSkill then
|
||||
local hasCrafters = false
|
||||
for player in pairs(data.players) do
|
||||
@@ -193,14 +169,14 @@ function Util:ScanCurrentProfession()
|
||||
end
|
||||
|
||||
if not hasCrafters then
|
||||
TSM.db.factionrealm.crafts[spellID] = nil
|
||||
TSM.db.realm.crafts[spellID] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- save the new craft info
|
||||
for spellID, data in pairs(newCrafts) do
|
||||
TSM.db.factionrealm.crafts[spellID] = data
|
||||
TSM.db.realm.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
|
||||
@@ -251,40 +227,15 @@ function Util.ScanSyncedProfessionThread(self)
|
||||
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 hasCD = GetSpellBaseCooldown(spellID) > 0 and 1 or nil
|
||||
local mats = {}
|
||||
if currentTradeSkill == TSM.enchantingName and strfind(itemLink, "enchant:") then
|
||||
-- mats[VELLUM_ID] = 1
|
||||
-- local name = TSMAPI:GetSafeItemInfo(VELLUM_ID) or (GetLocale() == "enUS" and "Enchanting Vellum") or nil
|
||||
-- TSM.db.factionrealm.mats[VELLUM_ID] = TSM.db.factionrealm.mats[VELLUM_ID] or {}
|
||||
-- TSM.db.factionrealm.mats[VELLUM_ID].name = TSM.db.factionrealm.mats[VELLUM_ID].name or name
|
||||
|
||||
local VellumString = "item:"..TSM.VellumInfo[spellID]..":0:0:0:0:0:0"
|
||||
|
||||
|
||||
|
||||
-- -- Get Cheapest vellum, lower vellum types can be replaced by III
|
||||
-- local velName
|
||||
-- if TSM.VellumInfo[spellID] then
|
||||
-- velName = GetItemInfo(TSM.VellumInfo[spellID])
|
||||
-- end
|
||||
-- if (velName ~= nil) and (not strfind(velName, "III")) then
|
||||
-- local VellumReplacePrice = TSM.Cost:GetMatCost(VellumString)
|
||||
|
||||
-- if strfind(GetSpellInfo(spellID), "Weapon") or strfind(GetSpellInfo(spellID), "Staff")then
|
||||
-- if VellumReplacePrice > TSM.Cost:GetMatCost("item:43146:0:0:0:0:0:0") then VellumString = "item:43146:0:0:0:0:0:0" end
|
||||
-- else
|
||||
-- if VellumReplacePrice > TSM.Cost:GetMatCost("item:43145:0:0:0:0:0:0") then VellumString = "item:4314:0:0:0:0:0:0" end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
TSM.db.realm.mats[VellumString] = TSM.db.realm.mats[VellumString] or {}
|
||||
TSM.db.realm.mats[VellumString].name = TSM.db.realm.mats[VellumString].name or name
|
||||
numMade = 1
|
||||
end
|
||||
|
||||
@@ -305,15 +256,15 @@ function Util.ScanSyncedProfessionThread(self)
|
||||
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
|
||||
TSM.db.realm.mats[matID] = TSM.db.realm.mats[matID] or {}
|
||||
TSM.db.realm.mats[matID].name = TSM.db.realm.mats[matID].name or name
|
||||
end
|
||||
|
||||
if isValid then
|
||||
local players = TSM.db.factionrealm.crafts[spellID] and TSM.db.factionrealm.crafts[spellID].players or {}
|
||||
local players = TSM.db.realm.crafts[spellID] and TSM.db.realm.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
|
||||
local queued = TSM.db.realm.crafts[spellID] and TSM.db.realm.crafts[spellID].queued or 0
|
||||
local intermediateQueued = TSM.db.realm.crafts[spellID] and TSM.db.realm.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
|
||||
@@ -323,7 +274,7 @@ function Util.ScanSyncedProfessionThread(self)
|
||||
end
|
||||
|
||||
-- search for and remove any spells that we can't craft anymore
|
||||
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellID, data in pairs(TSM.db.realm.crafts) do
|
||||
if data.profession == currentTradeSkill then
|
||||
local hasCrafters = false
|
||||
for player in pairs(data.players) do
|
||||
@@ -334,23 +285,23 @@ function Util.ScanSyncedProfessionThread(self)
|
||||
end
|
||||
|
||||
if not hasCrafters then
|
||||
TSM.db.factionrealm.crafts[spellID] = nil
|
||||
TSM.db.realm.crafts[spellID] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- save the new craft info
|
||||
for spellID, data in pairs(newCrafts) do
|
||||
TSM.db.factionrealm.crafts[spellID] = data
|
||||
TSM.db.realm.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
|
||||
TSM.db.realm.tradeSkills[playerName] = TSM.db.realm.tradeSkills[playerName] or {}
|
||||
TSM.db.realm.tradeSkills[playerName][skillName] = TSM.db.realm.tradeSkills[playerName][skillName] or {}
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].link = TSM.isSyncing.link
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].accountKey = TSM.isSyncing.accountKey
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].level = level
|
||||
TSM.db.realm.tradeSkills[playerName][skillName].maxLevel = maxLevel
|
||||
end
|
||||
|
||||
function Util:GetSpellID(index)
|
||||
|
||||
@@ -2,262 +2,311 @@
|
||||
local TSM = select(2, ...)
|
||||
|
||||
TSM.VellumInfo = {
|
||||
[7418] = 38682,
|
||||
[7420] = 38682,
|
||||
[7426] = 38682,
|
||||
[7428] = 38682,
|
||||
[7443] = 38682,
|
||||
[7454] = 38682,
|
||||
[7457] = 38682,
|
||||
[7745] = 39349,
|
||||
[7748] = 38682,
|
||||
[7766] = 38682,
|
||||
[7771] = 38682,
|
||||
[7776] = 38682,
|
||||
[7779] = 38682,
|
||||
[7782] = 38682,
|
||||
[7786] = 39349,
|
||||
[7788] = 39349,
|
||||
[7793] = 39349,
|
||||
[7857] = 38682,
|
||||
[7859] = 38682,
|
||||
[7861] = 38682,
|
||||
[7863] = 38682,
|
||||
[7867] = 38682,
|
||||
[13378] = 38682,
|
||||
[13380] = 39349,
|
||||
[13419] = 38682,
|
||||
[13421] = 38682,
|
||||
[13464] = 38682,
|
||||
[13485] = 38682,
|
||||
[13501] = 38682,
|
||||
[13503] = 39349,
|
||||
[13522] = 38682,
|
||||
[13529] = 39349,
|
||||
[13536] = 38682,
|
||||
[13538] = 38682,
|
||||
[13607] = 38682,
|
||||
[13612] = 38682,
|
||||
[13617] = 38682,
|
||||
[13620] = 38682,
|
||||
[13622] = 38682,
|
||||
[13626] = 38682,
|
||||
[13631] = 38682,
|
||||
[13635] = 38682,
|
||||
[13637] = 38682,
|
||||
[13640] = 38682,
|
||||
[13642] = 38682,
|
||||
[13644] = 38682,
|
||||
[13646] = 38682,
|
||||
[13648] = 38682,
|
||||
[13653] = 39349,
|
||||
[13655] = 39349,
|
||||
[13657] = 38682,
|
||||
[13659] = 38682,
|
||||
[13661] = 38682,
|
||||
[13663] = 38682,
|
||||
[13687] = 38682,
|
||||
[13689] = 38682,
|
||||
[13693] = 39349,
|
||||
[13695] = 39349,
|
||||
[13698] = 38682,
|
||||
[13700] = 38682,
|
||||
[13746] = 38682,
|
||||
[13794] = 38682,
|
||||
[13815] = 38682,
|
||||
[13817] = 38682,
|
||||
[13822] = 38682,
|
||||
[13836] = 38682,
|
||||
[13841] = 38682,
|
||||
[13846] = 38682,
|
||||
[13858] = 38682,
|
||||
[13868] = 38682,
|
||||
[13882] = 38682,
|
||||
[13887] = 38682,
|
||||
[13890] = 38682,
|
||||
[13898] = 39349,
|
||||
[13905] = 38682,
|
||||
[13915] = 39349,
|
||||
[13917] = 38682,
|
||||
[13931] = 38682,
|
||||
[13933] = 38682,
|
||||
[13935] = 38682,
|
||||
[13937] = 39349,
|
||||
[13939] = 38682,
|
||||
[13941] = 38682,
|
||||
[13943] = 39349,
|
||||
[13945] = 38682,
|
||||
[13947] = 38682,
|
||||
[13948] = 38682,
|
||||
[20008] = 38682,
|
||||
[20009] = 38682,
|
||||
[20010] = 38682,
|
||||
[20011] = 38682,
|
||||
[20012] = 38682,
|
||||
[20013] = 38682,
|
||||
[20014] = 38682,
|
||||
[20015] = 38682,
|
||||
[20016] = 38682,
|
||||
[20017] = 38682,
|
||||
[20020] = 38682,
|
||||
[20023] = 38682,
|
||||
[20024] = 38682,
|
||||
[20025] = 38682,
|
||||
[20026] = 38682,
|
||||
[20028] = 38682,
|
||||
[20029] = 39349,
|
||||
[20030] = 39349,
|
||||
[20031] = 39349,
|
||||
[20032] = 39349,
|
||||
[20033] = 39349,
|
||||
[20034] = 39349,
|
||||
[20035] = 39349,
|
||||
[20036] = 39349,
|
||||
[21931] = 39349,
|
||||
[22749] = 39349,
|
||||
[22750] = 39349,
|
||||
[23799] = 39349,
|
||||
[23800] = 39349,
|
||||
[23801] = 38682,
|
||||
[23802] = 38682,
|
||||
[23803] = 39349,
|
||||
[23804] = 39349,
|
||||
[25072] = 38682,
|
||||
[25073] = 38682,
|
||||
[25074] = 38682,
|
||||
[25078] = 38682,
|
||||
[25079] = 38682,
|
||||
[25080] = 38682,
|
||||
[25081] = 38682,
|
||||
[25082] = 38682,
|
||||
[25083] = 38682,
|
||||
[25084] = 38682,
|
||||
[25086] = 37602,
|
||||
[27837] = 39349,
|
||||
[27899] = 37602,
|
||||
[27905] = 37602,
|
||||
[27906] = 37602,
|
||||
[27911] = 37602,
|
||||
[27913] = 37602,
|
||||
[27914] = 37602,
|
||||
[27917] = 37602,
|
||||
[27944] = 37602,
|
||||
[27945] = 37602,
|
||||
[27946] = 37602,
|
||||
[27947] = 37602,
|
||||
[27948] = 37602,
|
||||
[27950] = 37602,
|
||||
[27951] = 37602,
|
||||
[27954] = 37602,
|
||||
[27957] = 37602,
|
||||
[27958] = 43145,
|
||||
[27960] = 37602,
|
||||
[27961] = 37602,
|
||||
[27962] = 37602,
|
||||
[27967] = 39350,
|
||||
[27968] = 39350,
|
||||
[27971] = 39350,
|
||||
[27972] = 39350,
|
||||
[27975] = 39350,
|
||||
[27977] = 39350,
|
||||
[27981] = 39350,
|
||||
[27982] = 39350,
|
||||
[27984] = 39350,
|
||||
[28003] = 39350,
|
||||
[28004] = 39350,
|
||||
[33990] = 37602,
|
||||
[33991] = 37602,
|
||||
[33992] = 37602,
|
||||
[33993] = 37602,
|
||||
[33994] = 37602,
|
||||
[33995] = 37602,
|
||||
[33996] = 37602,
|
||||
[33997] = 37602,
|
||||
[33999] = 37602,
|
||||
[34001] = 37602,
|
||||
[34002] = 37602,
|
||||
[34003] = 37602,
|
||||
[34004] = 37602,
|
||||
[34005] = 37602,
|
||||
[34006] = 37602,
|
||||
[34007] = 37602,
|
||||
[34008] = 37602,
|
||||
[34009] = 37602,
|
||||
[34010] = 39350,
|
||||
[42620] = 39350,
|
||||
[42974] = 43146,
|
||||
[44383] = 37602,
|
||||
[44483] = 43145,
|
||||
[44484] = 43145,
|
||||
[44488] = 43145,
|
||||
[44489] = 43145,
|
||||
[44492] = 43145,
|
||||
[44494] = 43145,
|
||||
[44500] = 43145,
|
||||
[44506] = 43145,
|
||||
[44508] = 43145,
|
||||
[44509] = 43145,
|
||||
[44510] = 43146,
|
||||
[44513] = 43145,
|
||||
[44524] = 43146,
|
||||
[44528] = 43145,
|
||||
[44529] = 43145,
|
||||
[44555] = 43145,
|
||||
[44556] = 43145,
|
||||
[44575] = 43145,
|
||||
[44576] = 43146,
|
||||
[44582] = 43145,
|
||||
[44584] = 43145,
|
||||
[44588] = 43145,
|
||||
[44589] = 43145,
|
||||
[44590] = 43145,
|
||||
[44591] = 43145,
|
||||
[44592] = 43145,
|
||||
[44593] = 43145,
|
||||
[44595] = 43146,
|
||||
[44596] = 43145,
|
||||
[44598] = 43145,
|
||||
[44612] = 43145,
|
||||
[44616] = 43145,
|
||||
[44621] = 43146,
|
||||
[44623] = 43145,
|
||||
[44625] = 43145,
|
||||
[44629] = 43146,
|
||||
[44630] = 43146,
|
||||
[44631] = 43145,
|
||||
[44633] = 43146,
|
||||
[44635] = 43145,
|
||||
[46578] = 43146,
|
||||
[46594] = 37602,
|
||||
[47051] = 37602,
|
||||
[47672] = 43145,
|
||||
[47766] = 43145,
|
||||
[47898] = 43145,
|
||||
[47899] = 43145,
|
||||
[47900] = 43145,
|
||||
[47901] = 43145,
|
||||
[59619] = 43146,
|
||||
[59621] = 43146,
|
||||
[59625] = 43146,
|
||||
[60606] = 43145,
|
||||
[60609] = 43145,
|
||||
[60616] = 43145,
|
||||
[60621] = 43146,
|
||||
[60623] = 43145,
|
||||
[60653] = 43145,
|
||||
[60663] = 43145,
|
||||
[60668] = 43145,
|
||||
[60691] = 43146,
|
||||
[60692] = 43145,
|
||||
[60707] = 43146,
|
||||
[60714] = 43146,
|
||||
[60763] = 43145,
|
||||
[60767] = 43145,
|
||||
[62256] = 43145,
|
||||
[62257] = 43146,
|
||||
[62948] = 43146,
|
||||
[62959] = 43146,
|
||||
[63746] = 38682,
|
||||
[64441] = 39349,
|
||||
[64579] = 39349,
|
||||
[71692] = 38682}
|
||||
[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}
|
||||
|
||||
@@ -30,7 +30,7 @@ local savedDBDefaults = {
|
||||
showingDefaultFrame = nil,
|
||||
matsInTooltip = true,
|
||||
},
|
||||
factionrealm = {
|
||||
realm = {
|
||||
tradeSkills = {},
|
||||
crafts = {},
|
||||
mats = {},
|
||||
@@ -56,78 +56,30 @@ function TSM:OnEnable()
|
||||
TSM:RegisterModule()
|
||||
|
||||
-- fix vellum issue
|
||||
for spellid, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellid, data in pairs(TSM.db.realm.crafts) do
|
||||
for itemString in pairs(data.mats) do
|
||||
-- if itemString == "item:38682" then
|
||||
-- TSM.db.factionrealm.crafts[spellid].mats["item:38682:0:0:0:0:0:0"] = 1
|
||||
if itemString == "item:43146" then
|
||||
TSM.db.factionrealm.crafts[spellid].mats["item:43146:0:0:0:0:0:0"] = 1
|
||||
TSM.db.factionrealm.crafts[spellid].mats[itemString] = nil
|
||||
elseif itemString == "item:43145" then
|
||||
TSM.db.factionrealm.crafts[spellid].mats["item:43145:0:0:0:0:0:0"] = 1
|
||||
TSM.db.factionrealm.crafts[spellid].mats[itemString] = nil
|
||||
elseif itemString == "item:39350" then
|
||||
TSM.db.factionrealm.crafts[spellid].mats["item:39350:0:0:0:0:0:0"] = 1
|
||||
TSM.db.factionrealm.crafts[spellid].mats[itemString] = nil
|
||||
elseif itemString == "item:37602" then
|
||||
TSM.db.factionrealm.crafts[spellid].mats["item:37602:0:0:0:0:0:0"] = 1
|
||||
TSM.db.factionrealm.crafts[spellid].mats[itemString] = nil
|
||||
elseif itemString == "item:39349" then
|
||||
TSM.db.factionrealm.crafts[spellid].mats["item:39349:0:0:0:0:0:0"] = 1
|
||||
TSM.db.factionrealm.crafts[spellid].mats[itemString] = nil
|
||||
elseif itemString == "item:38682" then
|
||||
TSM.db.factionrealm.crafts[spellid].mats["item:38682:0:0:0:0:0:0"] = 1
|
||||
TSM.db.factionrealm.crafts[spellid].mats[itemString] = nil
|
||||
if itemString == "item:52510" then
|
||||
TSM.db.realm.crafts[spellid].mats["item:52510:0:0:0:0:0:0"] = 1
|
||||
TSM.db.realm.crafts[spellid].mats[itemString] = nil
|
||||
elseif itemString == "item:52511" then
|
||||
TSM.db.realm.crafts[spellid].mats["item:52511:0:0:0:0:0:0"] = 1
|
||||
TSM.db.realm.crafts[spellid].mats[itemString] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
-- if TSM.db.factionrealm.mats["item:38682"] then
|
||||
-- local name = TSMAPI:GetSafeItemInfo("item:38682:0:0:0:0:0:0") or (GetLocale() == "enUS" and "Enchanting Vellum") or nil
|
||||
-- TSM.db.factionrealm.mats["item:38682:0:0:0:0:0:0"] = {}
|
||||
-- TSM.db.factionrealm.mats["item:38682:0:0:0:0:0:0"].name = name
|
||||
-- TSM.db.factionrealm.mats["item:38682"] = nil
|
||||
-- end
|
||||
if TSM.db.factionrealm.mats["item:43146"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:43146:0:0:0:0:0:0") or nil
|
||||
TSM.db.factionrealm.mats["item:43146:0:0:0:0:0:0"] = {}
|
||||
TSM.db.factionrealm.mats["item:43146:0:0:0:0:0:0"].name = name
|
||||
TSM.db.factionrealm.mats["item:43146"] = nil
|
||||
-- if currently casting a spell, keep track of the id
|
||||
TSM.currentspell = nil
|
||||
if TSM.db.realm.mats["item:52510"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:52510:0:0:0:0:0:0") or nil
|
||||
TSM.db.realm.mats["item:52510:0:0:0:0:0:0"] = {}
|
||||
TSM.db.realm.mats["item:52510:0:0:0:0:0:0"].name = name
|
||||
TSM.db.realm.mats["item:52510"] = nil
|
||||
end
|
||||
if TSM.db.factionrealm.mats["item:43145"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:43145:0:0:0:0:0:0") or nil
|
||||
TSM.db.factionrealm.mats["item:43145:0:0:0:0:0:0"] = {}
|
||||
TSM.db.factionrealm.mats["item:43145:0:0:0:0:0:0"].name = name
|
||||
TSM.db.factionrealm.mats["item:43145"] = nil
|
||||
end
|
||||
if TSM.db.factionrealm.mats["item:39350"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:39350:0:0:0:0:0:0") or nil
|
||||
TSM.db.factionrealm.mats["item:39350:0:0:0:0:0:0"] = {}
|
||||
TSM.db.factionrealm.mats["item:39350:0:0:0:0:0:0"].name = name
|
||||
TSM.db.factionrealm.mats["item:39350"] = nil
|
||||
end
|
||||
if TSM.db.factionrealm.mats["item:39350"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:39350:0:0:0:0:0:0") or nil
|
||||
TSM.db.factionrealm.mats["item:39350:0:0:0:0:0:0"] = {}
|
||||
TSM.db.factionrealm.mats["item:39350:0:0:0:0:0:0"].name = name
|
||||
TSM.db.factionrealm.mats["item:39350"] = nil
|
||||
end
|
||||
if TSM.db.factionrealm.mats["item:37602"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:37602:0:0:0:0:0:0") or nil
|
||||
TSM.db.factionrealm.mats["item:37602:0:0:0:0:0:0"] = {}
|
||||
TSM.db.factionrealm.mats["item:37602:0:0:0:0:0:0"].name = name
|
||||
TSM.db.factionrealm.mats["item:37602"] = nil
|
||||
end
|
||||
if TSM.db.factionrealm.mats["item:39349"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:39349:0:0:0:0:0:0") or nil
|
||||
TSM.db.factionrealm.mats["item:39349:0:0:0:0:0:0"] = {}
|
||||
TSM.db.factionrealm.mats["item:39349:0:0:0:0:0:0"].name = name
|
||||
TSM.db.factionrealm.mats["item:39349"] = nil
|
||||
end
|
||||
if TSM.db.factionrealm.mats["item:38682"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:38682:0:0:0:0:0:0") or nil
|
||||
TSM.db.factionrealm.mats["item:38682:0:0:0:0:0:0"] = {}
|
||||
TSM.db.factionrealm.mats["item:38682:0:0:0:0:0:0"].name = name
|
||||
TSM.db.factionrealm.mats["item:38682"] = nil
|
||||
if TSM.db.realm.mats["item:52511"] then
|
||||
local name = TSMAPI:GetSafeItemInfo("item:52511:0:0:0:0:0:0") or nil
|
||||
TSM.db.realm.mats["item:52511:0:0:0:0:0:0"] = {}
|
||||
TSM.db.realm.mats["item:52511:0:0:0:0:0:0"].name = name
|
||||
TSM.db.realm.mats["item:52511"] = nil
|
||||
end
|
||||
|
||||
local func, err = TSMAPI:ParseCustomPrice(TSM.db.global.defaultCraftPriceMethod, "crafting")
|
||||
@@ -176,7 +128,7 @@ TSM.operationDefaults = {
|
||||
minProfit = 1000000,
|
||||
craftPriceMethod = nil,
|
||||
ignorePlayer = {},
|
||||
ignoreFactionrealm = {},
|
||||
ignorerealm = {},
|
||||
relationships = {},
|
||||
}
|
||||
|
||||
@@ -233,38 +185,11 @@ function TSM:GetTooltip(itemString)
|
||||
tinsert(text, { left = " " .. L["Crafting Cost"], right = format("%s", costText) })
|
||||
end
|
||||
|
||||
if TSM.db.global.matsInTooltip and TSM.db.factionrealm.crafts[spellID] then
|
||||
for matItemString, matQuantity in pairs(TSM.db.factionrealm.crafts[spellID].mats) do
|
||||
if TSM.db.global.matsInTooltip and TSM.db.realm.crafts[spellID] then
|
||||
for matItemString, matQuantity in pairs(TSM.db.realm.crafts[spellID].mats) do
|
||||
local name, _, quality = TSMAPI:GetSafeItemInfo(matItemString)
|
||||
if name then
|
||||
local mat = TSM.db.factionrealm.mats[matItemString]
|
||||
|
||||
|
||||
|
||||
-- Get Cheapest vellum, lower vellum types can be replaced by III
|
||||
local velName
|
||||
if strfind(name, "Vellum") then
|
||||
velName = name
|
||||
end
|
||||
if (velName ~= nil) and (not strfind(velName, "III")) then
|
||||
local VellumReplacePrice = TSM.Cost:GetMatCost(matItemString)
|
||||
|
||||
if strfind(velName, "Weapon Vellum") then
|
||||
if VellumReplacePrice > TSM.Cost:GetMatCost("item:43146:0:0:0:0:0:0") then
|
||||
matItemString = "item:43146:0:0:0:0:0:0"
|
||||
name = TSMAPI:GetSafeItemInfo(matItemString)
|
||||
end
|
||||
else
|
||||
if VellumReplacePrice > TSM.Cost:GetMatCost("item:43145:0:0:0:0:0:0") then
|
||||
matItemString = "item:43145:0:0:0:0:0:0"
|
||||
name = TSMAPI:GetSafeItemInfo(matItemString)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
local mat = TSM.db.realm.mats[matItemString]
|
||||
if mat then
|
||||
local cost = TSM:GetCustomPrice(mat.customValue or TSM.db.global.defaultMatCostMethod, matItemString)
|
||||
if cost then
|
||||
@@ -292,7 +217,7 @@ function TSM:GetTooltip(itemString)
|
||||
end
|
||||
end
|
||||
if TSM.db.global.materialTooltip then
|
||||
local mat = TSM.db.factionrealm.mats[itemString]
|
||||
local mat = TSM.db.realm.mats[itemString]
|
||||
if mat then
|
||||
local cost = TSM:GetCustomPrice(mat.customValue or TSM.db.global.defaultMatCostMethod, itemString)
|
||||
if cost then
|
||||
@@ -322,9 +247,9 @@ function TSM:GetCraftingCost(link)
|
||||
TSM:UpdateCraftReverseLookup()
|
||||
local _, cost = TSM.Cost:GetLowestCraftPrices(itemString)
|
||||
if cost then
|
||||
TSM.db.factionrealm.craftingCostCache[itemString] = cost
|
||||
TSM.db.realm.craftingCostCache[itemString] = cost
|
||||
end
|
||||
return TSM.db.factionrealm.craftingCostCache[itemString]
|
||||
return TSM.db.realm.craftingCostCache[itemString]
|
||||
end
|
||||
|
||||
function TSM:GetCraftingMatCost(link)
|
||||
@@ -342,7 +267,7 @@ function TSM:UpdateCraftReverseLookup()
|
||||
reverseLookupUpdate = time()
|
||||
TSM.craftReverseLookup = {}
|
||||
|
||||
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellID, data in pairs(TSM.db.realm.crafts) do
|
||||
TSM.craftReverseLookup[data.itemID] = TSM.craftReverseLookup[data.itemID] or {}
|
||||
tinsert(TSM.craftReverseLookup[data.itemID], spellID)
|
||||
end
|
||||
@@ -355,7 +280,7 @@ end
|
||||
|
||||
function TSM:getCDCrafts()
|
||||
local crafts = {}
|
||||
for spellID, data in pairs(TSM.db.factionrealm.crafts) do
|
||||
for spellID, data in pairs(TSM.db.realm.crafts) do
|
||||
if data.hasCD then
|
||||
crafts[spellID] = data.name
|
||||
end
|
||||
@@ -392,7 +317,7 @@ function TSM:RestockHelp(link)
|
||||
-- check that this item is craftable
|
||||
TSM:UpdateCraftReverseLookup()
|
||||
local spellID = TSM.craftReverseLookup[itemString] and TSM.craftReverseLookup[itemString][1]
|
||||
if not spellID or not TSM.db.factionrealm.crafts[spellID] then
|
||||
if not spellID or not TSM.db.realm.crafts[spellID] then
|
||||
return print("You don't know how to craft this item.")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user