line 519 crash fixed; heavy armor selected dropdown list has proper slots listed; mouseover on equipped items shows proper counts for poisons and other hand items (weaps and offhand weaps)

AssemblerManiac [03-01-18 - 17:06]
line 519 crash fixed; heavy armor selected dropdown list has proper slots listed; mouseover on equipped items shows proper counts for poisons and other hand items (weaps and offhand weaps)
Filename
IIfA/IIfA.xml
IIfA/IIfADataCollection.lua
IIfA/IIfATooltip.lua
diff --git a/IIfA/IIfA.xml b/IIfA/IIfA.xml
index aa809e8..d296355 100644
--- a/IIfA/IIfA.xml
+++ b/IIfA/IIfA.xml
@@ -341,7 +341,7 @@
 											<Dimensions x="38" y="38"/>
 											<OnMouseEnter>IIfA:GuiShowFilterTooltip(self, "Heavy")</OnMouseEnter>
 											<OnMouseExit>IIfA:GuiHideTooltip(self)</OnMouseExit>
-											<OnMouseUp>IIfA:GuiOnFilterButton(self, button, "Body", {ARMORTYPE_HEAVY, EQUIP_TYPE_HEAD, EQUIP_TYPE_SHOULDERS, EQUIP_TYPE_CHEST, EQUIP_TYPE_HAND, EQUIP_TYPE_LEGS, EQUIP_TYPE_FEET, EQUIP_TYPE_WAIST}, {"Heavy", "Medium", "Light", "Head", "Shoulders", "Chest", "Hands", "Legs", "Feet", "Waist"})</OnMouseUp>
+											<OnMouseUp>IIfA:GuiOnFilterButton(self, button, "Body", {ARMORTYPE_HEAVY, EQUIP_TYPE_HEAD, EQUIP_TYPE_SHOULDERS, EQUIP_TYPE_CHEST, EQUIP_TYPE_HAND, EQUIP_TYPE_LEGS, EQUIP_TYPE_FEET, EQUIP_TYPE_WAIST}, {"Placeholder", "Head", "Shoulders", "Chest", "Hands", "Legs", "Feet", "Waist"})</OnMouseUp>
 											<Textures	normal="EsoUI/art/icons/progression_tabicon_armorheavy_up.dds"
 														pressed="EsoUI/art/icons/progression_tabicon_armorheavy_down.dds"
 														mouseOver="EsoUI/art/icons/progression_tabicon_armorheavy_over.dds" />
diff --git a/IIfA/IIfADataCollection.lua b/IIfA/IIfADataCollection.lua
index b3a8d2b..5c9f67e 100644
--- a/IIfA/IIfADataCollection.lua
+++ b/IIfA/IIfADataCollection.lua
@@ -516,7 +516,7 @@ p("Adding loc=<<1>>, slot <<2>>, count=<<3>>", location, slotId, itemCount)
 		DBitem = DBv3[itemKey]
 	end

-	if IIfA:TableCount(DBitem.locations[location].bagSlot) == 0 then
+	if DBitem.locations and DBitem.locations[location] and IIfA:TableCount(DBitem.locations[location].bagSlot) == 0 then
 p("Zapping location=<<1>>, bag=<<2>>, slot=<<3>>", location, bagId, slotId)
 		DBitem.locations[location] = nil
 	end
diff --git a/IIfA/IIfATooltip.lua b/IIfA/IIfATooltip.lua
index 03db0e9..a1807fc 100644
--- a/IIfA/IIfATooltip.lua
+++ b/IIfA/IIfATooltip.lua
@@ -257,21 +257,23 @@ function IIfA:GetEquippedItemLink(mouseOverControl)
 	local slotName = string.gsub(fullSlotName, "ZO_CharacterEquipmentSlots", IIfA.EMPTY_STRING)
 	local index = 0

-	if 		(slotName == "Head")		then index = 0
-	elseif	(slotName == "Neck") 		then index = 1
-	elseif	(slotName == "Chest") 		then index = 2
-	elseif	(slotName == "Shoulder") 	then index = 3
-	elseif	(slotName == "MainHand") 	then index = 4
-	elseif	(slotName == "OffHand") 	then index = 5
-	elseif	(slotName == "Belt") 		then index = 6
-	elseif	(slotName == "Costume") 	then index = 7
-	elseif	(slotName == "Leg") 		then index = 8
-	elseif	(slotName == "Foot") 		then index = 9
-	elseif	(slotName == "Ring1") 		then index = 11
-	elseif	(slotName == "Ring2") 		then index = 12
-	elseif	(slotName == "Glove") 		then index = 16
-	elseif	(slotName == "BackupMain") 	then index = 20
-	elseif	(slotName == "BackupOff") 	then index = 20
+	if 		slotName == "Head"			then index = 0
+	elseif	slotName == "Neck" 			then index = 1
+	elseif	slotName == "Chest" 		then index = 2
+	elseif	slotName == "Shoulder" 		then index = 3
+	elseif	slotName == "MainHand" 		then index = 4
+	elseif	slotName == "OffHand" 		then index = 5
+	elseif	slotName == "Belt" 			then index = 6
+	elseif	slotName == "Costume" 		then index = 7
+	elseif	slotName == "Leg" 			then index = 8
+	elseif	slotName == "Foot" 			then index = 9
+	elseif	slotName == "Ring1" 		then index = 11
+	elseif	slotName == "Ring2" 		then index = 12
+	elseif	slotName == "Glove" 		then index = 16
+	elseif	slotName == "BackupMain" 	then index = 20
+	elseif	slotName == "BackupOff" 	then index = 21
+	elseif	slotName == "Poison" 		then index = 13
+	elseif	slotName == "BackupPoison"	then index = 14
 	end

 	local itemLink = GetItemLink(0, index, LINK_STYLE_BRACKETS)