Skip to content

Commit

Permalink
fixes for 10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanCobb committed Nov 21, 2022
1 parent 23153ef commit 7e019bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

13 changes: 5 additions & 8 deletions OpenThosePouches.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,17 @@ local ignoredItems = {
}

local function IsPouch(container, slot)
local texture, count, locked, quality, readable, lootable, itemLink = GetContainerItemInfo(container, slot)
if itemLink == nil then
local itemInfo = C_Container.GetContainerItemInfo(container, slot)
if itemInfo == nil then
return false
end

if lootable == false then
if itemInfo["hasLoot"] == false then
return false
end

local itemId = GetContainerItemID(container, slot)

for _i, lockedItemId in ipairs(ignoredItems) do
if lockedItemId == itemId then
if lockedItemId == itemInfo["itemID"] then
return false
end
end
Expand All @@ -74,9 +72,8 @@ local function OpenNextPouch()
-- print("Looking for pouches")

for container = BACKPACK_CONTAINER, NUM_BAG_SLOTS do
for slot = 1, GetContainerNumSlots(container) do
for slot = 1, C_Container.GetContainerNumSlots(container) do
if IsPouch(container, slot) == true then
-- print("Opening ", itemLink)
UseContainerItem(container, slot)
C_Timer.After(delayBetweenSearches, OpenNextPouch)
return
Expand Down
4 changes: 2 additions & 2 deletions OpenThosePouches.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 90207
## Interface: 10002
## Title: Open Those Pouches
## Notes: Automatically opens and tries to loot any backpacks, satchels, or pouches as you loot them
## Author: @icbat
## Version: 9
## Version: 10

## X-WoWI-ID: 26222

Expand Down

0 comments on commit 7e019bd

Please sign in to comment.