Mercurial > wow > itemauditor
comparison Core.lua @ 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 | 1f410255ebd8 |
| children | c59d22fac6d1 |
comparison
equal
deleted
inserted
replaced
| 104:b2c3e3004c71 | 105:eb0493400ff0 |
|---|---|
| 367 end | 367 end |
| 368 end | 368 end |
| 369 return results | 369 return results |
| 370 end | 370 end |
| 371 | 371 |
| 372 local realm = GetRealmName() | |
| 373 local ds_account = 'Default' | |
| 372 function ItemAuditor:GetItemCount(searchID) | 374 function ItemAuditor:GetItemCount(searchID) |
| 373 local count = Altoholic:GetItemCount(searchID) | 375 local count = 0 |
| 376 for _, character in pairs(DataStore:GetCharacters(realm, ds_account)) do | |
| 377 local bag, bank = DataStore:GetContainerItemCount(character, searchID) | |
| 378 count = count + (bag or 0) + (bank or 0) | |
| 379 count = count + (DataStore:GetAuctionHouseItemCount(character, searchID) or 0) | |
| 380 count = count + (DataStore:GetInventoryItemCount(character, searchID) or 0) | |
| 381 count = count + (DataStore:GetMailItemCount(character, searchID) or 0) | |
| 382 count = count + (DataStore:GetCurrencyItemCount(character, searchID) or 0) | |
| 383 end | |
| 374 local itemName = GetItemInfo(searchID) | 384 local itemName = GetItemInfo(searchID) |
| 375 for character, mailbox in pairs(allMailboxes) do | 385 for character, mailbox in pairs(allMailboxes) do |
| 376 for type, items in pairs(mailbox) do | 386 for type, items in pairs(mailbox) do |
| 377 if type == 'AHWon' or type == 'COD' then | 387 if type == 'AHWon' or type == 'COD' then |
| 378 for name, data in pairs(items) do | 388 for name, data in pairs(items) do |
