Skip to content

Commit

Permalink
Fix mathematical equation using subtraction and modulo
Browse files Browse the repository at this point in the history
  • Loading branch information
steve1316 committed Oct 14, 2023
1 parent 6677027 commit 211a80a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src-tauri/backend/bot/game_modes/raid.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,14 @@ def _join_raid():

for index, grid in enumerate(Raid._GRID_SECTIONS):
if grid_pos in grid:
MouseUtils.move_and_click_point(anchor_pos[0] - 125 + anchor_x_offset * (grid_pos - 1), anchor_pos[1] + 195 + anchor_y_offset * (index - 1), "template_raid_category")
# Determine the position in the grid via modulo.
if grid_pos % 3 == 1:
grid_modulo_pos = 2
elif grid_pos % 3 == 2:
grid_modulo_pos = 1
else:
grid_modulo_pos = 0
MouseUtils.move_and_click_point(anchor_pos[0] + 125 - (anchor_x_offset * grid_modulo_pos), anchor_pos[1] + 195 + anchor_y_offset * (index - 1), "template_raid_category")
break

# A list of raids is now shown. Now make that raid filter active and then close out the popup.
Expand Down

0 comments on commit 211a80a

Please sign in to comment.