comparison Modules/DisplayInvested.lua @ 138:7d258c041b11

Fixed an issue with /ia invested that caused all items to display twice. This was introduced by the fix in Ticket 42. At this point ItemAuditor watches mail for auctions sold or purchased, watches for buy/sell (money and 1 item type change) and conversions/tradeskills. Milling isn't working yet because there is too much time between the first event and the last event.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Sat, 02 Oct 2010 20:34:07 -0700
parents e9f7bc9199ca
children 106c1523777e
comparison
equal deleted inserted replaced
137:526036e4358f 138:7d258c041b11
183 itemName.."|"..link, 183 itemName.."|"..link,
184 investedTotal, 184 investedTotal,
185 investedPerItem, 185 investedPerItem,
186 count, 186 count,
187 } 187 }
188 188
189 totalInvested = totalInvested + investedTotal 189 totalInvested = totalInvested + investedTotal
190 190
191 i = i + 1 191 i = i + 1
192 includedItems[safeLink] = true 192 includedItems[ItemAuditor:GetIDFromLink(safeLink)] = true
193 end 193 end
194 end 194 end
195 195
196 local inventory = ItemAuditor:GetCurrentInventory() 196 local inventory = ItemAuditor:GetCurrentInventory()
197 197
198 for link, count in pairs(inventory.items) do 198 for itemID, count in pairs(inventory.items) do
199 if includedItems[link] == nil then 199 if includedItems[itemID] == nil then
200 local count = ItemAuditor:GetItemCount(ItemAuditor:GetIDFromLink(link)) 200 local itemName, link = GetItemInfo(itemID)
201 local itemName, link = GetItemInfo(link) 201 local count = ItemAuditor:GetItemCount(itemID)
202 tableData[i] = { 202 tableData[i] = {
203 itemName.."|"..link, 203 itemName.."|"..link,
204 0, 204 0,
205 0, 205 0,
206 count, 206 count,