Skip to content

Commit

Permalink
Removed Warning when destroying socketed items as the gems should aut…
Browse files Browse the repository at this point in the history
…omatically go into your bag
  • Loading branch information
Larsj02 committed May 20, 2024
1 parent 1f53167 commit d7038cf
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -354,21 +354,22 @@ end
local eventFrame = CreateFrame("Frame")
eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
---@diagnostic disable-next-line: param-type-mismatch
eventFrame:RegisterEvent("SCRAPPING_MACHINE_ITEM_ADDED")
--eventFrame:RegisterEvent("SCRAPPING_MACHINE_ITEM_ADDED")
eventFrame:SetScript("OnEvent", function(_, event)
if event == "SCRAPPING_MACHINE_ITEM_ADDED" then
RunNextFrame(function()
local mun = ScrappingMachineFrame
for f in pairs(mun.ItemSlots.scrapButtons.activeObjects) do
if f.itemLink then
local gemsList = gemUtil:GetItemGems(f.itemLink)
if #gemsList > 0 then
misc:PrintError("YOU ARE ABOUT TO DESTROY A SOCKETED ITEM!")
end
end
end
end)
end
-- Apparently Gems go into your bags so this is not longer needed
--if event == "SCRAPPING_MACHINE_ITEM_ADDED" then
--RunNextFrame(function()
-- local mun = ScrappingMachineFrame
-- for f in pairs(mun.ItemSlots.scrapButtons.activeObjects) do
-- if f.itemLink then
-- local gemsList = gemUtil:GetItemGems(f.itemLink)
-- if #gemsList > 0 then
-- misc:PrintError("YOU ARE ABOUT TO DESTROY A SOCKETED ITEM!")
-- end
-- end
-- end
--end)
--end
if event ~= "PLAYER_ENTERING_WORLD" then return end

for itemID in pairs(const.GEM_SOCKET_TYPE) do
Expand Down

0 comments on commit d7038cf

Please sign in to comment.