From 3fcf25129c37cb12c3f3b9bc406d28e5dc706c28 Mon Sep 17 00:00:00 2001 From: HonorGoG Date: Thu, 15 Aug 2019 18:59:30 -0700 Subject: [PATCH] - TitanClassicAmmo: Fixed some logic for inventory count for warriors. --- TitanClassicAmmo/TitanClassicAmmo.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/TitanClassicAmmo/TitanClassicAmmo.lua b/TitanClassicAmmo/TitanClassicAmmo.lua index 1b36fec..2606f94 100644 --- a/TitanClassicAmmo/TitanClassicAmmo.lua +++ b/TitanClassicAmmo/TitanClassicAmmo.lua @@ -98,7 +98,7 @@ function TitanPanelAmmoButton_PLAYER_LOGIN() TitanPanelAmmoButton:RegisterEvent("UPDATE_INVENTORY_DURABILITY") isThrown = true; isAmmo = nil; - else + elseif loc == "INVTYPE_RANGEDRIGHT" then TitanPanelAmmoButton:RegisterEvent("ACTIONBAR_HIDEGRID") isAmmo = true; isThrown = nil; @@ -189,7 +189,7 @@ function TitanPanelAmmoUpdateDisplay() count = GetInventoryItemCount("player", rangedSlotID) or count -- count = GetInventoryItemDurability(rangedSlotID); - else + else loc == "INVTYPE_RANGEDRIGHT" then if TitanPanelAmmoButton:IsEventRegistered("UPDATE_INVENTORY_DURABILITY") then TitanPanelAmmoButton:UnregisterEvent("UPDATE_INVENTORY_DURABILITY") @@ -202,6 +202,9 @@ function TitanPanelAmmoUpdateDisplay() isAmmo = true; isThrown = nil; count = GetInventoryItemCount("player", ammoSlotID) + else + count = 0; + AmmoName = ""; end TitanPanelButton_UpdateButton(TITAN_AMMO_ID); -- 1.7.9.5