Mercurial > wow > wowdb-profiler
comparison Main.lua @ 372:54d5562a6ad5
Added future code for handling bonusIDs of 0 and updated multiple debug statements.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Sat, 22 Nov 2014 07:09:12 -0500 |
parents | 2d0899e85e29 |
children | b372179ddaac |
comparison
equal
deleted
inserted
replaced
371:2d0899e85e29 | 372:54d5562a6ad5 |
---|---|
1042 end | 1042 end |
1043 | 1043 |
1044 if instance_difficulty_id and instance_difficulty_id ~= 0 then | 1044 if instance_difficulty_id and instance_difficulty_id ~= 0 then |
1045 item.instance_difficulty_id = instance_difficulty_id | 1045 item.instance_difficulty_id = instance_difficulty_id |
1046 end | 1046 end |
1047 | |
1048 -- Future code: waiting for dev time to implement server-side parsing | |
1049 --[[if not item.bonus_ids then | |
1050 item.bonus_ids = {} | |
1051 end | |
1052 item.bonus_ids[0] = true]]-- | |
1047 end | 1053 end |
1048 elseif num_bonus_ids > 0 then | 1054 elseif num_bonus_ids > 0 then |
1049 item = DBEntry("items", item_id) | 1055 item = DBEntry("items", item_id) |
1050 | 1056 |
1051 item.unique_id = bit.band(unique_id, 0xFFFF) | 1057 item.unique_id = bit.band(unique_id, 0xFFFF) |
1056 end | 1062 end |
1057 | 1063 |
1058 for bonus_index = 1, num_bonus_ids do | 1064 for bonus_index = 1, num_bonus_ids do |
1059 item.bonus_ids[tonumber(item_results[13 + bonus_index])] = true | 1065 item.bonus_ids[tonumber(item_results[13 + bonus_index])] = true |
1060 end | 1066 end |
1067 | |
1068 Debug("RecordItemData: Recorded bonusIDs for %d.", item_id) | |
1061 else | 1069 else |
1062 Debug("RecordItemData: Item_system is supposed to be 0 or positive, instead it was %s.", item_system) | 1070 Debug("RecordItemData: num_bonus_ids is supposed to be 0 or positive, instead it was %d.", num_bonus_ids) |
1063 end | 1071 end |
1064 if upgrade_id and upgrade_id ~= 0 then | 1072 if upgrade_id and upgrade_id ~= 0 then |
1065 DatamineTT:SetHyperlink(item_link) | 1073 DatamineTT:SetHyperlink(item_link) |
1066 ScrapeItemUpgradeStats(item_id, upgrade_id) | 1074 ScrapeItemUpgradeStats(item_id, upgrade_id) |
1067 end | 1075 end |
1274 function WDP:UNIT_PET(event_name, unit_id) | 1282 function WDP:UNIT_PET(event_name, unit_id) |
1275 UpdateUnitPet(_G.UnitGUID(unit_id), unit_id) | 1283 UpdateUnitPet(_G.UnitGUID(unit_id), unit_id) |
1276 end | 1284 end |
1277 | 1285 |
1278 | 1286 |
1279 function WDP:SHOW_LOOT_TOAST(event_name, loot_type, item_link, quantity, specID, sex, isPersonal, lootSource) | 1287 function WDP:SHOW_LOOT_TOAST(event_name, loot_type, item_link, quantity, spec_ID, is_personal, loot_source) |
1280 if not loot_type or (loot_type ~= "item" and loot_type ~= "money" and loot_type ~= "currency") then | 1288 if not loot_type or (loot_type ~= "item" and loot_type ~= "money" and loot_type ~= "currency") then |
1281 Debug("%s: loot_type is %s. Item link is %s, and quantity is %d.", event_name, loot_type, item_link, quantity) | 1289 Debug("%s: loot_type is %s. Item link is %s, and quantity is %d.", event_name, loot_type, item_link, quantity) |
1282 return | 1290 return |
1283 end | 1291 end |
1284 local container_id = private.loot_toast_container_id | 1292 local container_id = private.loot_toast_container_id |
1285 local npc_id = private.raid_boss_id | 1293 local npc_id = private.raid_boss_id |
1286 | 1294 |
1295 -- Need information on the most recent args, so using this complete debug statement for now | |
1296 Debug("%s: loot_type: %s, item_link: %s, quantity: %s, spec_ID: %s, is_personal: %s, loot_source: %s", event_name, loot_type, item_link, quantity, spec_ID, is_personal, loot_source) | |
1297 | |
1287 -- Handle Garrison cache specially | 1298 -- Handle Garrison cache specially |
1288 if lootSource and last_garrison_cache_object_id and (lootSource == private.GARRISON_CACHE_LOOT_SOURCE_ID) then | 1299 if lootSource and last_garrison_cache_object_id and (lootSource == private.GARRISON_CACHE_LOOT_SOURCE_ID) then |
1289 -- Record location data for cache | 1300 -- Record location data for cache |
1290 UpdateDBEntryLocation("objects", ("OPENING:%d"):format(last_garrison_cache_object_id)) | 1301 UpdateDBEntryLocation("objects", ("OPENING:%d"):format(last_garrison_cache_object_id)) |
1291 | 1302 |