# HG changeset patch # User Asa Ayers # Date 1282600207 25200 # Node ID eb0493400ff041e991a5d283ce2eea480083b71b # Parent b2c3e3004c71f88f8b4909055dd0e6609b4d4077 Ticket 32 - Based on the patch from lrdx, I have chaned ItemAuditor to depend on DataStore directly instead of going through Altoholic. diff -r b2c3e3004c71 -r eb0493400ff0 CHANGELOG.txt --- a/CHANGELOG.txt Fri Aug 20 06:16:05 2010 -0700 +++ b/CHANGELOG.txt Mon Aug 23 14:50:07 2010 -0700 @@ -1,4 +1,8 @@ -2010-08-19 Asa Ayers +2010-08-23 Asa Ayers + +- Ticket 32 - Based on the patch from lrdx, I have chaned ItemAuditor to depend on DataStore directly instead of going through Altoholic. + +2010-08-20 Asa Ayers - Ticket 31 - Fixed an error in the 'You just made a profit of ...' message diff -r b2c3e3004c71 -r eb0493400ff0 Core.lua --- a/Core.lua Fri Aug 20 06:16:05 2010 -0700 +++ b/Core.lua Mon Aug 23 14:50:07 2010 -0700 @@ -369,8 +369,18 @@ return results end +local realm = GetRealmName() +local ds_account = 'Default' function ItemAuditor:GetItemCount(searchID) - local count = Altoholic:GetItemCount(searchID) + local count = 0 + for _, character in pairs(DataStore:GetCharacters(realm, ds_account)) do + local bag, bank = DataStore:GetContainerItemCount(character, searchID) + count = count + (bag or 0) + (bank or 0) + count = count + (DataStore:GetAuctionHouseItemCount(character, searchID) or 0) + count = count + (DataStore:GetInventoryItemCount(character, searchID) or 0) + count = count + (DataStore:GetMailItemCount(character, searchID) or 0) + count = count + (DataStore:GetCurrencyItemCount(character, searchID) or 0) + end local itemName = GetItemInfo(searchID) for character, mailbox in pairs(allMailboxes) do for type, items in pairs(mailbox) do diff -r b2c3e3004c71 -r eb0493400ff0 ItemAuditor.toc --- a/ItemAuditor.toc Fri Aug 20 06:16:05 2010 -0700 +++ b/ItemAuditor.toc Mon Aug 23 14:50:07 2010 -0700 @@ -4,7 +4,7 @@ ## Author: Asa Ayers ## Version: @project-version@ ## SavedVariables: ItemAuditorDB -## Dependencies: Altoholic +## Dependencies: DataStore ## OptionalDeps: QuickAuctions, Skillet, LilSparkysWorkshop, Auctionator, Auctioneer, AuctionLite, AuctionMaster, ArkInventory, DevTools, WoWUnit