house name displayed on tooltips; task cleanup/checking
AssemblerManiac [02-18-18 - 15:44]
house name displayed on tooltips; task cleanup/checking
diff --git a/IIfA/CharBagSpaceTooltip.lua b/IIfA/CharBagSpaceTooltip.lua
index 2de2388..26a57d0 100644
--- a/IIfA/CharBagSpaceTooltip.lua
+++ b/IIfA/CharBagSpaceTooltip.lua
@@ -128,10 +128,6 @@ end
function CharBagFrame:Initialize(objectForAssets)
- local function ComputeSpaceUsedText(spaceUsed, spaceMax)
- -- returns color coded
- end
-
self.frame = IIFA_CharBagFrame
local tControl
local prevControl = self.frame
diff --git a/IIfA/IIfABackpack.lua b/IIfA/IIfABackpack.lua
index 6876add..bc4c57c 100644
--- a/IIfA/IIfABackpack.lua
+++ b/IIfA/IIfABackpack.lua
@@ -656,9 +656,11 @@ function IIfA:QueryAccountInventory(itemLink)
newLocation = {}
newLocation.name = locationName
- if location.bagID >= BAG_HOUSE_BANK_ONE and location.bagID <= BAG_HOUSE_BANK_TEN then -- location is a housing chest
+ if (location.bagID >= BAG_HOUSE_BANK_ONE and location.bagID <= BAG_HOUSE_BANK_TEN) then -- location is a housing chest
newLocation.name = GetCollectibleNickname(locationName)
if newLocation.name == "" then newLocation.name = GetCollectibleName(locationName) end
+ elseif location.bagID == locationName then -- location is a house
+ newLocation.name = GetCollectibleName(locationName)
end
newLocation.itemsFound = location.itemCount
diff --git a/IIfA/IIfADataCollection.lua b/IIfA/IIfADataCollection.lua
index 4445144..2b5c575 100644
--- a/IIfA/IIfADataCollection.lua
+++ b/IIfA/IIfADataCollection.lua
@@ -72,8 +72,9 @@ function IIfA:CollectGuildBank()
IIfA.data.guildBanks[curGuild].bCollectData = true -- default to true just so it's here and ok
end
- -- call with libAsync to avoid lags
+ -- call with libAsync to avoid lag
task:Call(function()
+d("Collect guild bank - " .. curGuild)
local guildData = IIfA.data.guildBanks[curGuild]
guildData.items = #ZO_GuildBankBackpack.data
guildData.lastCollected = GetDate() .. "@" .. GetFormattedTime();
@@ -115,15 +116,20 @@ function IIfA:ScanCurrentCharacter()
end)
end
+--[[
+Developer note: In TryScanHouseBank, the call to IIfA:ClearLocationData will fail because collectibleId is zero
+bagId on the other hand DOES work, possibly because it's in use by the for loop
+]]--
+
local function tryScanHouseBank()
if not IsOwnerOfCurrentHouse() then return end
- local bagId
+ local bagId, collectibleId
for bagId = BAG_HOUSE_BANK_ONE, BAG_HOUSE_BANK_TEN do
- local collectibleId = GetCollectibleForHouseBankBag(bagId)
+ collectibleId = GetCollectibleForHouseBankBag(bagId)
if IsCollectibleUnlocked(collectibleId) then
IIfA:DebugOut(zo_strformat("tryScanHouseBank(<<1>>)", collectibleId))
- -- call with libAsync to avoid lags
+ -- call with libAsync to avoid lag
task:Call(function()
local collectibleId = GetCollectibleForHouseBankBag(bagId) -- this MUST stay here, or collectibleId is 0
IIfA:ClearLocationData(collectibleId)
@@ -242,7 +248,7 @@ end
function IIfA:GuildBankAddRemove(eventID, slotId)
IIfA:DebugOut("Guild Bank Add or Remove...")
- -- call with libAsync to avoid lags
+ -- call with libAsync to avoid lag
task:Call(function()
IIfA:UpdateGuildBankData()
IIfA:CleanEmptyGuildBug()
@@ -250,7 +256,7 @@ function IIfA:GuildBankAddRemove(eventID, slotId)
--IIfA:CollectGuildBank()
local dbItem, itemKey
if eventID == EVENT_GUILD_BANK_ITEM_ADDED then
- -- d("GB Add")
+ IIfA:DebugOut("GB Add - Slot <<1>>", slotId)
dbItem, itemKey = IIfA:EvalBagItem(BAG_GUILDBANK, slotId, true, 0)
IIfA:ValidateItemCounts(BAG_GUILDBANK, slotId, dbItem, itemKey)
else
diff --git a/IIfA/IIfAEvents.lua b/IIfA/IIfAEvents.lua
index c131822..fa541a8 100644
--- a/IIfA/IIfAEvents.lua
+++ b/IIfA/IIfAEvents.lua
@@ -47,7 +47,7 @@ local function IIfA_InventorySlotUpdate(...)
end
local function IIfA_ScanHouse(eventCode, oldMode, newMode)
- d(newMode)
+ IIfA:DebugOut("IIfA_ScanHouse(<<1>>, <<2>>, <<3>>)", eventCode, oldMode, newMode)
if newMode == "showing" or newMode == "shown" then return end
-- are we listening?
if not IIfA:GetCollectingHouseData() then return end