changeset 401:2fa787786d9a

Added loot verification functions for NPCs and objects to prevent fishing data from being misrecorded.
author MMOSimca <MMOSimca@gmail.com>
date Sun, 21 Dec 2014 22:43:43 -0500
parents eb64f3b68a27
children da1daa941777
files Main.lua
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Main.lua	Sun Dec 21 22:40:43 2014 -0500
+++ b/Main.lua	Sun Dec 21 22:43:43 2014 -0500
@@ -1947,8 +1947,12 @@
             current_action.identifier = locked_item_id
             return true
         end,
-        [AF.NPC] = true,
-        [AF.OBJECT] = true,
+        [AF.NPC] = function()
+            return not _G.IsFishingLoot()
+        end,
+        [AF.OBJECT] = function()
+            return not _G.IsFishingLoot()
+        end,
         [AF.ZONE] = function()
             current_action.zone_data = UpdateDBEntryLocation("zones", current_action.identifier)
             return _G.IsFishingLoot()
@@ -2131,7 +2135,6 @@
             return false
         end
 
-        Debug("%s: Successfully extrapolated information for current_action.", log_source)
         return true
     end
 
@@ -2150,8 +2153,6 @@
         end
 
         if not current_action.target_type then
-            Debug("%s: No target type found. Attempting to extrapolate current_action from loot data.", event_name)
-
             if not ExtrapolatedCurrentActionFromLootData(event_name) then
                 Debug("%s: Unable to extrapolate current_action. Aborting attempts to handle loot for now.", event_name)
                 return