Mercurial > wow > itemauditor
changeset 105:eb0493400ff0
Ticket 32 - Based on the patch from lrdx, I have chaned ItemAuditor to depend on DataStore directly instead of going through Altoholic.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Mon, 23 Aug 2010 14:50:07 -0700 |
parents | b2c3e3004c71 |
children | 13d63ca457f6 |
files | CHANGELOG.txt Core.lua ItemAuditor.toc |
diffstat | 3 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <Asa.Ayers@Gmail.com> +2010-08-23 Asa Ayers <Asa.Ayers@Gmail.com> + +- 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 <Asa.Ayers@Gmail.com> - Ticket 31 - Fixed an error in the 'You just made a profit of ...' message
--- 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
--- 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 <Asa.Ayers@Gmail.com> ## Version: @project-version@ ## SavedVariables: ItemAuditorDB -## Dependencies: Altoholic +## Dependencies: DataStore ## OptionalDeps: QuickAuctions, Skillet, LilSparkysWorkshop, Auctionator, Auctioneer, AuctionLite, AuctionMaster, ArkInventory, DevTools, WoWUnit