Mercurial > wow > wowdb-profiler
comparison Main.lua @ 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 | 1f09f3590baa |
comparison
equal
deleted
inserted
replaced
81:3db9f681d2e5 | 82:fc3e8a55d7ea |
---|---|
432 table.insert(loot_table, ("%d:%d"):format(item_id, quantity)) | 432 table.insert(loot_table, ("%d:%d"):format(item_id, quantity)) |
433 end | 433 end |
434 end | 434 end |
435 end | 435 end |
436 -- TODO: Remove this when GetLootSourceInfo() has values for money | 436 -- TODO: Remove this when GetLootSourceInfo() has values for money |
437 if #action_data.loot_list <= 0 or action_data.type == AF.OBJECT then | 437 if #action_data.loot_list <= 0 then |
438 -- Unfortunately, this means we can't record money from chests... | 438 return |
439 return | 439 end |
440 end | 440 local entry |
441 local entry = DBEntry(data_type, action_data.identifier) | 441 |
442 -- At this point we only have a name if it's an object. | |
443 if action_data.type == AF.OBJECT then | |
444 entry = DBEntry(data_type, ("%s:%s"):format(action_data.spell_label, action_data.target_name)) | |
445 else | |
446 entry = DBEntry(data_type, action_data.identifier) | |
447 end | |
442 | 448 |
443 if not entry then | 449 if not entry then |
444 return | 450 return |
445 end | 451 end |
446 local loot_table = LootTable(entry, loot_type, top_field) | 452 local loot_table = LootTable(entry, loot_type, top_field) |
977 action_data.loot_sources[source_guid] = action_data.loot_sources[source_guid] or {} | 983 action_data.loot_sources[source_guid] = action_data.loot_sources[source_guid] or {} |
978 action_data.loot_sources[source_guid][item_id] = action_data.loot_sources[source_guid][item_id] or 0 + loot_quantity | 984 action_data.loot_sources[source_guid][item_id] = action_data.loot_sources[source_guid][item_id] or 0 + loot_quantity |
979 guids_used[source_guid] = true | 985 guids_used[source_guid] = true |
980 end | 986 end |
981 end | 987 end |
982 elseif slot_type == _G.LOOT_SLOT_MONEY then | 988 -- elseif slot_type == _G.LOOT_SLOT_MONEY then |
983 table.insert(action_data.loot_list, ("money:%d"):format(_toCopper(item_text))) | 989 -- table.insert(action_data.loot_list, ("money:%d"):format(_toCopper(item_text))) |
984 elseif slot_type == _G.LOOT_SLOT_CURRENCY then | 990 elseif slot_type == _G.LOOT_SLOT_CURRENCY then |
985 table.insert(action_data.loot_list, ("currency:%d:%s"):format(quantity, icon_texture:match("[^\\]+$"):lower())) | 991 table.insert(action_data.loot_list, ("currency:%d:%s"):format(quantity, icon_texture:match("[^\\]+$"):lower())) |
986 end | 992 end |
987 end | 993 end |
988 | 994 |
1371 | 1377 |
1372 if bit.band(spell_flags, AF.OBJECT) == AF.OBJECT then | 1378 if bit.band(spell_flags, AF.OBJECT) == AF.OBJECT then |
1373 if target_name == "" then | 1379 if target_name == "" then |
1374 return | 1380 return |
1375 end | 1381 end |
1382 action_data.target_name = target_name | |
1376 action_data.type = AF.OBJECT | 1383 action_data.type = AF.OBJECT |
1377 elseif bit.band(spell_flags, AF.ZONE) == AF.ZONE then | 1384 elseif bit.band(spell_flags, AF.ZONE) == AF.ZONE then |
1378 local identifier = ("%s:%s"):format(spell_label, _G["GameTooltipTextLeft1"]:GetText() or "NONE") -- Possible fishing pool name. | 1385 local identifier = ("%s:%s"):format(spell_label, _G["GameTooltipTextLeft1"]:GetText() or "NONE") -- Possible fishing pool name. |
1379 action_data.zone_data = UpdateDBEntryLocation("zones", identifier) | 1386 action_data.zone_data = UpdateDBEntryLocation("zones", identifier) |
1380 action_data.type = AF.ZONE | 1387 action_data.type = AF.ZONE |