Browse Source

fix expertise enchant, add note so this mistake isnt made again

pull/26/head
andrew6180 7 months ago
parent
commit
ea602dbbce
  1. 7
      TradeSkillMaster_Crafting/Modules/Cost.lua
  2. 4
      TradeSkillMaster_Crafting/Modules/EnchantingInfo.lua

7
TradeSkillMaster_Crafting/Modules/Cost.lua

@ -110,12 +110,11 @@ function Cost:GetLowestCraftPrices(itemString, intermediate)
if not spellIDs then return end if not spellIDs then return end
local lowestCost, cheapestSpellID local lowestCost, cheapestSpellID
local soh = "item:76061:0:0:0:0:0:0" -- Spirit of Harmony local soh = "item:76061:0:0:0:0:0:0" -- Spirit of Harmony
local fb = "item:800405:0:0:0:0:0:0" -- Fel Blood
for _, spellID in ipairs(spellIDs) do for _, spellID in ipairs(spellIDs) do
if TSM.db.realm.crafts[spellID] then if TSM.db.realm.crafts[spellID] then
if intermediate and (TSM.db.realm.crafts[spellID].mats[soh] or TSM.db.realm.crafts[spellID].mats[fb] or TSM.db.realm.crafts[spellID].hasCD) then if intermediate and (TSM.db.realm.crafts[spellID].mats[soh] or TSM.db.realm.crafts[spellID].hasCD) then
break break
end --exclude spells using SOH and FB or have cooldown from intermediate crafts end --exclude spells using SOH or have cooldown from intermediate crafts
local cost = Cost:GetCraftCost(spellID) local cost = Cost:GetCraftCost(spellID)
if cost and (not lowestCost or cost < lowestCost) then 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 -- exclude spells with cooldown if option to ignore is enabled or more than one way to craft and not soulbound e.g. BoE
@ -145,4 +144,4 @@ function Cost:GetLowestCraftPrices(itemString, intermediate)
end end
return cheapestSpellID, lowestCost, buyout, profit return cheapestSpellID, lowestCost, buyout, profit
end end

4
TradeSkillMaster_Crafting/Modules/EnchantingInfo.lua

@ -9,6 +9,7 @@
-- load the parent file (TSM) into a local variable -- load the parent file (TSM) into a local variable
local TSM = select(2, ...) local TSM = select(2, ...)
-- [SPELL ID] = [SCROLL ID]
TSM.enchantingName = GetSpellInfo(7411) TSM.enchantingName = GetSpellInfo(7411)
-- looks up the itemID of the scroll that the enchant makes -- looks up the itemID of the scroll that the enchant makes
@ -703,6 +704,7 @@ TSM.enchantingItemIDs = {
[1968771] = 1204144, -- Scroll of Enchant Weapon - Overpowering Twisted Crusader [1968771] = 1204144, -- Scroll of Enchant Weapon - Overpowering Twisted Crusader
[355107] = 354313, -- Scroll of Enchant 2H Weapon - Leyline Conduit [355107] = 354313, -- Scroll of Enchant 2H Weapon - Leyline Conduit
[20044] = 46510, -- Scroll of Enchant Weapon - Strider [20044] = 46510, -- Scroll of Enchant Weapon - Strider
[201961] = 44486, -- Scroll of Enchant Gloves - Lesser Expertise [44486] = 201961, -- Scroll of Enchant Gloves - Lesser Expertise
} }
-- [SPELL ID] = [SCROLL ID]
Loading…
Cancel
Save