diff --git a/CharBagSpaceTooltip.lua b/CharBagSpaceTooltip.lua
index 7cf999d..fb57591 100644
--- a/CharBagSpaceTooltip.lua
+++ b/CharBagSpaceTooltip.lua
@@ -34,24 +34,24 @@ local function nToHex(Byte)
if Nibble2>9 then
Part2=string.char(Nibble2+55)
end
- return Part1 .. Part2
+ return string.format("%s%s", Part1, Part2)
end
function CharBagFrame:rgb2hex(ay)
- local rtn
- rtn = nToHex(ay.r * 255) .. nToHex(ay.g * 255) .. nToHex(ay.b * 255)
- return rtn
+ -- local rtn
+ return string.format("%s%s%s", nToHex(ay.r * 255), nToHex(ay.g * 255), nToHex(ay.b * 255))
+ -- return rtn
end
local function ColorStart(colorHTML)
- return "|c"..string.sub(colorHTML,1,6)
+ return string.format("%s%s", "|c",string.sub(colorHTML,1,6))
end
function CharBagFrame:ComputeColorAndText(spaceCurr, spaceMax)
local usedBagPercent = tonumber(spaceCurr) * 100 / tonumber(spaceMax)
local cs = ""
if spaceCurr == spaceMax then
- cs = ColorStart(self.ColorFull)
+ return ColorStart(self.ColorFull)
else
if usedBagPercent >= self.parent.BagSpaceAlert.threshold then
cs = ColorStart(self.ColorAlert)
diff --git a/IIfA.lua b/IIfA.lua
index 5870dab..439f2e0 100644
--- a/IIfA.lua
+++ b/IIfA.lua
@@ -19,20 +19,20 @@ DISCLAIMER
if IIfA == nil then IIfA = {} end
--local IIfA = IIfA
-IIfA.name = "Inventory Insight"
-IIfA.version = "2.20"
-IIfA.author = "AssemblerManiac & manavortex"
-IIfA.defaultAlertType = UI_ALERT_CATEGORY_ALERT
-IIfA.defaultAlertSound = nil
-IIfA.PlayerLoadedFired = false
-IIfA.CharacterNames = {}
-IIfA.colorHandler = nil
-IIfA.isGuildBankReady = false
-IIfA.TooltipLink = nil
-IIfA.CurrSceneName = "hud"
-IIfA.bFilterOnSetName = false
-IIfA.searchFilter = ""
-IIfA.searchFilterLower = ""
+IIfA.name = "Inventory Insight"
+IIfA.version = "2.20"
+IIfA.author = "AssemblerManiac & manavortex"
+IIfA.defaultAlertType = UI_ALERT_CATEGORY_ALERT
+IIfA.defaultAlertSound = nil
+IIfA.PlayerLoadedFired = false
+IIfA.CharacterNames = {}
+IIfA.colorHandler = nil
+IIfA.isGuildBankReady = false
+IIfA.TooltipLink = nil
+IIfA.CurrSceneName = "hud"
+IIfA.bFilterOnSetName = false
+IIfA.searchFilter = ""
+IIfA.searchFilterLower = ""
local LMP = LibStub("LibMediaProvider-1.0")
local BACKPACK = ZO_PlayerInventoryBackpack
@@ -48,10 +48,11 @@ local IIFA_COLORDEF_DEFAULT = ZO_ColorDef:New("3399FF")
-- --------------------------------------------------------------
IIfA.trackedBags = {
- [BAG_WORN] = true,
- [BAG_BACKPACK] = true,
- [BAG_BANK] = true,
+ [BAG_WORN] = true,
+ [BAG_BACKPACK] = true,
+ [BAG_BANK] = true,
[BAG_GUILDBANK] = true,
+ [BAG_VIRTUAL] = true,
}
IIfA.dropdownBankNames = {
"All",
@@ -63,7 +64,6 @@ IIfA.dropdownBankNames = {
"Bank Only",
"Craft Bag"
}
-
if GetAPIVersion() >= 100022 then
IIfA.trackedBags[BAG_SUBSCRIBER_BANK] = true
IIfA.trackedBags[BAG_HOUSE_BANK_TWO] = true
@@ -78,6 +78,7 @@ if GetAPIVersion() >= 100022 then
table.insert(IIfA.dropdownBankNames, "Housing Storage")
end
+
function IIfA:GetItemID(itemLink)
local ret = nil
if (itemLink) then
@@ -142,6 +143,11 @@ function IIfA:StatusAlert(message)
end
end
+local function onFirstOpen()
+ IIfA:OnFirstInventoryOpen()
+end
+
+
function IIfA_onLoad(eventCode, addOnName)
if (addOnName ~= "IIfA") then
return
@@ -157,11 +163,12 @@ function IIfA_onLoad(eventCode, addOnName)
-- initializing default values
local defaultGlobal = {
- saveSettingsGlobally = true,
- bDebug = false,
- in2TextColors = IIFA_COLORDEF_DEFAULT:ToHex(),
- showItemCountOnRight = true,
-
+ saveSettingsGlobally = true,
+ bDebug = false,
+ in2TextColors = IIFA_COLORDEF_DEFAULT:ToHex(),
+ showItemCountOnRight = true,
+ ignoredCharEquipment = {},
+ ignoredCharInventories = {},
frameSettings =
{
["bank"] = { hidden = false, docked = valDocked, locked = valLocked, minimized = valMinimized, lastX = valLastX, lastY = valLastY, height = valHeight, width = valWidth },
@@ -176,13 +183,13 @@ function IIfA_onLoad(eventCode, addOnName)
["alchemy"] = { hidden = false, docked = valDocked, locked = valLocked, minimized = valMinimized, lastX = valLastX, lastY = valLastY, height = valHeight, width = valWidth }
},
- bCollectGuildBankData = false,
- in2DefaultInventoryFrameView = "All",
- in2AgedGuildBankDataWarning = true,
- in2TooltipsFont = "ZoFontGame",
- in2TooltipsFontSize = 16,
- ShowToolTipWhen = "Always",
- DBv3 = {},
+ bCollectGuildBankData = false,
+ in2DefaultInventoryFrameView = "All",
+ in2AgedGuildBankDataWarning = true,
+ in2TooltipsFont = "ZoFontGame",
+ in2TooltipsFontSize = 16,
+ ShowToolTipWhen = "Always",
+ DBv3 = {},
}
-- initializing default values
@@ -226,44 +233,24 @@ function IIfA_onLoad(eventCode, addOnName)
IIfA.filterGroup = "All"
IIfA.filterTypes = nil
-
+
+ -- grabs data from bagpack, and worn bag when we first open the inventory
+ ZO_PreHook(PLAYER_INVENTORY, "ApplyBackpackLayout", IIfA.OnFirstInventoryOpen)
+ ZO_PreHook(BACKPACK_GUILD_BANK_LAYOUT_FRAGMENT, "ApplyBackpackLayout", IIfA.CollectGuildBank)
+
+ -- ZO_PreHook(SHARED_INVENTORY, "GetOrCreateBagCache", function(self, bagId)
+ -- d("SHARED_INVENTORY: GetOrCreateBagCache: " .. tostring(bagId))
+ -- end)
+ -- ZO_PreHook(SHARED_INVENTORY, "PerformFullUpdateOnBagCache", function(self, bagId)
+ -- d("SHARED_INVENTORY: PerformFullUpdateOnBagCache: " .. tostring(bagId))
+ -- end)
+
+
-- http://esodata.uesp.net/100016/src/libraries/utility/zo_savedvars.lua.html#67
- IIfA.settings = ZO_SavedVars:NewCharacterIdSettings("IIfA_Settings", 1, nil, default)
- IIfA.data = ZO_SavedVars:NewAccountWide("IIfA_Data", 1, "Data", defaultGlobal)
--- IIfA.testdata = ZO_SavedVars:NewAccountWide("IIfA_TestData", 1, "Data", defaultGlobal, "ProfileHere", "NotAnAccountName")
- -- top level, version, bottom level, array of default data)
---[[
-
-adding 2 more parms in newaccountwide call *shoud* allow using of global data spanning accounts
-- but no way to test, and not sure if it would zap data when toons go missing
+ IIfA.settings = ZO_SavedVars:NewCharacterIdSettings("IIfA_Settings", 1, nil, default)
+ IIfA.data = ZO_SavedVars:NewAccountWide("IIfA_Data", 1, "Data", defaultGlobal)
-function ZO_SavedVars:NewAccountWide(savedVariableTable, version, namespace, defaults, profile, displayName)
- displayName = displayName or GetDisplayName()
- return GetNewSavedVars(savedVariableTable, version, namespace, defaults, profile, displayName)
-end
-local globalVars = ZO_SavedVars:NewAccountWide("yourSavedVar", 1, nil, defaults, nil, "$(global)")
-
-IIfA_Data =
-{
- ["Default"] =
- {
- ["@AssemblerManiac"] =
- {
- ["$AccountWide"] =
- {
- ["Data"] =
- {
-
-IIfA_TestData =
-{
- ["ProfileHere"] =
- {
- ["NotAnAccountName"] =
- {
- ["$AccountWide"] =
-
---]]
local ObjSettings = IIfA:GetSettings()
if ObjSettings.in2InventoryFrameSceneSettings ~= nil then
@@ -475,6 +462,8 @@ IIfA_TestData =
IIfA:RegisterForEvents()
IIfA:RegisterForSceneChanges() -- register for callbacks on scene statechanges using user preferences or defaults
+ IIfA:ScanCurrentCharacter()
+ IIfA:ScanBank()
end
EVENT_MANAGER:RegisterForEvent("IIfALoaded", EVENT_ADD_ON_LOADED, IIfA_onLoad)
@@ -545,7 +534,8 @@ function IIfA:ConvertNameToId()
-- remaining items are character names (or should be)
-- if found in CharNameToId, convert it, otherwise erase whole entry (since it's an orphan)
-- do same for settings
-
+ local tbl = IIfA.data.DBv2
+ if nil == tbl or {} == tbl then return end
for itemLink, DBItem in pairs(IIfA.data.DBv2) do
for itemDetailName, itemInfo in pairs(DBItem) do
local bagID = itemInfo.locationType
diff --git a/IIfA.txt b/IIfA.txt
index 6a58431..7305e42 100644
--- a/IIfA.txt
+++ b/IIfA.txt
@@ -26,12 +26,15 @@ libs\LibAddonMenu-2.0\controls\iconpicker.lua
libs\LibAddonMenu-2.0\controls\divider.lua
libs\LibCustomMenu\LibCustomMenu.lua
+StringRegistration.lua
+
IIfA.xml
Bindings.xml
CharCurrencyTooltip.lua
CharBagSpaceTooltip.lua
IIfA.lua
Bindings.lua
+IIfASettingsAdapter.lua
IIfAEvents.lua
IIfATooltip.lua
IIfABackpack.lua
diff --git a/IIfABackpack.lua b/IIfABackpack.lua
index 6a41292..9f8f4a7 100644
--- a/IIfABackpack.lua
+++ b/IIfABackpack.lua
@@ -123,7 +123,7 @@ local function DoesInventoryMatchList(locationName, location)
return true
elseif(IIfA.InventoryListFilter == "All Banks") then
- return nil ~= bagId and bagId ~= BAG_BACKPACK and bagId ~= BAG_BANK and IIfA.trackBags[bagId]
+ return nil ~= bagId and bagId ~= BAG_BACKPACK and bagId ~= BAG_BANK and IIfA.trackedBags[bagId]
-- (location.bagID == BAG_BANK or location.bagID == BAG_GUILDBANK or location.bagID == BAG_SUBSCRIBER_BANK)
elseif(IIfA.InventoryListFilter == "All Guild Banks") then
@@ -531,17 +531,29 @@ function IIfA:CreateInventoryScroll()
return IIFA_GUI_ListHolder.lines
end
+function IIfA:GetCharacterList()
+ local charInventories = {}
+ for i=1, GetNumCharacters() do
+ local charName, _, _, _, _, _, _, _ = GetCharacterInfo(i)
+ charName = charName:sub(1, charName:find("%^") - 1)
+ if (nil == charInventories[charName]) then
+ table.insert(charInventories, charName)
+ end
+ end
+ return charInventories
+end
+
function IIfA:GetAccountInventoryList()
local accountInventories = IIfA.dropdownBankNames
-- get character names, will present in same order as character selection screen
- for i=1, GetNumCharacters() do
- local charName, _, _, _, _, _, _, _ = GetCharacterInfo(i)
- charName = charName:sub(1, charName:find("%^") - 1)
- table.insert(accountInventories, charName)
+ for idx, charName in ipairs(IIfA:GetCharacterList()) do
+ if (nil == accountInventories[charName]) then
+ table.insert(accountInventories, charName)
+ end
end
-
+
-- banks are same as toons, same order as player normally sees them
if IIfA.data.bCollectGuildBankData then
for i = 1, GetNumGuilds() do
diff --git a/IIfADataCollection.lua b/IIfADataCollection.lua
index f433a73..6b50022 100644
--- a/IIfADataCollection.lua
+++ b/IIfADataCollection.lua
@@ -25,6 +25,11 @@ function IIfA:DeleteGuildData(name)
end
function IIfA:CollectGuildBank()
+
+
+ -- add roomba support
+ if Roomba and Roomba.WorkInProgress and Roomba.WorkInProgress() then return end
+
local curGB = GetSelectedGuildBankId()
if not IIfA.data.bCollectGuildBankData or curGB == nil then
@@ -61,6 +66,54 @@ function IIfA:CollectGuildBank()
-- d("IIfA - Guild Bank Collected - " .. curGuild)
end
+
+local function grabBagContent(bagId)
+ local bagItems = GetBagSize(BAG_BAGPACK)
+ for slotNum=0, bagItems, 1 do
+ dbItem, itemKey = IIfA:EvalBagItem(bagId, slotNum)
+ end
+end
+
+local function scanBags()
+ local playerName = GetUnitName('player')
+
+ IIfA.data.accountCharacters = IIfA.data.accountCharacters or {}
+ IIfA.data.accountCharacters[playerName] = IIfA.data.accountCharacters[playerName] or {}
+
+
+
+ IIfA:ClearLocationData(IIfA.currentCharacterId)
+
+ if not IIfA:IsCharacterEquipIgnored(playerName) then
+ grabBagContent(BAG_WORN)
+ end
+ if not IIfA:IsCharacterInventoryIgnored(playerName) then
+ grabBagContent(BAG_BACKPACK)
+ end
+end
+IIfA.ScanCurrentCharacter = scanBags
+
+function IIfA:ScanBank()
+ IIfA:ClearLocationData(GetString(IIFA_BAG_BANK))
+ grabBagContent(BAG_BANK)
+ local slotNum = nil
+ if HasCraftBagAccess() then
+ IIfA:ClearLocationData(GetString(IIFA_BAG_CRAFTBAG))
+ slotNum = GetNextVirtualBagSlotId(slotNum)
+ while slotNum ~= nil do
+ IIfA:EvalBagItem(BAG_VIRTUAL, slotNum)
+ slotNum = GetNextVirtualBagSlotId(slotNum)
+ end
+ end
+end
+
+-- only grabs the content of bagpack and worn on the first login - hence we set the function to insta-return below.
+function IIfA:OnFirstInventoryOpen()
+ scanBags()
+ IIfA:ScanBank()
+ IIfA.OnFirstInventoryOpen = function() return end
+end
+
function IIfA:CheckForAgedGuildBankData( days )
local results = false
@@ -377,6 +430,10 @@ function IIfA:CollectAll()
IIfA:ClearUnowned()
end
+function IIfA:TrySaveBagInfo()
+
+end
+
function IIfA:ClearUnowned()
-- 2015-3-7 Assembler Maniac - new code added to go through full inventory list, remove any un-owned items
local DBv3 = IIfA.data.DBv3
diff --git a/IIfAMenu.lua b/IIfAMenu.lua
index 925e72f..0943b90 100644
--- a/IIfAMenu.lua
+++ b/IIfAMenu.lua
@@ -5,12 +5,16 @@ local LAM = LibStub("LibAddonMenu-2.0")
local LMP = LibStub("LibMediaProvider-1.0")
local function getCharacterInventories()
+
local accountInventories = {}
- if(IIfA.data.accountCharacters) then
- for characterName, character in pairs(IIfA.data.accountCharacters) do
+
+ 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
@@ -21,7 +25,6 @@ local function getGuildBanks()
if guildData.bCollectData == nil then
guildData.bCollectData = true
end
-
table.insert(guildBanks, guildName)
end
end
@@ -67,7 +70,7 @@ local function setGuildBankKeepDataSetting(guildNum, newSetting)
end
function IIfA:CreateOptionsMenu()
- local deleteChar, deleteGBank
+ local deleteChar, deleteGBank, undeleteChar
local optionsData = {
{ type = "header",
@@ -95,27 +98,72 @@ function IIfA:CreateOptionsMenu()
name = "Manage Collected Data",
tooltip = "Manage collected Characters and Guild Banks. Delete data you no longer need (old guilds or deleted characters)", --(optional)
controls = {
+ { type = "description",
+ title = "Ignore or delete characters",
+ text = "removes or un-tracks a character. \nWarning: This change will be applied immediately.",
+ },
{
- type = "dropdown",
- name = "Character To Delete",
- choices = getCharacterInventories(),
+ type = "dropdown",
+ name = "characters to delete or un-track",
+ choices = IIfA:GetCharacterList(),
getFunc = function() return 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",
- warning = "All data for the selected character above will be deleted!",
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 = "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",
+ title = "Guild Bank To Delete",
+ text = "Delete Inventory Insight data for guild. \nWarning: This change will be applied immediately.",
+ },
{ -- dropdown begin
type = "dropdown",
name = 'Guild Bank To Delete',
- tooltip = 'Delete Inventory Insight data for guild',
choices = getGuildBanks(),
getFunc = function() return end,
setFunc = function(choice) deleteGBank = nil; deleteGBank = choice end
@@ -126,7 +174,6 @@ function IIfA:CreateOptionsMenu()
type = "button",
name = "Delete Guild Bank",
tooltip = "Delete Inventory Insight data for the guild selected above",
- warning = "All data for the selected guild bank above will be deleted!",
func = function() IIfA:DeleteGuildData(deleteGBank) end,
}, -- button end
@@ -237,19 +284,15 @@ function IIfA:CreateOptionsMenu()
choices = {"Always", "IIfA", "Never" },
tooltip = "Choose when to display IIfA info on Tooltips",
getFunc = function() return IIfA:GetSettings().showToolTipWhen end,
- setFunc = function(value)
- IIfA:GetSettings().showToolTipWhen = value
- end,
+ setFunc = function(value) IIfA:GetSettings().showToolTipWhen = value end,
}, -- checkbox end
{
type = "checkbox",
name = "Show Info in Separate Frame",
tooltip = "Enables/Disables display of Style Info and Location info in a separate frame, or within the tooltip",
- getFunc = function() return IIfA:GetSettings().bInSeparateFrame end,
- setFunc = function(value)
- IIfA:GetSettings().bInSeparateFrame = value
- end,
+ getFunc = function() return IIfA:GetSettings().bInSeparateFrame end,
+ setFunc = function(value) IIfA:GetSettings().bInSeparateFrame = value end,
}, -- checkbox end
{
@@ -257,47 +300,9 @@ function IIfA:CreateOptionsMenu()
name = "Show Style Info",
tooltip = "Enables/Disables display of Style Info on the tooltips",
getFunc = function() return IIfA:GetSettings().showStyleInfo end,
- setFunc = function(value)
- IIfA:GetSettings().showStyleInfo = value
- end,
- }, -- checkbox end
---[[
- {
- type = "checkbox",
- name = "Use Default Tooltips",
- tooltip = "Enables/Disables inventory insight data added to the default tooltips. (Turning this feature on will disable the IIfA Tooltips)",
- -- 3-29-15 - AssemblerManiac - changed .data. to :GetSettings(). next 3 occurances
- getFunc = function() return IIfA:GetSettings().in2ToggleDefaultTooltips end,
- setFunc = function(value)
- IIfA:GetSettings().in2ToggleDefaultTooltips = value
- IIfA:GetSettings().in2ToggleIN2Tooltips = not value
- end,
-
-
+ setFunc = function(value) IIfA:GetSettings().showStyleInfo = value end,
}, -- checkbox end
- {
- type = "checkbox",
- name = "Use IIfA Tooltips",
- tooltip = "Enables/Disables inventory insight data added to the IIfA tooltips. (Turning this feature on will disable adding data to the default Tooltips",
- -- 3-29-15 - AssemblerManiac - changed .data. to :GetSettings(). next 3 occurances
- getFunc = function() return IIfA:GetSettings().in2ToggleIN2Tooltips end,
- setFunc = function(value)
- IIfA:GetSettings().in2ToggleIN2Tooltips = value
- IIfA:GetSettings().in2ToggleDefaultTooltips = not value
- end,
-
- }, -- checkbox end
-
- {
- type = "checkbox",
- name = 'Hide Redundant Item Information',
- tooltip = 'Option to enable/disable showing information on ItemTooltips (inventory and bank) when already viewing that bag. (i.e., If you mouse over an item in your inventory you can already see how many you have.)',
- -- 3-29-15 - AssemblerManiac - changed .data. to :GetSettings(). next 2 occurances
- getFunc = function() return IIfA:GetSettings().HideRedundantInfo end,
- setFunc = function(value) IIfA:GetSettings().HideRedundantInfo = value end,
- }, -- checkbox end
---]]
{
type = "colorpicker",
name = 'Tooltip Inventory Information Text Color',
@@ -477,7 +482,10 @@ 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) IIfA.data.bCollectGuildBankData = value end,
+ setFunc = function(value)
+ IIfA.data.bCollectGuildBankData = value
+ IIfA.trackedBags[BAG_GUILDBANK] = value
+ end,
}
for i = 1, GetNumGuilds() do
local id = GetGuildId(i)
diff --git a/IIfASceneFuncs.lua b/IIfASceneFuncs.lua
index 213d528..36d55cb 100644
--- a/IIfASceneFuncs.lua
+++ b/IIfASceneFuncs.lua
@@ -40,9 +40,9 @@ function IIfA:RegisterForSceneChanges()
end
function IIfA:GetSceneSettings(sceneName)
- if sceneName == nil then
- sceneName = IIfA:GetCurrentSceneName()
- end
+
+ sceneName = sceneName or IIfA:GetCurrentSceneName()
+
local settings = IIfA:GetSettings().frameSettings
@@ -63,33 +63,19 @@ function IIfA:GetSceneSettings(sceneName)
end
+
function IIfA:ProcessSceneChange(sceneName, oldState, newState)
+
+
+ -- IIfA:DebugOut(zo_strformat("ProcessSceneChange <<1>>: <<2>> -> <<3>>", sceneName, oldState, newState))
if (tostring(newState) == "shown") then
-
sceneName = IIfA:GetCurrentSceneName()
-
local settings = IIfA:GetSceneSettings(sceneName)
-
self:RePositionFrame(settings)
---[[
- IIFA_GUI.hidden = settings.hidden
- IIFA_GUI.locked = settings.locked
- IIFA_GUI.minimized = settings.minimized
- IIFA_GUI.docked = settings.docked
-
- if IIFA_GUI.minimized then
- IIfA:GUIMinimize(true)
- else
- IIfA:GuiReloadDimensions(settings, sceneName)
- end
- IIfA:GuiDock(settings.docked)
- IIFA_GUI:SetHidden(settings.hidden)
---]]
- end
-
- if (tostring(newState) == "hidden") then
+
+ elseif (tostring(newState) == "hidden") then
IIFA_GUI:SetHidden(true)
- end
+ end
end
@@ -124,6 +110,7 @@ end
function IIfA:ToggleInventoryFrame()
IIFA_GUI:SetHidden(not IIFA_GUI:IsControlHidden())
if not IIFA_GUI:IsControlHidden() then
+ IIfA:OnFirstInventoryOpen()
-- get current camera mode so when we toggle off, we put it back to where it was (maybe, can think of some weird circumstances where it might screw it up)
SetGameCameraUIMode(true)
IIfA:GuiResizeScroll()
diff --git a/IIfASettingsAdapter.lua b/IIfASettingsAdapter.lua
new file mode 100644
index 0000000..2ea520b
--- /dev/null
+++ b/IIfASettingsAdapter.lua
@@ -0,0 +1,37 @@
+ local IIfA = IIfA
+
+
+function IIfA:IsCharacterInventoryIgnored(ignoreChar)
+ return IIfA.data.ignoredCharEquipment[ignoreChar]
+end
+
+function IIfA:IsCharacterEquipIgnored(ignoreChar)
+ return IIfA.data.ignoredCharInventories[ignoreChar]
+end
+
+function IIfA:IgnoreCharacterEquip(ignoreChar, value)
+ IIfA.data.ignoredCharEquipment[ignoreChar] = value
+ IIfA:ScanCurrentCharacter()
+end
+function IIfA:IgnoreCharacterInventory(ignoreChar, value)
+ IIfA.data.ignoredCharInventories[ignoreChar] = value
+ IIfA:ScanCurrentCharacter()
+end
+function IIfA:GetCharacterList()
+ return IIfA.data.accountCharacters
+end
+
+function IIfA:GetIgnoredCharacterList()
+ local ret = {}
+ local wasAdded = {}
+ for characterName, characterData in pairs(IIfA.data.ignoredCharEquipment) do
+ table.insert(ret, characterName)
+ wasAdded[characterName] = true
+ end
+ for characterName, characterData in pairs(IIfA.data.ignoredCharInventories) do
+ if not wasAdded[characterName] then
+ table.insert(ret, characterName)
+ end
+ end
+ return ret
+end
\ No newline at end of file
diff --git a/IIfATooltip.lua b/IIfATooltip.lua
index 6c73c09..3949c7d 100644
--- a/IIfATooltip.lua
+++ b/IIfATooltip.lua
@@ -121,72 +121,6 @@ IIfA.racialTextures = {
-- check on icons Hlaalu, Redoran and Morag Tong not loading properly
---[[
-IIfA.racialTextures = {
- [0] = { styleName = "", styleTexture = ""},
- [1] = { styleName = "Breton", styleTexture = getTex("breton")},
- [2] = { styleName = "Redguard", styleTexture = getTex("redguard")},
- [3] = { styleName = "Orc", styleTexture = getTex("orsimer")},
- [4] = { styleName = "Dunmer", styleTexture = getTex("dunmer")},
- [5] = { styleName = "Nord", styleTexture = getTex("nord")},
- [6] = { styleName = "Argonian", styleTexture = getTex("argonian")},
- [7] = { styleName = "Altmer", styleTexture = getTex("altmer")},
- [8] = { styleName = "Bosmer", styleTexture = getTex("bosmer")},
- [9] = { styleName = "Khajiit", styleTexture = getTex("khajit")},
- [10] = { styleName = "Unique", styleTexture = getTex("telvanni")},
- [11] = { styleName = "Thieves guild", styleTexture = getTex("thief")},
- [12] = { styleName = "Dark Brotherhood", styleTexture = getTex("darkbrotherhood")},
- [13] = { styleName = "Malacath", styleTexture = getTex("malacath")},
- [14] = { styleName = "Dwemer", styleTexture = getTex("dwemer")},
- [15] = { styleName = "Ancient Elf",styleTexture = getTex("ancient")},
- [16] = { styleName = "Order of the Hour", styleTexture = getTex("akatosh")},
- [17] = { styleName = "Barbaric", styleTexture = getTex("reach")},
- [18] = { styleName = "Bandit", styleTexture = getTex("bandit")},
- [19] = { styleName = "Primal", styleTexture = getTex("primitive")},
- [20] = { styleName = "Daedric", styleTexture = getTex("daedric")},
- [21] = { styleName = "Trinimac", styleTexture = getTex("trinimac")},
- [22] = { styleName = "Ancient Orc", styleTexture = getTex("orsimer")},
- [23] = { styleName = "Daggerfall Covenant", styleTexture = getTex("daggerfall")}, -- Imperial City Smurf
- [24] = { styleName = "Ebonheart Pact", styleTexture = getTex("ebonheart")}, -- Imperial City Pact
- [25] = { styleName = "Aldmeri Dominion", styleTexture = getTex("ancient")}, -- Imperial City Banana
- [26] = { styleName = "Undaunted", styleTexture = getTex("laurel")},
- [27] = { styleName = "Celestial", styleTexture = getTex("dragonknight")},
- [28] = { styleName = "Glass", styleTexture = getTex("templar")}, -- Glass
- [29] = { styleName = "Xivkyn", styleTexture = getTex("nightblade")}, -- Imperial Daedric / Xivkyn
- [30] = { styleName = "Soulshriven", styleTexture = getTex("soulshriven")},
- [31] = { styleName = "Draugr", styleTexture = getTex("skull")}, --undead
- [32] = { styleName = "Maormer", styleTexture = getTex("maormer")}, --sea elves
- [33] = { styleName = "Akaviri", styleTexture = getTex("akaviri")}, --samurai
- [34] = { styleName = "Imperial", styleTexture = getTex("imperial")},
- [35] = { styleName = "Yokudan", styleTexture = getTex("akaviri")},
- [36] = { styleName = "Universal", styleTexture = getTex("imperial")},
- [37] = { styleName = "Winterborn", styleTexture = getTex("reach")},
- [38] = { styleName = "Worm Cult", styleTexture = getTex("wormcult")},
- [39] = { styleName = "Minotaur", styleTexture = getTex("minotaur")},
- [40] = { styleName = "Ebony", styleTexture = getTex("ebony")},
- [41] = { styleName = "Abah's Watch", styleTexture = getTex("abahswatch")},
- [42] = { styleName = "Skinchanger", styleTexture = getTex("skinchanger")},
- [43] = { styleName = "Morag Tong", styleTexture = getTex("moragtong")},
- [44] = { styleName = "Ra Gada", styleTexture = getTex("ragada")},
- [45] = { styleName = "Dro-m'Athra", styleTexture = getTex("dromathra")},
- [46] = { styleName = "Assassins League", styleTexture = getTex("assassin")},
- [47] = { styleName = "Outlaw", styleTexture = getTex("bandit")},
- [48] = { styleName = "unused 11", styleTexture = getTex("telvanni")},
- [49] = { styleName = "unused 12", styleTexture = getTex("telvanni")},
- [50] = { styleName = "Ordinator", styleTexture = getTex("Ordinator")},
- [51] = { styleName = "unused 14", styleTexture = getTex("telvanni")},
- [52] = { styleName = "Buoyant Armiger", styleTexture = getTex("BuoyantArmiger")},
- [53] = { styleName = "Frostcaster", styleTexture = getTex("telvanni")},
- [54] = { styleName = "Ashlander", styleTexture = getTex("cliffracer")},
- [55] = { styleName = "Necromancer", styleTexture = getTex("skull_nice")},
- [56] = { styleName = "Silken Ring", styleTexture = getTex("kothringi")},
- [57] = { styleName = "Mazzatun", styleTexture = getTex("lizard")},
- [58] = { styleName = "Grim Harlequin", styleTexture = getTex("harlequin")},
- [59] = { styleName = "Hollowjack", styleTexture = getTex("hollowjack")},
-}
---]]
-
-
--[[ -- these aren't used right now. Not sure whether or not we actually want to.
IIfA.itemEquipTypeTextures = {
[EQUIP_TYPE_CHEST] = "/esoui/art/inventory/inventory_tabicon_armor_up.dds",
diff --git a/StringRegistration.lua b/StringRegistration.lua
index 81ca292..ed9ad57 100644
--- a/StringRegistration.lua
+++ b/StringRegistration.lua
@@ -1,6 +1,14 @@
--this creates a menu for the addon.
local IIfA = IIfA
-SafeAddString(IIFA_BAG_BAGPACK, "Inventar", 1)
-SafeAddString(IIFA_BAG_BANK, "Bank", 1)
-SafeAddString(IIFA_BAG_CRAFTBAG, "CraftBag", 1)
\ No newline at end of file
+local strings = {
+ IIFA_BAG_BAGPACK = "Inventar",
+ IIFA_BAG_BANK = "Bank",
+ IIFA_BAG_CRAFTBAG = "CraftBag",
+}
+
+
+for stringId, stringValue in pairs(strings) do
+ ZO_CreateStringId(stringId, stringValue)
+ SafeAddVersion(stringId, 1)
+end
\ No newline at end of file