diff Main.lua @ 561:bb5a42af4db0

Fixed fishing loot location recording.
author Caleb Atherton <atcaleb@twitch.tv>
date Fri, 20 Jul 2018 03:43:48 -0400
parents eb77bf9c8e2f
children 2be7eedb205b
line wrap: on
line diff
--- a/Main.lua	Wed Jul 18 02:53:45 2018 -0400
+++ b/Main.lua	Fri Jul 20 03:43:48 2018 -0400
@@ -441,9 +441,9 @@
 
         -- Special case for Fishing.
         if current_action.spell_label == "FISHING" then
-            local _, qx, qy = _G.GetWorldLocFromMapPos(0, 0)
-            local _, wx, wy = _G.GetWorldLocFromMapPos(1, 1)
-            local yard_width, yard_height = qy - wy, qx - wx
+            local _, q_vector = _G.C_Map.GetWorldPosFromMapPos(area_id, _G.CreateVector2D(0,0))
+            local _, w_vector = _G.C_Map.GetWorldPosFromMapPos(area_id, _G.CreateVector2D(1,1))
+            local yard_width, yard_height = q_vector.y - w_vector.y, q_vector.x - w_vector.x
 
             if yard_width > 0 and yard_height > 0 then
                 x, y = FishingCoordinates(x, y, yard_width, yard_height)