comparison 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
comparison
equal deleted inserted replaced
560:1cff67298998 561:bb5a42af4db0
439 entry[difficulty_token].locations[zone_token] = zone_data 439 entry[difficulty_token].locations[zone_token] = zone_data
440 end 440 end
441 441
442 -- Special case for Fishing. 442 -- Special case for Fishing.
443 if current_action.spell_label == "FISHING" then 443 if current_action.spell_label == "FISHING" then
444 local _, qx, qy = _G.GetWorldLocFromMapPos(0, 0) 444 local _, q_vector = _G.C_Map.GetWorldPosFromMapPos(area_id, _G.CreateVector2D(0,0))
445 local _, wx, wy = _G.GetWorldLocFromMapPos(1, 1) 445 local _, w_vector = _G.C_Map.GetWorldPosFromMapPos(area_id, _G.CreateVector2D(1,1))
446 local yard_width, yard_height = qy - wy, qx - wx 446 local yard_width, yard_height = q_vector.y - w_vector.y, q_vector.x - w_vector.x
447 447
448 if yard_width > 0 and yard_height > 0 then 448 if yard_width > 0 and yard_height > 0 then
449 x, y = FishingCoordinates(x, y, yard_width, yard_height) 449 x, y = FishingCoordinates(x, y, yard_width, yard_height)
450 current_action.x = x 450 current_action.x = x
451 current_action.y = y 451 current_action.y = y