Mercurial > wow > itemauditor
changeset 136:d3d5e82043d8
Ticket 43 - Updated the way ItemAuditor counts how many of each item you own to only count your current faction.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Sat, 02 Oct 2010 13:01:09 -0700 |
parents | a529a4a4ccbe |
children | 526036e4358f |
files | CHANGELOG.txt Core.lua |
diffstat | 2 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG.txt Sat Oct 02 11:38:22 2010 -0700 +++ b/CHANGELOG.txt Sat Oct 02 13:01:09 2010 -0700 @@ -1,6 +1,7 @@ 2010-10-02 Asa Ayers <Asa.Ayers@Gmail.com> - I removed the persistent queue (Ticket 33) It caused to many bugs and was blocking me from getting other things done. I think its something that will get implemented again once I figure out the best way to do it. +- Ticket 43 - Updated the way ItemAuditor counts how many of each item you own to only count your current faction. 2010-09-15 Asa Ayers <Asa.Ayers@Gmail.com>
--- a/Core.lua Sat Oct 02 11:38:22 2010 -0700 +++ b/Core.lua Sat Oct 02 13:01:09 2010 -0700 @@ -379,12 +379,14 @@ function ItemAuditor: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) + if DataStore:GetCharacterFaction(character) == UnitFactionGroup("player") then + 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 end for guildName in pairs(self.db.factionrealm.enabled_guilds) do count = count + DataStore:GetGuildBankItemCount(DataStore:GetGuilds()[guildName], searchID)