comparison Modules/Events.lua @ 8:0271e781b154

Working on converting the database to store items as links instead of names.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Wed, 23 Jun 2010 23:47:48 -0700
parents bbba2fae0f69
children 374dd1a90d02
comparison
equal deleted inserted replaced
7:bbba2fae0f69 8:0271e781b154
2 local addon = _G[addonName] 2 local addon = _G[addonName]
3 3
4 local utils = addonTable.utils 4 local utils = addonTable.utils
5 5
6 function addon:PLAYER_ENTERING_WORLD() 6 function addon:PLAYER_ENTERING_WORLD()
7 addon:ConvertItems()
8 DevTools_Dump(ItemAuditor.db.factionrealm.items)
9
7 self:RegisterEvent("MAIL_SHOW") 10 self:RegisterEvent("MAIL_SHOW")
8 self:RegisterEvent("UNIT_SPELLCAST_START") 11 self:RegisterEvent("UNIT_SPELLCAST_START")
9 self:WatchBags() 12 self:WatchBags()
10 end 13 end
11 14
97 end 100 end
98 101
99 if diff.money > 0 and utils:tcount(positive) > 0 and utils:tcount(negative) == 0 then 102 if diff.money > 0 and utils:tcount(positive) > 0 and utils:tcount(negative) == 0 then
100 -- self:Debug("loot") 103 -- self:Debug("loot")
101 elseif utils:tcount(diff.items) == 1 then 104 elseif utils:tcount(diff.items) == 1 then
102 -- self:Debug("purchase or sale") 105 self:Debug("purchase or sale")
103 106
104 for itemName, count in pairs(diff.items) do 107 for itemName, count in pairs(diff.items) do
105 self:SaveValue(itemName, diff.money) 108 self:SaveValue(itemName, diff.money)
106 end 109 end
107 elseif utils:tcount(diff.items) > 1 then 110 elseif utils:tcount(diff.items) > 1 then