# HG changeset patch # User Asa Ayers # Date 1292482168 28800 # Node ID 091bae7bfca0f8b4519891c9de3c12b4e87279e7 # Parent d108b0112be3bfb650fb95452ddd745af61ddeae Fixed a bug in calculating purchase/sale where the item ID was being used instead of the number of items that changed. diff -r d108b0112be3 -r 091bae7bfca0 CHANGELOG.txt --- a/CHANGELOG.txt Fri Dec 10 00:48:20 2010 -0800 +++ b/CHANGELOG.txt Wed Dec 15 22:49:28 2010 -0800 @@ -1,3 +1,7 @@ +2011-01-09 Asa Ayers + +- Fixed a bug in calculating purchase/sale where the item ID was being used instead of the number of items that changed. + 2010-12-10 Asa Ayers - I removed all of the vellums that were removed from the game. This also allowed me to make the one remaining vellum count toward the materials required to craft a scroll. diff -r d108b0112be3 -r 091bae7bfca0 Modules/Events.lua --- a/Modules/Events.lua Fri Dec 10 00:48:20 2010 -0800 +++ b/Modules/Events.lua Wed Dec 15 22:49:28 2010 -0800 @@ -400,7 +400,7 @@ self:Debug("purchase or sale") for itemID, count in pairs(diff.items) do - self:SaveValue(itemID, 0 - diff.money, itemID) + self:SaveValue(itemID, 0 - diff.money, count) end elseif self:tcount(diff.items) > 1 and self:tcount(positive) > 0 and self:tcount(negative) > 0 then -- we must have created/converted something