diff --git a/IIfA/IIfA.lua b/IIfA/IIfA.lua
index 3646cf9..37d62b4 100644
--- a/IIfA/IIfA.lua
+++ b/IIfA/IIfA.lua
@@ -21,7 +21,7 @@ if IIfA == nil then IIfA = {} end
--local IIfA = IIfA
IIfA.name = "Inventory Insight"
-IIfA.version = "3.05"
+IIfA.version = "3.06"
IIfA.author = "AssemblerManiac & manavortex"
IIfA.defaultAlertSound = nil
IIfA.colorHandler = nil
@@ -41,18 +41,32 @@ local POPUPTOOLTIP = ZO_PopupToolTip
local IIFA_COLORDEF_DEFAULT = ZO_ColorDef:New("3399FF")
+local task = IIfA.task or LibStub("LibAsync"):Create("IIfA_DataCollection")
+IIfA.task = task
+
-- --------------------------------------------------------------
-- Global Variables and external functions
-- --------------------------------------------------------------
+-- BAG_SUBSCRIBER_BANK handled special in the CollectAll function - do NOT add to this list
+
IIfA.trackedBags = {
- [BAG_WORN] = true,
- [BAG_BACKPACK] = true,
- [BAG_BANK] = true,
- [BAG_SUBSCRIBER_BANK] = true,
- [BAG_GUILDBANK] = true,
- [BAG_VIRTUAL] = true,
+ [BAG_WORN] = true,
+ [BAG_BACKPACK] = true,
+ [BAG_BANK] = true,
+ [BAG_GUILDBANK] = true,
+ [BAG_VIRTUAL] = true,
+ [BAG_HOUSE_BANK_TWO] = true,
+ [BAG_HOUSE_BANK_THREE] = true,
+ [BAG_HOUSE_BANK_FOUR] = true,
+ [BAG_HOUSE_BANK_FIVE] = true,
+ [BAG_HOUSE_BANK_SIX] = true,
+ [BAG_HOUSE_BANK_SEVEN] = true,
+ [BAG_HOUSE_BANK_EIGHT] = true,
+ [BAG_HOUSE_BANK_NINE] = true,
+ [BAG_HOUSE_BANK_TEN] = true,
}
+
IIfA.dropdownBankNames = {
"All",
"All Banks",
@@ -67,21 +81,6 @@ IIfA.dropdownBankNames = {
"All Houses",
}
-if IIfA.trackedBags[BAG_SUBSCRIBER_BANK] == nil then
- IIfA.trackedBags[BAG_SUBSCRIBER_BANK] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_TWO] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_THREE] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_FOUR] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_FIVE] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_SIX] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_SEVEN] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_EIGHT] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_NINE] = true
- IIfA.trackedBags[BAG_HOUSE_BANK_TEN] = true
- table.insert(IIfA.dropdownBankNames, "Housing Storage")
-end
-
-
function IIfA:GetItemID(itemLink)
local ret = nil
if (itemLink) then
@@ -504,8 +503,11 @@ function IIfA_onLoad(eventCode, addOnName)
IIfA:RegisterForEvents()
IIfA:RegisterForSceneChanges() -- register for callbacks on scene statechanges using user preferences or defaults
- IIfA.trackedBags[BAG_WORN] = not IIfA:IsCharacterEquipIgnored(IIfA.currentCharacterId)
- IIfA.trackedBags[BAG_BACKPACK] = not IIfA:IsCharacterInventoryIgnored(IIfA.currentCharacterId)
+ IIfA.ignoredCharEquipment = IIfA.ignoredCharEquipment or {}
+ IIfA.ignoredCharInventories = IIfA.ignoredCharInventories or {}
+
+ IIfA.trackedBags[BAG_WORN] = not IIfA:IsCharacterEquipIgnored()
+ IIfA.trackedBags[BAG_BACKPACK] = not IIfA:IsCharacterInventoryIgnored()
IIfA:CollectAll()
diff --git a/IIfA/IIfA.txt b/IIfA/IIfA.txt
index 086b19f..a92363c 100644
--- a/IIfA/IIfA.txt
+++ b/IIfA/IIfA.txt
@@ -1,6 +1,6 @@
## Title: Inventory Insight
## Author: manavortex, AssemblerManiac
-## Version: 3.05
+## Version: 3.06
## APIVersion: 100022
## SavedVariables: IIfA_Settings IIfA_Data
## OptionalDependsOn: libFilters pChat
@@ -48,7 +48,7 @@ IIfA_xml_adapter.lua
; DISCLOSURE:
; This Add-on is not created by, affiliated with or sponsored by ZeniMax
-; Media Inc. or its affiliates. The Elder Scrolls® and related logos are
+; Media Inc. or its affiliates. The Elder Scrolls and related logos are
; registered trademarks or trademarks of ZeniMax Media Inc. in the United
; States and/or other countries. All rights reserved.
; You can read the full terms at https://account.elderscrollsonline.com/add-on-terms
diff --git a/IIfA/IIfA.xml b/IIfA/IIfA.xml
index 3bf3db0..65d98fb 100644
--- a/IIfA/IIfA.xml
+++ b/IIfA/IIfA.xml
@@ -844,7 +844,7 @@
<Control name="$(parent)_Sort" verticalAlignment="LEFT">
<Dimensions y="30"/>
<Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="2" />
- <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT" offsetX="2" />
+ <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT" offsetX="2" />
<Controls>
<Texture name="$(parent)_Icon" textureFile="/esoui/art/miscellaneous/list_sortheader_icon_sortdown.dds">
<Dimensions x="30" y="30"/>
@@ -852,14 +852,18 @@
</Texture>
<Button name="$(parent)_SortName" text="Name" font="ZoFontGameLargeBold" verticalAlignment="CENTER" horizontalAlignment="CENTER">
<Anchor point="TOPLEFT" relativeTo="$(parent)_Icon" relativePoint="TOPRIGHT" offsetX="20"/>
- <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)_Icon" relativePoint="BOTTOMLEFT" offsetX="260"/>
+ <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)_Icon" relativePoint="BOTTOMLEFT" offsetX="260"/>
<OnMouseUp>IIfA:GuiOnSort(false)</OnMouseUp>
+ <OnMouseEnter>IIfA:GuiShowFilterTooltip(self, "Sort By Name")</OnMouseEnter>
+ <OnMouseExit>IIfA:GuiHideTooltip(self)</OnMouseExit>
</Button>
<Button name="$(parent)_SortQuality" text="Quality" font="ZoFontGameLargeBold" verticalAlignment="CENTER" horizontalAlignment="CENTER">
<Anchor point="TOPLEFT" relativeTo="$(parent)_SortName" relativePoint="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="BOTTOMRIGHT"/>
<Dimensions y="45"/>
<OnMouseUp>IIfA:GuiOnSort(true)</OnMouseUp>
+ <OnMouseEnter>IIfA:GuiShowFilterTooltip(self, "Sort by Quality")</OnMouseEnter>
+ <OnMouseExit>IIfA:GuiHideTooltip(self)</OnMouseExit>
</Button>
</Controls>
diff --git a/IIfA/IIfADataCollection.lua b/IIfA/IIfADataCollection.lua
index 4ce346a..aa70b13 100644
--- a/IIfA/IIfADataCollection.lua
+++ b/IIfA/IIfADataCollection.lua
@@ -1,7 +1,7 @@
local IIfA = IIfA
local EMPTY_STRING = ""
-local task = LibStub("LibAsync"):Create("IIfA_DataCollection")
+local task = IIfA.task or LibStub("LibAsync"):Create("IIfA_DataCollection")
IIfA.task = task
local function p(...) IIfA:DebugOut(...) end
@@ -99,13 +99,13 @@ function IIfA:ScanCurrentCharacter()
IIfA:ClearLocationData(IIfA.currentCharacterId)
- if not IIfA:IsCharacterEquipIgnored(playerName) then
+ if not IIfA:IsCharacterEquipIgnored() then
-- call with libAsync to avoid lags
task:Call(function()
grabBagContent(BAG_WORN)
end)
end
- if not IIfA:IsCharacterInventoryIgnored(playerName) then
+ if not IIfA:IsCharacterInventoryIgnored() then
-- call with libAsync to avoid lags
task:Call(function()
grabBagContent(BAG_BACKPACK)
@@ -290,7 +290,7 @@ function IIfA:RescanHouse(houseCollectibleId)
IIfA.data.collectHouseData[houseCollectibleId] = IIfA.data.collectHouseData[houseCollectibleId] or IIfA:GetHouseTracking()
if not IIfA.data.collectHouseData[houseCollectibleId] then
- if IIfA:GetHouseTracking() and IIfA:GetIgnoredHousIds()[houseCollectibleId] then
+ if IIfA:GetHouseTracking() and IIfA:GetIgnoredHouseIds()[houseCollectibleId] then
IIfA.trackedBags[houseCollectibleId] = false
return
end
@@ -555,12 +555,12 @@ function IIfA:CollectAll()
-- call with libAsync to avoid lags
task:Call(function()
bagItems = GetBagSize(bagId)
- if bagId == BAG_WORN then --location for BAG_BACKPACK and BAG_WORN is the same so only reset once
- IIfA:ClearLocationData(IIfA.currentCharacterId)
+ if bagId == BAG_WORN then
+ IIfA:ClearLocationData(IIfA.currentCharacterId, BAG_WORN)
elseif bagId == BAG_BANK then -- do NOT add BAG_SUBSCRIBER_BANK here, it'll wipe whatever already got put into the bank on first hit
IIfA:ClearLocationData(GetString(IIFA_BAG_BANK))
elseif bagId == BAG_BACKPACK then
- IIfA:ClearLocationData(GetString(IIFA_BAG_BACKPACK))
+ IIfA:ClearLocationData(IIfA.currentCharacterId, BAG_BACKPACK)
elseif bagId == BAG_VIRTUAL then
IIfA:ClearLocationData(GetString(IIFA_BAG_CRAFTBAG))
elseif bagId >= BAG_HOUSE_BANK_ONE and bagId <= BAG_HOUSE_BANK_TEN then
@@ -570,20 +570,20 @@ function IIfA:CollectAll()
tracked = false -- prevent reading the house bag if we're not in our own home
end
end
- -- d(" BagItemCount=" .. bagItems)
- if bagId ~= BAG_VIRTUAL and tracked then
- grabBagContent(bagId)
- if bagId == BAG_BANK then
- grabBagContent(BAG_SUBSCRIBER_BANK)
- end
--- for slotId=0, bagItems, 1 do
--- dbItem, itemKey = IIfA:EvalBagItem(bagId, slotId)
--- end
- else -- it's bag virtual
- slotId = GetNextVirtualBagSlotId(nil)
- while slotId ~= nil do
- IIfA:EvalBagItem(bagId, slotId)
- slotId = GetNextVirtualBagSlotId(slotId)
+ if tracked then
+ if bagId ~= BAG_VIRTUAL then
+ if bagId ~= BAG_SUBSCRIBER_BANK then
+ grabBagContent(bagId)
+ if bagId == BAG_BANK then
+ grabBagContent(BAG_SUBSCRIBER_BANK)
+ end
+ end
+ else -- it's bag virtual
+ slotId = GetNextVirtualBagSlotId(nil)
+ while slotId ~= nil do
+ IIfA:EvalBagItem(bagId, slotId)
+ slotId = GetNextVirtualBagSlotId(slotId)
+ end
end
end
@@ -628,19 +628,24 @@ function IIfA:ClearUnowned()
end
-function IIfA:ClearLocationData(location)
+function IIfA:ClearLocationData(location, bagID) -- if loc is characterid, bagID can be BAG_BACKPACK, or BAG_WORN, if nil, don't do anything
local DBv3 = IIfA.database
local itemLocation = nil
local LocationCount = 0
local itemName, itemData
+ local bChar
+ if bagID == nil then
+ bChar = nil
+ else
+ bChar = location == IIfA.currentCharacterId
+ end
if(DBv3)then
-
- IIfA:DebugOut(zo_strformat("IIfA:ClearLocationData(<<1>>)", location))
+ IIfA:DebugOut(zo_strformat("IIfA:ClearLocationData(<<1>>, <<2>>)", location, bagID))
for itemName, itemData in pairs(DBv3) do
itemLocation = itemData.locations[location]
- if (itemLocation) then
+ if itemLocation and (bChar == nil or (bChar and itemLocation.bagID == bagID)) then
itemData.locations[location] = nil
end
LocationCount = 0
diff --git a/IIfA/IIfAMenu.lua b/IIfA/IIfAMenu.lua
index bc40005..62d0418 100644
--- a/IIfA/IIfAMenu.lua
+++ b/IIfA/IIfAMenu.lua
@@ -5,16 +5,16 @@ local LAM = LibStub("LibAddonMenu-2.0")
local LMP = LibStub("LibMediaProvider-1.0")
local function getCharacterInventories()
-
+
local accountInventories = {}
-
+
if nil ~= IIfA:GetCharacterList() then
for characterName, character in pairs(IIfA:GetCharacterList()) do
d("inserting " .. characterName)
table.insert(accountInventories, characterName)
end
end
-
+
return accountInventories
end
@@ -90,7 +90,7 @@ function IIfA:CreateOptionsMenu()
tooltip = "Prints verbose debugging to the ChatFrame. '/ii debug' for quick toggle",
name = "Debugging",
getFunc = function() return IIfA.data.bDebug end,
- setFunc = function(value) IIfA.data.bDebug = value end
+ setFunc = function(value) IIfA.data.bDebug = value end,
},
{
@@ -102,14 +102,14 @@ function IIfA:CreateOptionsMenu()
type = "button",
name = "Wipe database",
tooltip = "Deletes all collected data",
- func = function()
+ func = function()
local worldName = GetWorldName():gsub(" Megaserver", "")
IIfA.data[worldName] = {}
IIfA:ScanCurrentCharacterAndBank()
end,
}, -- button end
-
- { type = "description",
+
+ { type = "description",
title = "Ignore or delete characters",
text = "removes or un-tracks a character. \nWarning: This change will be applied immediately.",
},
@@ -118,57 +118,44 @@ function IIfA:CreateOptionsMenu()
name = "characters to delete or un-track",
choices = IIfA:GetCharacterList(),
getFunc = function() return end,
- setFunc = function(choice) deleteChar = nil; deleteChar = choice end
+ setFunc = function(choice) deleteChar = nil; deleteChar = choice end,
}, --dropdown end
{ -- button begin
type = "button",
- width = "half",
name = "Delete Character",
tooltip = "Delete Inventory Insight data for the character selected above",
func = function() IIfA:DeleteCharacterData(deleteChar) end,
}, -- button end
-
- { -- button begin
- type = "button",
- width = "half",
- name = "Ignore Equipment",
- tooltip = "All items equipped by the current character will be ignored",
- func = function() IIfA:IgnoreCharacterEquip(deleteChar, true) end,
- }, -- button end
- { -- button begin
- type = "button",
- width = "half",
- name = "Ignore Inventory",
- tooltip = "This character's carried inventory will be ignored",
- func = function() IIfA:IgnoreCharacterInventory(deleteChar, true) end,
- }, -- button end
-
- { type = "description",
- title = "Unignore characters",
- text = "Adds an ignored character back to the tracking lists",
+ {
+ type = "divider",
},
+
{
- type = "dropdown",
- name = "Character to unignore",
- choices = IIfA:GetIgnoredCharacterList(),
- getFunc = function() return end,
- setFunc = function(choice) undeleteChar = nil; undeleteChar = choice end
- }, --dropdown end
-
- { -- button begin
- type = "button",
- width = "half",
- name = "Unignore",
- tooltip = "All items equipped by the current character will be tracked again",
- func = function()
- IIfA:IgnoreCharacterEquip(undeleteChar, false)
- IIfA:IgnoreCharacterInventory(undeleteChar, false)
- end,
- }, -- button end
-
- { type = "description",
+ type = "checkbox",
+ name = "Ignore Char Backpack",
+ tooltip = "Ignore Backpack Items on this Character",
+ getFunc = function() return IIfA:IsCharacterInventoryIgnored() end,
+ setFunc = function(...) IIfA:IgnoreCharacterInventory(...) end,
+ }, -- checkbox end
+
+ {
+ type = "checkbox",
+ name = "Ignore Char Equipment",
+ tooltip = "Ignore Worn/Equipped Items on this Character",
+ getFunc = function() return IIfA:IsCharacterEquipIgnored() end,
+ setFunc = function(...) IIfA:IgnoreCharacterEquip(...) end,
+ }, -- checkbox end
+
+
+ {
+ type = "divider",
+ },
+
+
+
+ { type = "description",
title = "Guild Bank To Delete",
text = "Delete Inventory Insight data for guild. \nWarning: This change will be applied immediately.",
},
@@ -177,7 +164,7 @@ function IIfA:CreateOptionsMenu()
name = 'Guild Bank To Delete',
choices = getGuildBanks(),
getFunc = function() return end,
- setFunc = function(choice) deleteGBank = nil; deleteGBank = choice end
+ setFunc = function(choice) deleteGBank = nil; deleteGBank = choice end,
}, -- dropdown end
@@ -199,12 +186,12 @@ function IIfA:CreateOptionsMenu()
tooltip = "Manage data collection options for Guild Banks",
controls = {}
},
-
+
{
- type = "submenu",
- name = "Houses",
+ type = "submenu",
+ name = "Houses",
controls = {
-
+
{
type = "checkbox",
name = "Collect furniture in houses",
@@ -212,8 +199,8 @@ function IIfA:CreateOptionsMenu()
getFunc = function() return IIfA.data.b_collectHouses end,
setFunc = function(value) IIfA:SetHouseTracking(value) end,
}, -- checkbox end
-
- { type = "description",
+
+ { type = "description",
title = "Ignore or delete houses",
text = "removes or un-tracks a house. \nWarning: This change will be applied immediately.",
},
@@ -222,7 +209,7 @@ function IIfA:CreateOptionsMenu()
name = "houses to delete or un-track",
choices = IIfA:GetTrackedHouseNames(),
getFunc = function() return end,
- setFunc = function(choice) deleteHouse = nil; deleteHouse = choice end
+ setFunc = function(choice) deleteHouse = nil; deleteHouse = choice end,
}, --dropdown end
{ -- button begin
type = "button",
@@ -236,7 +223,7 @@ function IIfA:CreateOptionsMenu()
name = "houses to re-track",
choices = IIfA:GetIgnoredHouseNames(),
getFunc = function() return end,
- setFunc = function(choice) restoreHouse = nil; restoreHouse = choice end
+ setFunc = function(choice) restoreHouse = nil; restoreHouse = choice end,
}, --dropdown end
{ -- button begin
type = "button",
@@ -244,10 +231,10 @@ function IIfA:CreateOptionsMenu()
name = "Unignore house",
tooltip = "All furniture items in the currently selected house will be tracked again",
func = function() IIfA:SetTrackingForHouse(restoreHouse, true) end,
- }, -- button end
+ }, -- button end
},
},
-
+
{
type = "submenu",
name = "Pack Use/Size highlites",
@@ -331,9 +318,9 @@ function IIfA:CreateOptionsMenu()
type = "header",
name = "Global/Per Char settings",
},
-
-
-
+
+
+
{ -- submenu: tooltips
type = "submenu",
@@ -442,7 +429,7 @@ function IIfA:CreateOptionsMenu()
getFunc = function() return not IIfA:GetSettings().dontFocusSearch end,
setFunc = function(value) IIfA:GetSettings().dontFocusSearch = not value end,
}, -- checkbox end
-
+
{
type = "checkbox",
name = "Text Filter considers set name as well",
@@ -549,7 +536,7 @@ function IIfA:CreateOptionsMenu()
tooltip = "Enables/Disables data collection for all guild banks on this account",
warning = "Guild bank information will not be updated if this option is turned off!",
getFunc = function() return IIfA.data.bCollectGuildBankData end,
- setFunc = function(value)
+ setFunc = function(value)
IIfA.data.bCollectGuildBankData = value
IIfA.trackedBags[BAG_GUILDBANK] = value
end,
diff --git a/IIfA/IIfASettingsAdapter.lua b/IIfA/IIfASettingsAdapter.lua
index d69a1f7..572de52 100644
--- a/IIfA/IIfASettingsAdapter.lua
+++ b/IIfA/IIfASettingsAdapter.lua
@@ -1,6 +1,9 @@
local IIfA = IIfA
IIfA.houseNameToIdTbl = {}
-
+
+local task = IIfA.task or LibStub("LibAsync"):Create("IIfA_DataCollection")
+IIfA.task = task
+
local function GetRealCollectibleName(collectibleId)
local collectibleName = GetCollectibleNickname(collectibleId)
if collectibleName and #collectibleName == 0 then collectibleName = GetCollectibleName(collectibleId) end
@@ -19,33 +22,23 @@ function IIfA:IsCharacterEquipIgnored(ignoreChar)
return IIfA.data.ignoredCharInventories[ignoreChar]
end
-function IIfA:IgnoreCharacterEquip(ignoreChar, value)
- if not ignoreChar then return end
- ignoreChar = IIfA.CharNameToId[ignoreChar] or ignoreChar
- IIfA.data.ignoredCharEquipment[ignoreChar] = value
-
- if ignoreChar == IIfA.currentCharacterId then
- IIfA.trackedBags[BAG_WORN] = false
- end
- if value then
- IIfA:ScanCurrentCharacter()
- else
- IIfA:ClearLocationData(IIfA.currentCharacterId)
- end
+function IIfA:IsCharacterEquipIgnored()
+ return IIfA.data.ignoredCharEquipment[IIfA.currentCharacterId] or false
end
-function IIfA:IgnoreCharacterInventory(ignoreChar, value)
- if not ignoreChar then return end
- ignoreChar = IIfA.CharNameToId[ignoreChar] or ignoreChar
- IIfA.data.ignoredCharInventories[ignoreChar] = value
-
- if ignoreChar == IIfA.currentCharacterId then
- IIfA.trackedBags[BAG_BAGPACK] = false
- end
- if value then
- IIfA:ScanCurrentCharacter()
- else
- IIfA:ClearLocationData(IIfA.currentCharacterId)
- end
+
+function IIfA:IgnoreCharacterEquip(value)
+ IIfA.data.ignoredCharEquipment[IIfA.currentCharacterId] = value
+
+ IIfA.trackedBags[BAG_WORN] = not value
+ task:Call(function()
+ if value then
+ IIfA:ClearLocationData(IIfA.currentCharacterId, BAG_WORN)
+ else
+ IIfA:ScanCurrentCharacter()
+ end
+ end):Then(function()
+ IIfA:RefreshInventoryScroll()
+ end)
end
function IIfA:GetCharacterList()
return IIfA.data.accountCharacters
@@ -59,7 +52,7 @@ function IIfA:GetIgnoredCharacterList()
wasAdded[characterName] = true
end
for characterName, characterData in pairs(IIfA.data.ignoredCharInventories) do
- if not wasAdded[characterName] then
+ if not wasAdded[characterName] then
table.insert(ret, characterName)
end
end
@@ -67,7 +60,7 @@ function IIfA:GetIgnoredCharacterList()
end
function IIfA:SetSetNameFilterOnly(value)
- IIfA.bFilterOnSetName = not IIfA.bFilterOnSetName
+ IIfA.bFilterOnSetName = not IIfA.bFilterOnSetName
IIFA_GUI_SetNameOnly:SetState((IIfA.bFilterOnSetName and BSTATE_PRESSED) or BSTATE_NORMAL)
IIfA:RefreshInventoryScroll()
end
@@ -110,9 +103,9 @@ end
-- this is for the dropdown menu
function IIfA:SetInventoryListFilterQuality(value)
IIfA.InventoryListFilterQuality = value
-
+
IIfA.searchFilter = IIFA_GUI_SearchBox:GetText()
-
+
IIfA:RefreshInventoryScroll()
end
function IIfA:GetCollectingHouseData()
@@ -126,13 +119,13 @@ end
function IIfA:GetTrackedHousIds()
local ret = {}
for id, trackIt in pairs(IIfA.data.collectHouseData) do
- if trackIt then
+ if trackIt then
table.insert(ret, id)
end
end
return ret
end
-function IIfA:GetIgnoredHousIds()
+function IIfA:GetIgnoredHouseIds()
local ret = {}
for id, trackIt in pairs(IIfA.data.collectHouseData) do
if not trackIt then table.insert(ret, id) end
@@ -158,7 +151,7 @@ function IIfA:RebuildHouseMenuDropdowns()
-- cache house name for lookup
IIfA.houseNameToIdTbl[collectibleName] = collectibleId
local targetTable = (trackIt and tracked) or ignored
- table.insert(targetTable, collectibleName)
+ table.insert(targetTable, collectibleName)
end
IIfA.houseNamesIgnored = ignored
IIfA.houseNamesTracked = tracked
@@ -185,7 +178,7 @@ function IIfA:GetAllHouseIds()
end
function IIfA:SetTrackingForHouse(houseCollectibleId, trackIt)
houseCollectibleId = houseCollectibleId or GetCollectibleIdForHouse(GetCurrentZoneHouseId())
- if tonumber(houseCollectibleId) ~= houseCollectibleId then
+ if tonumber(houseCollectibleId) ~= houseCollectibleId then
realId = IIfA:GetHouseIdFromName(houseCollectibleId)
if not realId then d(houseCollectibleId); return end
houseCollectibleId = realId
@@ -200,13 +193,13 @@ function IIfA:SetTrackingForHouse(houseCollectibleId, trackIt)
end
end
-function IIfA:GetHouseTracking()
+function IIfA:GetHouseTracking()
return IIfA.data.b_collectHouses
end
-function IIfA:SetHouseTracking(value)
- IIfA.data.b_collectHouses = value
+function IIfA:SetHouseTracking(value)
+ IIfA.data.b_collectHouses = value
if value then
IIfA:RebuildHouseMenuDropdowns()
end
-end
\ No newline at end of file
+end
diff --git a/IIfA/IIfA_Preload.lua b/IIfA/IIfA_Preload.lua
index 0d8dfbb..6d5d980 100644
--- a/IIfA/IIfA_Preload.lua
+++ b/IIfA/IIfA_Preload.lua
@@ -1,10 +1,12 @@
--this creates a menu for the addon.
-local IIfA = IIfA
+
+-- IIfA doesn't exist at the point when this module is loaded, so this is useless
+-- local IIfA = IIfA
local strings = {
- IIFA_BAG_BAGPACK = "Inventar",
- IIFA_BAG_BANK = "Bank",
- IIFA_BAG_CRAFTBAG = "CraftBag",
+ IIFA_BAG_BAGPACK = "Inventory",
+ IIFA_BAG_BANK = "Bank",
+ IIFA_BAG_CRAFTBAG = "CraftBag",
}
@@ -18,13 +20,13 @@ function IIfA_SetButtonFilterText(control)
local buttonIdxNames = {
[1] = "All",
[2] = "Weapons",
- [3] = "Armor",
+ [3] = "Armor",
[4] = "Consumables",
[5] = "Materials",
- [6] = "Furniture",
+ [6] = "Furniture",
[7] = "Miscellaneous",
}
local name = control:GetName() or ""
local buttonIdx = control:GetName():gsub("IIFA_GUI_Header_Filter_Button", "") + 1
control.filterText = buttonIdxNames[buttonIdx]
-end
\ No newline at end of file
+end