Mercurial > wow > itemauditor
diff Core.lua @ 141:15a259503d63
Adding some debugging code to help fix ticket 46.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Mon, 04 Oct 2010 19:01:46 -0700 |
parents | 7e1496b25311 |
children | 03e108d12ef1 |
line wrap: on
line diff
--- a/Core.lua Sat Oct 02 21:23:18 2010 -0700 +++ b/Core.lua Mon Oct 04 19:01:46 2010 -0700 @@ -379,6 +379,7 @@ local realm = GetRealmName() local ds_account = 'Default' function ItemAuditor:GetItemCount(searchID) + self:Debug('ItemAuditor:GetItemCount(%s)', tostring(searchID)) local count = 0 for _, character in pairs(DataStore:GetCharacters(realm, ds_account)) do if DataStore:GetCharacterFaction(character) == UnitFactionGroup("player") then @@ -388,11 +389,15 @@ count = count + (DataStore:GetInventoryItemCount(character, searchID) or 0) count = count + (DataStore:GetMailItemCount(character, searchID) or 0) count = count + (DataStore:GetCurrencyItemCount(character, searchID) or 0) + else + self:Debug('Skipping %s', character) end end + self:Debug('before guild count: %s', count) for guildName in pairs(self.db.factionrealm.enabled_guilds) do count = count + DataStore:GetGuildBankItemCount(DataStore:GetGuilds()[guildName], searchID) end + self:Debug('after guild count: %s', count) local itemName = GetItemInfo(searchID) for character, mailbox in pairs(allMailboxes) do @@ -401,7 +406,7 @@ for name, data in pairs(items) do if name == itemName then count = count - data.count - + self:Debug('removing mail %s %s %s', character, type, data.count) end end end