# HG changeset patch # User James D. Callahan III # Date 1345666530 18000 # Node ID fc3e8a55d7ea1ac35bd7991f5700b0590a9c8f4f # Parent 3db9f681d2e517acbc73355b4300eead02774c88 Ignore money completely (for now). Revert to using names for certain objects since Archaeology doesn't produce a GUID. diff -r 3db9f681d2e5 -r fc3e8a55d7ea Main.lua --- 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.