comparison Modules/Events.lua @ 33:f5d384fe7e4a

Fixed a bug that occurs if you take a flight point and the first thing you kill only has one item. ItemAuditor was incorrectly attaching the cost fo the flight to the cost of that item.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Sat, 17 Jul 2010 07:33:23 -0700
parents 75d917ccd942
children e27d13095b49
comparison
equal deleted inserted replaced
32:e6ddeb9f9994 33:f5d384fe7e4a
113 negativeCount = negativeCount + abs(count) 113 negativeCount = negativeCount + abs(count)
114 end 114 end
115 end 115 end
116 116
117 if positiveCount + negativeCount == 0 then 117 if positiveCount + negativeCount == 0 then
118 return 118 --[[
119 end 119 Nothing needs to be done, but this will prevent mistakenly attributing
120 120 the cost of flights to the first item you pick up.
121 if diff.money > 0 and self:tcount(positive) > 0 and self:tcount(negative) == 0 then 121 ]]
122 elseif diff.money > 0 and self:tcount(positive) > 0 and self:tcount(negative) == 0 then
122 self:Debug("loot") 123 self:Debug("loot")
123 elseif abs(diff.money) > 0 and self:tcount(diff.items) == 1 then 124 elseif abs(diff.money) > 0 and self:tcount(diff.items) == 1 then
124 self:Debug("purchase or sale") 125 self:Debug("purchase or sale")
125 126
126 for link, count in pairs(diff.items) do 127 for link, count in pairs(diff.items) do