die, debug

git [01-28-18 - 20:57]
die, debug
Filename
IIfA/IIfADataCollection.lua
IIfA/IIfAEvents.lua
diff --git a/IIfA/IIfADataCollection.lua b/IIfA/IIfADataCollection.lua
index b70efca..17f4227 100644
--- a/IIfA/IIfADataCollection.lua
+++ b/IIfA/IIfADataCollection.lua
@@ -287,7 +287,6 @@ end
 function IIfA:AddOrRemoveFurnitureItem(itemLink, itemCount, houseCollectibleId, fromInitialize)

 	local location = houseCollectibleId
-	d(zo_strformat("IIfA:AddOrRemoveFurnitureItem( <<1>>, <<2>>, <<3>> )", itemLink, itemCount, location))
 	IIfA:EvalBagItem(houseCollectibleId, IIfA:GetItemID(itemLink), false, itemCount, itemLink, GetItemLinkName(itemLink), houseCollectibleId)
 end

@@ -428,7 +427,6 @@ function IIfA:GetHouseList()
 		IIfA.HouseList = {}
 		for index=1,GetTotalCollectiblesByCategoryType(COLLECTIBLE_CATEGORY_TYPE_HOUSE) do
 			local collectibleId = GetCollectibleIdFromType(COLLECTIBLE_CATEGORY_TYPE_HOUSE, index)
-			d(zo_strformat("<<1>>: <<2>>", index, collectibleId))
 			if IsCollectibleUnlocked(collectibleId) then
 				local name = GetCollectibleNickname(collectibleId)
 				if name == EMPTY_STRING then name = GetCollectibleName(collectibleId) end
diff --git a/IIfA/IIfAEvents.lua b/IIfA/IIfAEvents.lua
index e3d35b6..d45c591 100644
--- a/IIfA/IIfAEvents.lua
+++ b/IIfA/IIfAEvents.lua
@@ -77,8 +77,9 @@ local function IIfA_FurnitureRemove(eventCode, furnitureId, collectibleId)
 	IIfA:AddOrRemoveFurnitureItem(itemLink, -1, houseCollectibleId, true)
 end

-local function IIfA_HouseEntered(eventCode, wasOwner)
-	if not wasOwner then return end
+local function IIfA_HouseEntered(eventCode)
+
+	if not IsOwnerOfCurrentHouse() then return end
 	IIfA:ScanHouse()
 end

@@ -174,7 +175,7 @@ function IIfA:RegisterForEvents()
 	EVENT_MANAGER:RegisterForEvent("IIFA_GUILDBANK_ITEM_REMOVED", EVENT_GUILD_BANK_ITEM_REMOVED, IIfA_GuildBankAddRemove)


-	EVENT_MANAGER:RegisterForEvent("IIFA_HOUSING_PLAYER_INFO_CHANGED", EVENT_HOUSING_PLAYER_INFO_CHANGED, IIfA_HouseEntered)
+	EVENT_MANAGER:RegisterForEvent("IIFA_HOUSING_PLAYER_INFO_CHANGED", EVENT_PLAYER_ACTIVATED , IIfA_HouseEntered)
 	EVENT_MANAGER:RegisterForEvent("IIFA_HOUSING_FURNITURE_REMOVED", EVENT_HOUSING_FURNITURE_REMOVED, IIfA_FurnitureRemove)
 	EVENT_MANAGER:RegisterForEvent("IIFA_HOUSING_FURNITURE_PLACED", EVENT_HOUSING_FURNITURE_PLACED, IIfA_FurnitureAdd)