From 990b4b0ee578de97f28623c4cfed00979b14aa73 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Mon, 21 Jun 2010 08:52:31 -0400 Subject: [PATCH] -Fixed a bug where ammo was being counted twice. Special thanks to berrybear from WOWInterface.com. -NOTE: You have to unequip and re-equip your ammo for this to take effect. --- BagSync.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BagSync.lua b/BagSync.lua index c8e7238..76635d0 100644 --- a/BagSync.lua +++ b/BagSync.lua @@ -530,7 +530,12 @@ function BagSync:SaveEquipment() count = count > 1 and count or nil if (linkItem and count) then - BS_DB[index] = format('%s,%d', linkItem, count) + --check for ranged slot ammo, don't add twice + if slot == GetInventorySlotInfo("AmmoSlot") and count <= 1 then + BS_DB[index] = format('%s,%d', linkItem, count) + elseif slot ~= GetInventorySlotInfo("AmmoSlot") then + BS_DB[index] = format('%s,%d', linkItem, count) + end else BS_DB[index] = linkItem end -- 1.7.9.5