Skip to content

Commit

Permalink
Change itemEquipLoc from INVTYPE_ROBE to INVTYPE_CHEST
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed Mar 2, 2024
1 parent 030f170 commit 98f8c67
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Skillet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function Skillet:OnInitialize()
local dataVersion = 5
local queueVersion = 1
local customVersion = 1
local recipeVersion = 4
local recipeVersion = 5
local _,wowBuild,_,wowVersion = GetBuildInfo();
self.wowBuild = wowBuild
self.wowVersion = wowVersion
Expand Down
4 changes: 4 additions & 0 deletions SkilletData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,10 @@ local function ScanTrade()
Skillet.db.realm.subClass[player][tradeID][itemID] = itemSubType
end
if itemEquipLoc then
if itemEquipLoc == "INVTYPE_ROBE" then
DA.DEBUG(2,"ScanTrade: Changing itemEquipLoc from INVTYPE_ROBE to INVTYPE_CHEST")
itemEquipLoc = "INVTYPE_CHEST"
end
if not Skillet.db.realm.invSlot[player][tradeID].name then
Skillet.db.realm.invSlot[player][tradeID].name = {}
Skillet.db.realm.invSlot[player][tradeID].selected = "None"
Expand Down
3 changes: 3 additions & 0 deletions SkilletNewsData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Skillet.NewsData = {
data = {
{ header = "Skill Levels", body = "Update for WotLK recipes" },
},
data = {
{ header = "Slot Filter", body = "Change itemEquipLoc from INVTYPE_ROBE to INVTYPE_CHEST" },
},
},
},
},
Expand Down
8 changes: 5 additions & 3 deletions UI/Filtering.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("Skillet")
-- Skillet.db.realm.invSlot[player][tradeID].selected
--
function Skillet:RecipeFilter(skillIndex)
--DA.DEBUG(1,"RecipeFilter("..tostring(skillIndex)..")")
--DA.DEBUG(0,"RecipeFilter("..tostring(skillIndex)..")")
local skill = Skillet:GetSkill(Skillet.currentPlayer, Skillet.currentTrade, skillIndex)
--DA.DEBUG(1,"skill= "..DA.DUMP1(skill,1))
local recipe = Skillet:GetRecipe(skill.id)
Expand All @@ -61,17 +61,19 @@ function Skillet:RecipeFilter(skillIndex)
--DA.DEBUG(1,"RecipeFilter: not filtering anything")
return false
end
DA.DEBUG(1,"RecipeFilter: itemID= "..tostring(itemID)..", subClass= "..tostring(subClass[itemID])..", invSlot= "..tostring(invSlot[itemID]))
DA.DEBUG(1,"RecipeFilter: subClass.selected= "..tostring(subClass.selected)..", invSlot.selected= "..tostring(invSlot.selected))
if subClass[itemID] == subClass.selected or invSlot[itemID] == invSlot.selected then
--
-- filtering active, return only items that meet the criteria
--
--DA.DEBUG(1,"RecipeFilter: filtering active, item met the criteria")
DA.DEBUG(1,"RecipeFilter: filtering active, "..tostring(recipe.name).." met the criteria")
return false
end
--
-- filtering active, item did not meet the criteria
--
--DA.DEBUG(1,"RecipeFilter: filtering active, item did not meet the criteria")
DA.DEBUG(1,"RecipeFilter: filtering active, "..tostring(recipe.name).." did not meet the criteria")
return true
end

Expand Down

0 comments on commit 98f8c67

Please sign in to comment.