Merge pull request #43 from AssemblerManiac/master

manavortex [05-06-18 - 13:05]
Merge pull request #43 from AssemblerManiac/master

added All Account Owned filter to dropdown
Filename
IIfA/IIfA.lua
IIfA/IIfABackpack.lua
diff --git a/IIfA/IIfA.lua b/IIfA/IIfA.lua
index 928e891..ff91b91 100644
--- a/IIfA/IIfA.lua
+++ b/IIfA/IIfA.lua
@@ -70,6 +70,7 @@ IIfA.dropdownLocNames = {
 	"All Banks",
 	"All Guild Banks",
 	"All Characters",
+	"All Account Owned",
 	"Bank and Characters",
 	"Bank and Current Character",
 	"Bank and other characters",
diff --git a/IIfA/IIfABackpack.lua b/IIfA/IIfABackpack.lua
index 4fa1dd0..bd3aeca 100644
--- a/IIfA/IIfABackpack.lua
+++ b/IIfA/IIfABackpack.lua
@@ -117,6 +117,10 @@ local function DoesInventoryMatchList(locationName, location)
 	elseif (filter == "All Characters") then
 		return IIfA:IsOneOf(bagId, BAG_BACKPACK, BAG_WORN)

+	elseif (filter == "All Account Owned") then
+		return IIfA:IsOneOf(bagId, BAG_BACKPACK, BAG_WORN, BAG_BANK, BAG_SUBSCRIBER_BANK, BAG_VIRTUAL) or
+			(nil ~= GetCollectibleForHouseBankBag and GetCollectibleForHouseBankBag(bagId) > 0)
+
 	elseif (filter == "Bank and Characters") then
 		return IIfA:IsOneOf(bagId, BAG_BANK, BAG_SUBSCRIBER_BANK, BAG_BACKPACK, BAG_WORN)