# HG changeset patch # User Asa Ayers # Date 1286049669 25200 # Node ID d3d5e82043d8f7c2794f54a246a525c082298de5 # Parent a529a4a4ccbe90449c7f88156cb63b02f4e2c988 Ticket 43 - Updated the way ItemAuditor counts how many of each item you own to only count your current faction. diff -r a529a4a4ccbe -r d3d5e82043d8 CHANGELOG.txt --- 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 - 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 diff -r a529a4a4ccbe -r d3d5e82043d8 Core.lua --- 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)