Mercurial > wow > wowdb-profiler
changeset 82:fc3e8a55d7ea 1.0.1
Ignore money completely (for now). Revert to using names for certain objects since Archaeology doesn't produce a GUID.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Wed, 22 Aug 2012 15:15:30 -0500 |
parents | 3db9f681d2e5 |
children | f279148e3298 |
files | Main.lua |
diffstat | 1 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Main.lua Wed Aug 22 13:45:24 2012 -0500 +++ b/Main.lua Wed Aug 22 15:15:30 2012 -0500 @@ -434,11 +434,17 @@ end end -- TODO: Remove this when GetLootSourceInfo() has values for money - if #action_data.loot_list <= 0 or action_data.type == AF.OBJECT then - -- Unfortunately, this means we can't record money from chests... + if #action_data.loot_list <= 0 then return end - local entry = DBEntry(data_type, action_data.identifier) + local entry + + -- At this point we only have a name if it's an object. + if action_data.type == AF.OBJECT then + entry = DBEntry(data_type, ("%s:%s"):format(action_data.spell_label, action_data.target_name)) + else + entry = DBEntry(data_type, action_data.identifier) + end if not entry then return @@ -979,8 +985,8 @@ guids_used[source_guid] = true end end - elseif slot_type == _G.LOOT_SLOT_MONEY then - table.insert(action_data.loot_list, ("money:%d"):format(_toCopper(item_text))) + -- elseif slot_type == _G.LOOT_SLOT_MONEY then + -- table.insert(action_data.loot_list, ("money:%d"):format(_toCopper(item_text))) elseif slot_type == _G.LOOT_SLOT_CURRENCY then table.insert(action_data.loot_list, ("currency:%d:%s"):format(quantity, icon_texture:match("[^\\]+$"):lower())) end @@ -1373,6 +1379,7 @@ if target_name == "" then return end + action_data.target_name = target_name action_data.type = AF.OBJECT elseif bit.band(spell_flags, AF.ZONE) == AF.ZONE then local identifier = ("%s:%s"):format(spell_label, _G["GameTooltipTextLeft1"]:GetText() or "NONE") -- Possible fishing pool name.