Mercurial > wow > wowdb-profiler
comparison Main.lua @ 508:16498dc5159f
Fixed debug spam from 7.1 changes to unit coordinates in instances.
author | MMOSimca <mmosimca@gmail.com> |
---|---|
date | Wed, 26 Oct 2016 15:12:59 -0400 |
parents | abc372f93293 |
children | fc7a86235431 |
comparison
equal
deleted
inserted
replaced
507:c28db7237ba2 | 508:16498dc5159f |
---|---|
473 if not identifier then | 473 if not identifier then |
474 return | 474 return |
475 end | 475 end |
476 local zone_name, area_id, x, y, map_level, difficulty_token = CurrentLocationData() | 476 local zone_name, area_id, x, y, map_level, difficulty_token = CurrentLocationData() |
477 if not (zone_name and area_id and x and y and map_level) then | 477 if not (zone_name and area_id and x and y and map_level) then |
478 Debug("UpdateDBEntryLocation: Missing current location data - %s, %s, %s, %s, %s.", tostring(zone_name), tostring(area_id), tostring(x), tostring(y), tostring(map_level)) | 478 if not (_G.IsInInstance()) then |
479 Debug("UpdateDBEntryLocation: Missing current location data - %s, %s, %s, %s, %s.", tostring(zone_name), tostring(area_id), tostring(x), tostring(y), tostring(map_level)) | |
480 end | |
479 return | 481 return |
480 end | 482 end |
481 local entry = DBEntry(entry_type, identifier) | 483 local entry = DBEntry(entry_type, identifier) |
482 entry[difficulty_token] = entry[difficulty_token] or {} | 484 entry[difficulty_token] = entry[difficulty_token] or {} |
483 entry[difficulty_token].locations = entry[difficulty_token].locations or {} | 485 entry[difficulty_token].locations = entry[difficulty_token].locations or {} |
1306 if not npc then | 1308 if not npc then |
1307 return | 1309 return |
1308 end | 1310 end |
1309 local zone_name, area_id, x, y, map_level, difficulty_token = CurrentLocationData() | 1311 local zone_name, area_id, x, y, map_level, difficulty_token = CurrentLocationData() |
1310 if not (zone_name and area_id and x and y and map_level) then | 1312 if not (zone_name and area_id and x and y and map_level) then |
1311 Debug("UpdateTargetLocation: Missing current location data - %s, %s, %s, %s, %s.", tostring(zone_name), tostring(area_id), tostring(x), tostring(y), tostring(map_level)) | 1313 if not (_G.IsInInstance()) then |
1314 Debug("UpdateTargetLocation: Missing current location data - %s, %s, %s, %s, %s.", tostring(zone_name), tostring(area_id), tostring(x), tostring(y), tostring(map_level)) | |
1315 end | |
1312 return | 1316 return |
1313 end | 1317 end |
1314 local npc_data = npc:EncounterData(difficulty_token).stats[("level_%d"):format(_G.UnitLevel("target"))] | 1318 local npc_data = npc:EncounterData(difficulty_token).stats[("level_%d"):format(_G.UnitLevel("target"))] |
1315 local zone_token = ("%s:%d"):format(zone_name, area_id) | 1319 local zone_token = ("%s:%d"):format(zone_name, area_id) |
1316 npc_data.locations = npc_data.locations or {} -- TODO: Fix this. It is broken. Possibly something to do with the timed updates. | 1320 npc_data.locations = npc_data.locations or {} -- TODO: Fix this. It is broken. Possibly something to do with the timed updates. |
2202 | 2206 |
2203 if _G.IsFishingLoot() then | 2207 if _G.IsFishingLoot() then |
2204 -- Set up a proper 'fishing' current_action table | 2208 -- Set up a proper 'fishing' current_action table |
2205 local zone_name, area_id, x, y, map_level, instance_token = CurrentLocationData() | 2209 local zone_name, area_id, x, y, map_level, instance_token = CurrentLocationData() |
2206 if not (zone_name and area_id and x and y and map_level) then | 2210 if not (zone_name and area_id and x and y and map_level) then |
2207 Debug("%s: Missing current location data - %s, %s, %s, %s, %s.", log_source, tostring(zone_name), tostring(area_id), tostring(x), tostring(y), tostring(map_level)) | 2211 if not (_G.IsInInstance()) then |
2212 Debug("%s: Missing current location data - %s, %s, %s, %s, %s.", log_source, tostring(zone_name), tostring(area_id), tostring(x), tostring(y), tostring(map_level)) | |
2213 end | |
2208 return | 2214 return |
2209 end | 2215 end |
2210 current_action.instance_token = instance_token | 2216 current_action.instance_token = instance_token |
2211 current_action.map_level = map_level | 2217 current_action.map_level = map_level |
2212 current_action.x = x | 2218 current_action.x = x |
2855 unit_id = "target" | 2861 unit_id = "target" |
2856 end | 2862 end |
2857 local spell_flags = private.SPELL_FLAGS_BY_LABEL[spell_label] | 2863 local spell_flags = private.SPELL_FLAGS_BY_LABEL[spell_label] |
2858 local zone_name, area_id, x, y, map_level, instance_token = CurrentLocationData() | 2864 local zone_name, area_id, x, y, map_level, instance_token = CurrentLocationData() |
2859 if not (zone_name and area_id and x and y and map_level) then | 2865 if not (zone_name and area_id and x and y and map_level) then |
2860 Debug("%s: Missing current location data - %s, %s, %s, %s, %s.", event_name, tostring(zone_name), tostring(area_id), tostring(x), tostring(y), tostring(map_level)) | 2866 if not (_G.IsInInstance()) then |
2867 Debug("%s: Missing current location data - %s, %s, %s, %s, %s.", event_name, tostring(zone_name), tostring(area_id), tostring(x), tostring(y), tostring(map_level)) | |
2868 end | |
2861 return | 2869 return |
2862 end | 2870 end |
2863 | 2871 |
2864 table.wipe(current_action) | 2872 table.wipe(current_action) |
2865 current_action.instance_token = instance_token | 2873 current_action.instance_token = instance_token |