-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Frame to make Scrapping Items Easier
- Loading branch information
Showing
4 changed files
with
102 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
---@class RemixGemHelperPrivate | ||
local Private = select(2, ...) | ||
local const = Private.constants | ||
|
||
local scrapUtil = {} | ||
Private.ScrapUtil = scrapUtil | ||
|
||
---@return table | ||
function scrapUtil:GetScrappableItems() | ||
local scrapable = {} | ||
for bag = BACKPACK_CONTAINER, NUM_TOTAL_EQUIPPED_BAG_SLOTS do | ||
for slot = 1, C_Container.GetContainerNumSlots(bag) do | ||
local itemLoc = ItemLocation:CreateFromBagAndSlot(bag, slot) | ||
if C_Item.DoesItemExist(itemLoc) and C_Item.CanScrapItem(itemLoc) then | ||
tinsert(scrapable, { | ||
itemID = C_Item.GetItemID(itemLoc), | ||
itemLink = C_Item.GetItemLink(itemLoc) | ||
}) | ||
end | ||
end | ||
end | ||
return scrapable | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters