From 424fa054238505141ef62ad6bb204a9b1eda352a Mon Sep 17 00:00:00 2001 From: Ross Nichols Date: Wed, 16 Dec 2020 11:03:04 -0800 Subject: [PATCH] Add option for non-staggered Zeliak positioning --- 4H-Assist/data.lua | 275 ++++++++++++++++++++++++++++++++++-------- 4H-Assist/driver.lua | 31 +++-- 4H-Assist/options.lua | 25 +++- 4H-Assist/ui.lua | 5 +- 4 files changed, 269 insertions(+), 67 deletions(-) diff --git a/4H-Assist/data.lua b/4H-Assist/data.lua index 00820f3..b119c35 100644 --- a/4H-Assist/data.lua +++ b/4H-Assist/data.lua @@ -3,6 +3,7 @@ local ABP_4H = _G.ABP_4H; local pos = { healerTL = { 40, 25 }, + healerTR = { 65, 25 }, healerTR1 = { 67, 20 }, healerTR2 = { 64, 30 }, healerTR3 = { 67, 40 }, @@ -95,22 +96,96 @@ local roles = { healerccw11 = "healerccw11", healerccw12 = "healerccw12", + healerz1 = "healerz1", + healerz2 = "healerz2", + healerz3 = "healerz3", + healerz4 = "healerz4", + healerz5 = "healerz5", + healerz6 = "healerz6", + healerz7 = "healerz7", + healerz8 = "healerz8", + healerz9 = "healerz9", + healerz10 = "healerz10", + healerz11 = "healerz11", + healerz12 = "healerz12", + + healerzccw1 = "healerzccw1", + healerzccw2 = "healerzccw2", + healerzccw3 = "healerzccw3", + healerzccw4 = "healerzccw4", + healerzccw5 = "healerzccw5", + healerzccw6 = "healerzccw6", + healerzccw7 = "healerzccw7", + healerzccw8 = "healerzccw8", + healerzccw9 = "healerzccw9", + healerzccw10 = "healerzccw10", + healerzccw11 = "healerzccw11", + healerzccw12 = "healerzccw12", + independent = "independent", }; local healerMap = { - [roles.healer1] = roles.healerccw1, - [roles.healer2] = roles.healerccw2, - [roles.healer3] = roles.healerccw3, - [roles.healer4] = roles.healerccw4, - [roles.healer5] = roles.healerccw5, - [roles.healer6] = roles.healerccw6, - [roles.healer7] = roles.healerccw7, - [roles.healer8] = roles.healerccw8, - [roles.healer9] = roles.healerccw9, - [roles.healer10] = roles.healerccw10, - [roles.healer11] = roles.healerccw11, - [roles.healer12] = roles.healerccw12, + -- 0: no zeliak breakout, clockwise + [0] = { + [roles.healer1] = roles.healer1, + [roles.healer2] = roles.healer2, + [roles.healer3] = roles.healer3, + [roles.healer4] = roles.healer4, + [roles.healer5] = roles.healer5, + [roles.healer6] = roles.healer6, + [roles.healer7] = roles.healer7, + [roles.healer8] = roles.healer8, + [roles.healer9] = roles.healer9, + [roles.healer10] = roles.healer10, + [roles.healer11] = roles.healer11, + [roles.healer12] = roles.healer12, + }, + -- 1: zeliak breakout, clockwise + [1] = { + [roles.healer1] = roles.healerz1, + [roles.healer2] = roles.healerz2, + [roles.healer3] = roles.healerz3, + [roles.healer4] = roles.healerz4, + [roles.healer5] = roles.healerz5, + [roles.healer6] = roles.healerz6, + [roles.healer7] = roles.healerz7, + [roles.healer8] = roles.healerz8, + [roles.healer9] = roles.healerz9, + [roles.healer10] = roles.healerz10, + [roles.healer11] = roles.healerz11, + [roles.healer12] = roles.healerz12, + }, + -- 2: no zeliak breakout, counterclockwise + [2] = { + [roles.healer1] = roles.healerccw1, + [roles.healer2] = roles.healerccw2, + [roles.healer3] = roles.healerccw3, + [roles.healer4] = roles.healerccw4, + [roles.healer5] = roles.healerccw5, + [roles.healer6] = roles.healerccw6, + [roles.healer7] = roles.healerccw7, + [roles.healer8] = roles.healerccw8, + [roles.healer9] = roles.healerccw9, + [roles.healer10] = roles.healerccw10, + [roles.healer11] = roles.healerccw11, + [roles.healer12] = roles.healerccw12, + }, + -- 3: zeliak breakout, counterclockwise + [3] = { + [roles.healer1] = roles.healerzccw1, + [roles.healer2] = roles.healerzccw2, + [roles.healer3] = roles.healerzccw3, + [roles.healer4] = roles.healerzccw4, + [roles.healer5] = roles.healerzccw5, + [roles.healer6] = roles.healerzccw6, + [roles.healer7] = roles.healerzccw7, + [roles.healer8] = roles.healerzccw8, + [roles.healer9] = roles.healerzccw9, + [roles.healer10] = roles.healerzccw10, + [roles.healer11] = roles.healerzccw11, + [roles.healer12] = roles.healerzccw12, + }, }; local rolesSorted = { @@ -233,6 +308,30 @@ local topRoles = { [roles.healerccw10] = true, [roles.healerccw11] = true, [roles.healerccw12] = true, + [roles.healerz1] = true, + [roles.healerz2] = true, + [roles.healerz3] = true, + [roles.healerz4] = true, + [roles.healerz5] = true, + [roles.healerz6] = true, + [roles.healerz7] = true, + [roles.healerz8] = true, + [roles.healerz9] = true, + [roles.healerz10] = true, + [roles.healerz11] = true, + [roles.healerz12] = true, + [roles.healerzccw1] = true, + [roles.healerzccw2] = true, + [roles.healerzccw3] = true, + [roles.healerzccw4] = true, + [roles.healerzccw5] = true, + [roles.healerzccw6] = true, + [roles.healerzccw7] = true, + [roles.healerzccw8] = true, + [roles.healerzccw9] = true, + [roles.healerzccw10] = true, + [roles.healerzccw11] = true, + [roles.healerzccw12] = true, }; local raidRoles = { @@ -319,18 +418,42 @@ local roleNames = { [roles.healer10] = "Healer TR 1", [roles.healer11] = "Healer TR 2", [roles.healer12] = "Healer TR 3", - [roles.healerccw1] = "Healer BL CCW 1", - [roles.healerccw2] = "Healer BL CCW 2", - [roles.healerccw3] = "Healer BL CCW 3", - [roles.healerccw4] = "Healer BR CCW 1", - [roles.healerccw5] = "Healer BR CCW 2", - [roles.healerccw6] = "Healer BR CCW 3", - [roles.healerccw7] = "Healer TL CCW 1", - [roles.healerccw8] = "Healer TL CCW 2", - [roles.healerccw9] = "Healer TL CCW 3", - [roles.healerccw10] = "Healer TR CCW 1", - [roles.healerccw11] = "Healer TR CCW 2", - [roles.healerccw12] = "Healer TR CCW 3", + [roles.healerccw1] = "Healer BL 1", + [roles.healerccw2] = "Healer BL 2", + [roles.healerccw3] = "Healer BL 3", + [roles.healerccw4] = "Healer BR 1", + [roles.healerccw5] = "Healer BR 2", + [roles.healerccw6] = "Healer BR 3", + [roles.healerccw7] = "Healer TL 1", + [roles.healerccw8] = "Healer TL 2", + [roles.healerccw9] = "Healer TL 3", + [roles.healerccw10] = "Healer TR 1", + [roles.healerccw11] = "Healer TR 2", + [roles.healerccw12] = "Healer TR 3", + [roles.healerz1] = "Healer BL 1", + [roles.healerz2] = "Healer BL 2", + [roles.healerz3] = "Healer BL 3", + [roles.healerz4] = "Healer BR 1", + [roles.healerz5] = "Healer BR 2", + [roles.healerz6] = "Healer BR 3", + [roles.healerz7] = "Healer TL 1", + [roles.healerz8] = "Healer TL 2", + [roles.healerz9] = "Healer TL 3", + [roles.healerz10] = "Healer TR 1", + [roles.healerz11] = "Healer TR 2", + [roles.healerz12] = "Healer TR 3", + [roles.healerzccw1] = "Healer BL 1", + [roles.healerzccw2] = "Healer BL 2", + [roles.healerzccw3] = "Healer BL 3", + [roles.healerzccw4] = "Healer BR 1", + [roles.healerzccw5] = "Healer BR 2", + [roles.healerzccw6] = "Healer BR 3", + [roles.healerzccw7] = "Healer TL 1", + [roles.healerzccw8] = "Healer TL 2", + [roles.healerzccw9] = "Healer TL 3", + [roles.healerzccw10] = "Healer TR 1", + [roles.healerzccw11] = "Healer TR 2", + [roles.healerzccw12] = "Healer TR 3", }; local roleColors = { @@ -371,6 +494,30 @@ local roleColors = { [roles.healerccw10] = "ffff66", [roles.healerccw11] = "ffff66", [roles.healerccw12] = "ffff66", + [roles.healerz1] = "ffff66", + [roles.healerz2] = "ffff66", + [roles.healerz3] = "ffff66", + [roles.healerz4] = "ffff66", + [roles.healerz5] = "ffff66", + [roles.healerz6] = "ffff66", + [roles.healerz7] = "ffff66", + [roles.healerz8] = "ffff66", + [roles.healerz9] = "ffff66", + [roles.healerz10] = "ffff66", + [roles.healerz11] = "ffff66", + [roles.healerz12] = "ffff66", + [roles.healerzccw1] = "ffff66", + [roles.healerzccw2] = "ffff66", + [roles.healerzccw3] = "ffff66", + [roles.healerzccw4] = "ffff66", + [roles.healerzccw5] = "ffff66", + [roles.healerzccw6] = "ffff66", + [roles.healerzccw7] = "ffff66", + [roles.healerzccw8] = "ffff66", + [roles.healerzccw9] = "ffff66", + [roles.healerzccw10] = "ffff66", + [roles.healerzccw11] = "ffff66", + [roles.healerzccw12] = "ffff66", }; local roleNamesColored = {}; @@ -394,37 +541,69 @@ local rotations = { [roles.ot3] = { [0] = pos.tankdpsTR, [3] = pos.safe, [6] = pos.tankdpsTL, [9] = pos.safe, [12] = pos.tankdpsTR }, [roles.ot4] = { [0] = pos.safe, [3] = pos.tankdpsTR, [6] = pos.safe, [9] = pos.tankdpsTL, [12] = pos.safe }, - [roles.healer1] = { [0] = pos.healerBL, [1] = pos.healerTL, [4] = pos.healerTR1, [5] = pos.healerTR2, [6] = pos.healerTR3, [7] = pos.healerBR, [10] = pos.healerBL }, - [roles.healer2] = { [0] = pos.healerBL, [2] = pos.healerTL, [5] = pos.healerTR1, [6] = pos.healerTR2, [7] = pos.healerTR3, [8] = pos.healerBR, [11] = pos.healerBL }, - [roles.healer3] = { [0] = pos.healerBL, [3] = pos.healerTL, [6] = pos.healerTR1, [7] = pos.healerTR2, [8] = pos.healerTR3, [9] = pos.healerBR, [12] = pos.healerBL }, + [roles.healer1] = { [0] = pos.healerBL, [1] = pos.healerTL, [4] = pos.healerTR, [7] = pos.healerBR, [10] = pos.healerBL }, + [roles.healer2] = { [0] = pos.healerBL, [2] = pos.healerTL, [5] = pos.healerTR, [8] = pos.healerBR, [11] = pos.healerBL }, + [roles.healer3] = { [0] = pos.healerBL, [3] = pos.healerTL, [6] = pos.healerTR, [9] = pos.healerBR, [12] = pos.healerBL }, + + [roles.healer4] = { [0] = pos.healerBR, [1] = pos.healerBL, [4] = pos.healerTL, [7] = pos.healerTR, [10] = pos.healerBR }, + [roles.healer5] = { [0] = pos.healerBR, [2] = pos.healerBL, [5] = pos.healerTL, [8] = pos.healerTR, [11] = pos.healerBR }, + [roles.healer6] = { [0] = pos.healerBR, [3] = pos.healerBL, [6] = pos.healerTL, [9] = pos.healerTR, [12] = pos.healerBR }, + + [roles.healer7] = { [0] = pos.healerTL, [1] = pos.healerTR, [4] = pos.healerBR, [7] = pos.healerBL, [10] = pos.healerTL }, + [roles.healer8] = { [0] = pos.healerTL, [2] = pos.healerTR, [5] = pos.healerBR, [8] = pos.healerBL, [11] = pos.healerTL }, + [roles.healer9] = { [0] = pos.healerTL, [3] = pos.healerTR, [6] = pos.healerBR, [9] = pos.healerBL, [12] = pos.healerTL }, + + [roles.healer10] = { [0] = pos.healerTR, [1] = pos.healerBR, [4] = pos.healerBL, [7] = pos.healerTL, [10] = pos.healerTR }, + [roles.healer11] = { [0] = pos.healerTR, [2] = pos.healerBR, [5] = pos.healerBL, [8] = pos.healerTL, [11] = pos.healerTR }, + [roles.healer12] = { [0] = pos.healerTR, [3] = pos.healerBR, [6] = pos.healerBL, [9] = pos.healerTL, [12] = pos.healerTR }, + + [roles.healerccw1] = { [0] = pos.healerBL, [1] = pos.healerBR, [4] = pos.healerTR, [7] = pos.healerTL, [10] = pos.healerBL }, + [roles.healerccw2] = { [0] = pos.healerBL, [2] = pos.healerBR, [5] = pos.healerTR, [8] = pos.healerTL, [11] = pos.healerBL }, + [roles.healerccw3] = { [0] = pos.healerBL, [3] = pos.healerBR, [6] = pos.healerTR, [9] = pos.healerTL, [12] = pos.healerBL }, + + [roles.healerccw4] = { [0] = pos.healerBR, [1] = pos.healerTR, [4] = pos.healerTL, [7] = pos.healerBL, [10] = pos.healerBR }, + [roles.healerccw5] = { [0] = pos.healerBR, [2] = pos.healerTR, [5] = pos.healerTL, [8] = pos.healerBL, [11] = pos.healerBR }, + [roles.healerccw6] = { [0] = pos.healerBR, [3] = pos.healerTR, [6] = pos.healerTL, [9] = pos.healerBL, [12] = pos.healerBR }, + + [roles.healerccw7] = { [0] = pos.healerTL, [1] = pos.healerBL, [4] = pos.healerBR, [7] = pos.healerTR, [10] = pos.healerTL }, + [roles.healerccw8] = { [0] = pos.healerTL, [2] = pos.healerBL, [5] = pos.healerBR, [8] = pos.healerTR, [11] = pos.healerTL }, + [roles.healerccw9] = { [0] = pos.healerTL, [3] = pos.healerBL, [6] = pos.healerBR, [9] = pos.healerTR, [12] = pos.healerTL }, + + [roles.healerccw10] = { [0] = pos.healerTR, [1] = pos.healerTL, [4] = pos.healerBL, [7] = pos.healerBR, [10] = pos.healerTR }, + [roles.healerccw11] = { [0] = pos.healerTR, [2] = pos.healerTL, [5] = pos.healerBL, [8] = pos.healerBR, [11] = pos.healerTR }, + [roles.healerccw12] = { [0] = pos.healerTR, [3] = pos.healerTL, [6] = pos.healerBL, [9] = pos.healerBR, [12] = pos.healerTR }, + + [roles.healerz1] = { [0] = pos.healerBL, [1] = pos.healerTL, [4] = pos.healerTR1, [5] = pos.healerTR2, [6] = pos.healerTR3, [7] = pos.healerBR, [10] = pos.healerBL }, + [roles.healerz2] = { [0] = pos.healerBL, [2] = pos.healerTL, [5] = pos.healerTR1, [6] = pos.healerTR2, [7] = pos.healerTR3, [8] = pos.healerBR, [11] = pos.healerBL }, + [roles.healerz3] = { [0] = pos.healerBL, [3] = pos.healerTL, [6] = pos.healerTR1, [7] = pos.healerTR2, [8] = pos.healerTR3, [9] = pos.healerBR, [12] = pos.healerBL }, - [roles.healer4] = { [0] = pos.healerBR, [1] = pos.healerBL, [4] = pos.healerTL, [7] = pos.healerTR1, [8] = pos.healerTR2, [9] = pos.healerTR3, [10] = pos.healerBR }, - [roles.healer5] = { [0] = pos.healerBR, [2] = pos.healerBL, [5] = pos.healerTL, [8] = pos.healerTR1, [9] = pos.healerTR2, [10] = pos.healerTR3, [11] = pos.healerBR }, - [roles.healer6] = { [0] = pos.healerBR, [3] = pos.healerBL, [6] = pos.healerTL, [9] = pos.healerTR1, [10] = pos.healerTR2, [11] = pos.healerTR3, [12] = pos.healerBR }, + [roles.healerz4] = { [0] = pos.healerBR, [1] = pos.healerBL, [4] = pos.healerTL, [7] = pos.healerTR1, [8] = pos.healerTR2, [9] = pos.healerTR3, [10] = pos.healerBR }, + [roles.healerz5] = { [0] = pos.healerBR, [2] = pos.healerBL, [5] = pos.healerTL, [8] = pos.healerTR1, [9] = pos.healerTR2, [10] = pos.healerTR3, [11] = pos.healerBR }, + [roles.healerz6] = { [0] = pos.healerBR, [3] = pos.healerBL, [6] = pos.healerTL, [9] = pos.healerTR1, [10] = pos.healerTR2, [11] = pos.healerTR3, [12] = pos.healerBR }, - [roles.healer7] = { [0] = pos.healerTL, [1] = pos.healerTR1, [2] = pos.healerTR2, [3] = pos.healerTR3, [4] = pos.healerBR, [7] = pos.healerBL, [10] = pos.healerTL }, - [roles.healer8] = { [0] = pos.healerTL, [2] = pos.healerTR1, [3] = pos.healerTR2, [4] = pos.healerTR3, [5] = pos.healerBR, [8] = pos.healerBL, [11] = pos.healerTL }, - [roles.healer9] = { [0] = pos.healerTL, [3] = pos.healerTR1, [4] = pos.healerTR2, [5] = pos.healerTR3, [6] = pos.healerBR, [9] = pos.healerBL, [12] = pos.healerTL }, + [roles.healerz7] = { [0] = pos.healerTL, [1] = pos.healerTR1, [2] = pos.healerTR2, [3] = pos.healerTR3, [4] = pos.healerBR, [7] = pos.healerBL, [10] = pos.healerTL }, + [roles.healerz8] = { [0] = pos.healerTL, [2] = pos.healerTR1, [3] = pos.healerTR2, [4] = pos.healerTR3, [5] = pos.healerBR, [8] = pos.healerBL, [11] = pos.healerTL }, + [roles.healerz9] = { [0] = pos.healerTL, [3] = pos.healerTR1, [4] = pos.healerTR2, [5] = pos.healerTR3, [6] = pos.healerBR, [9] = pos.healerBL, [12] = pos.healerTL }, - [roles.healer10] = { [0] = pos.healerTR3, [1] = pos.healerBR, [4] = pos.healerBL, [7] = pos.healerTL, [10] = pos.healerTR1, [11] = pos.healerTR2, [12] = pos.healerTR3 }, - [roles.healer11] = { [0] = pos.healerTR2, [1] = pos.healerTR3, [2] = pos.healerBR, [5] = pos.healerBL, [8] = pos.healerTL, [11] = pos.healerTR1, [12] = pos.healerTR2 }, - [roles.healer12] = { [0] = pos.healerTR1, [1] = pos.healerTR2, [2] = pos.healerTR3, [3] = pos.healerBR, [6] = pos.healerBL, [9] = pos.healerTL, [12] = pos.healerTR1 }, + [roles.healerz10] = { [0] = pos.healerTR3, [1] = pos.healerBR, [4] = pos.healerBL, [7] = pos.healerTL, [10] = pos.healerTR1, [11] = pos.healerTR2, [12] = pos.healerTR3 }, + [roles.healerz11] = { [0] = pos.healerTR2, [1] = pos.healerTR3, [2] = pos.healerBR, [5] = pos.healerBL, [8] = pos.healerTL, [11] = pos.healerTR1, [12] = pos.healerTR2 }, + [roles.healerz12] = { [0] = pos.healerTR1, [1] = pos.healerTR2, [2] = pos.healerTR3, [3] = pos.healerBR, [6] = pos.healerBL, [9] = pos.healerTL, [12] = pos.healerTR1 }, - [roles.healerccw1] = { [0] = pos.healerBL, [1] = pos.healerBR, [4] = pos.healerTR3, [5] = pos.healerTR2, [6] = pos.healerTR1, [7] = pos.healerTL, [10] = pos.healerBL }, - [roles.healerccw2] = { [0] = pos.healerBL, [2] = pos.healerBR, [5] = pos.healerTR3, [6] = pos.healerTR2, [7] = pos.healerTR1, [8] = pos.healerTL, [11] = pos.healerBL }, - [roles.healerccw3] = { [0] = pos.healerBL, [3] = pos.healerBR, [6] = pos.healerTR3, [7] = pos.healerTR2, [8] = pos.healerTR1, [9] = pos.healerTL, [12] = pos.healerBL }, + [roles.healerzccw1] = { [0] = pos.healerBL, [1] = pos.healerBR, [4] = pos.healerTR3, [5] = pos.healerTR2, [6] = pos.healerTR1, [7] = pos.healerTL, [10] = pos.healerBL }, + [roles.healerzccw2] = { [0] = pos.healerBL, [2] = pos.healerBR, [5] = pos.healerTR3, [6] = pos.healerTR2, [7] = pos.healerTR1, [8] = pos.healerTL, [11] = pos.healerBL }, + [roles.healerzccw3] = { [0] = pos.healerBL, [3] = pos.healerBR, [6] = pos.healerTR3, [7] = pos.healerTR2, [8] = pos.healerTR1, [9] = pos.healerTL, [12] = pos.healerBL }, - [roles.healerccw4] = { [0] = pos.healerBR, [1] = pos.healerTR3, [2] = pos.healerTR2, [3] = pos.healerTR1, [4] = pos.healerTL, [7] = pos.healerBL, [10] = pos.healerBR }, - [roles.healerccw5] = { [0] = pos.healerBR, [2] = pos.healerTR3, [3] = pos.healerTR2, [4] = pos.healerTR1, [5] = pos.healerTL, [8] = pos.healerBL, [11] = pos.healerBR }, - [roles.healerccw6] = { [0] = pos.healerBR, [3] = pos.healerTR3, [4] = pos.healerTR2, [5] = pos.healerTR1, [6] = pos.healerTL, [9] = pos.healerBL, [12] = pos.healerBR }, + [roles.healerzccw4] = { [0] = pos.healerBR, [1] = pos.healerTR3, [2] = pos.healerTR2, [3] = pos.healerTR1, [4] = pos.healerTL, [7] = pos.healerBL, [10] = pos.healerBR }, + [roles.healerzccw5] = { [0] = pos.healerBR, [2] = pos.healerTR3, [3] = pos.healerTR2, [4] = pos.healerTR1, [5] = pos.healerTL, [8] = pos.healerBL, [11] = pos.healerBR }, + [roles.healerzccw6] = { [0] = pos.healerBR, [3] = pos.healerTR3, [4] = pos.healerTR2, [5] = pos.healerTR1, [6] = pos.healerTL, [9] = pos.healerBL, [12] = pos.healerBR }, - [roles.healerccw7] = { [0] = pos.healerTL, [1] = pos.healerBL, [4] = pos.healerBR, [7] = pos.healerTR3, [8] = pos.healerTR2, [9] = pos.healerTR1, [10] = pos.healerTL }, - [roles.healerccw8] = { [0] = pos.healerTL, [2] = pos.healerBL, [5] = pos.healerBR, [8] = pos.healerTR3, [9] = pos.healerTR2, [10] = pos.healerTR1, [11] = pos.healerTL }, - [roles.healerccw9] = { [0] = pos.healerTL, [3] = pos.healerBL, [6] = pos.healerBR, [9] = pos.healerTR3, [10] = pos.healerTR2, [11] = pos.healerTR1, [12] = pos.healerTL }, + [roles.healerzccw7] = { [0] = pos.healerTL, [1] = pos.healerBL, [4] = pos.healerBR, [7] = pos.healerTR3, [8] = pos.healerTR2, [9] = pos.healerTR1, [10] = pos.healerTL }, + [roles.healerzccw8] = { [0] = pos.healerTL, [2] = pos.healerBL, [5] = pos.healerBR, [8] = pos.healerTR3, [9] = pos.healerTR2, [10] = pos.healerTR1, [11] = pos.healerTL }, + [roles.healerzccw9] = { [0] = pos.healerTL, [3] = pos.healerBL, [6] = pos.healerBR, [9] = pos.healerTR3, [10] = pos.healerTR2, [11] = pos.healerTR1, [12] = pos.healerTL }, - [roles.healerccw10] = { [0] = pos.healerTR1, [1] = pos.healerTL, [4] = pos.healerBL, [7] = pos.healerBR, [10] = pos.healerTR3, [11] = pos.healerTR2, [12] = pos.healerTR1 }, - [roles.healerccw11] = { [0] = pos.healerTR2, [1] = pos.healerTR1, [2] = pos.healerTL, [5] = pos.healerBL, [8] = pos.healerBR, [11] = pos.healerTR3, [12] = pos.healerTR2 }, - [roles.healerccw12] = { [0] = pos.healerTR3, [1] = pos.healerTR2, [2] = pos.healerTR1, [3] = pos.healerTL, [6] = pos.healerBL, [9] = pos.healerBR, [12] = pos.healerTR3 }, + [roles.healerzccw10] = { [0] = pos.healerTR1, [1] = pos.healerTL, [4] = pos.healerBL, [7] = pos.healerBR, [10] = pos.healerTR3, [11] = pos.healerTR2, [12] = pos.healerTR1 }, + [roles.healerzccw11] = { [0] = pos.healerTR2, [1] = pos.healerTR1, [2] = pos.healerTL, [5] = pos.healerBL, [8] = pos.healerBR, [11] = pos.healerTR3, [12] = pos.healerTR2 }, + [roles.healerzccw12] = { [0] = pos.healerTR3, [1] = pos.healerTR2, [2] = pos.healerTR1, [3] = pos.healerTL, [6] = pos.healerBL, [9] = pos.healerBR, [12] = pos.healerTR3 }, }; for _, rotation in pairs(rotations) do local pos = rotation[0]; diff --git a/4H-Assist/driver.lua b/4H-Assist/driver.lua index 36db8fe..2aea443 100644 --- a/4H-Assist/driver.lua +++ b/4H-Assist/driver.lua @@ -179,11 +179,11 @@ local function SendStateComm(active, dist, target) if dist == "BROADCAST" then local _, map = ABP_4H:GetRaiderSlots(); processedRoles = {}; - local ccw = ABP_4H:Get("healerCCW"); + local healerSetup = ABP_4H:GetHealerSetup(); for player, slot in pairs(map) do local role = assignedRoles[slot]; - if ccw and ABP_4H.RoleCategories[role] == ABP_4H.Categories.healer then - role = ABP_4H.HealerMap[role]; + if ABP_4H.RoleCategories[role] == ABP_4H.Categories.healer then + role = ABP_4H.HealerMap[healerSetup][role]; end processedRoles[player] = role; end @@ -965,19 +965,26 @@ function ABP_4H:CreateStartWindow() options:AddChild(restricted); self:AddWidgetTooltip(restricted, "If assignments are capped, you cannot assign a role to more slots than it was originally allocated in the base configuration."); - local ccw = AceGUI:Create("CheckBox"); - ccw:SetWidth(140); - ccw:SetLabel("CCW Healers"); - ccw:SetValue(self:Get("healerCCW")); - ccw:SetUserData("cell", { paddingH = 10 }); - ccw:SetCallback("OnValueChanged", function(widget, event, value) - self:Set("healerCCW", value); + local healerOpts = { healerCCW = "Counter-clockwise", healerZeliak = "Staggered Zeliak" }; + local healerOptsElt = AceGUI:Create("Dropdown"); + healerOptsElt:SetFullWidth(true); + healerOptsElt:SetUserData("cell", { paddingH = 10 }); + healerOptsElt:SetMultiselect(true); + healerOptsElt:SetList(healerOpts); + healerOptsElt:SetItemValue() + for k in pairs(healerOpts) do + healerOptsElt:SetItemValue(k, self:Get(k)); + end + healerOptsElt:SetLabel("Healer Opts"); + healerOptsElt:SetCallback("OnValueChanged", function(widget, event, value, checked) + self:Set(value, checked); window:SetUserData("readyPlayers", {}); window:SetUserData("lastSync", 0); Refresh(); end); - options:AddChild(ccw); - self:AddWidgetTooltip(ccw, "If checked, healers will rotate counterclockwise instead of clockwise."); + options:AddChild(healerOptsElt); + self:AddWidgetTooltip(healerOptsElt, "|cff00ff00Counter-clockwise|r: If checked, healers will rotate counterclockwise instead of clockwise.\n\n" .. + "|cff00ff00Staggered Zeliak|r: If checked, healer positions in Zeliak's corner will be staggered, with the healer moving each mark."); local loadLayout = AceGUI:Create("Dropdown"); loadLayout:SetLabel("Load Layout"); diff --git a/4H-Assist/options.lua b/4H-Assist/options.lua index 0140c31..f9f08b4 100644 --- a/4H-Assist/options.lua +++ b/4H-Assist/options.lua @@ -20,6 +20,7 @@ function ABP_4H:InitOptions() raidLayout = nil, selectedRaidLayout = 2, healerCCW = false, + healerZeliak = true, windowManagement = {}, }, global = { @@ -164,12 +165,14 @@ function ABP_4H:InitOptions() set = function(info, v) self.db.char.showNeighbors = v; self:RefreshMainWindow(); end, }, ccw = { - name = "CCW Healers", + name = "Healer Opts", order = 8, - desc = "If checked, healers will rotate counterclockwise instead of clockwise.", - type = "toggle", - get = function(info) return self.db.char.healerCCW; end, - set = function(info, v) self.db.char.healerCCW = v; self:RefreshMainWindow(); end, + desc = "|cff00ff00Counter-clockwise|r: If checked, healers will rotate counterclockwise instead of clockwise.\n\n" .. + "|cff00ff00Staggered Zeliak|r: If checked, healer positions in Zeliak's corner will be staggered, with the healer moving each mark.", + type = "multiselect", + values = { healerCCW = "Counter-clockwise", healerZeliak = "Staggered Zeliak" }, + get = function(info, k) return self.db.char[k]; end, + set = function(info, k, v) self.db.char[k] = v; self:RefreshMainWindow(); end, }, alpha = { name = "Map Alpha", @@ -317,3 +320,15 @@ function ABP_4H:SaveLayout(name, layout) local layouts = self:GetGlobal("raidLayouts"); layouts[name] = layout; end + +function ABP_4H:GetHealerSetup() + -- 0: no zeliak breakout, clockwise + -- 1: zeliak breakout, clockwise + -- 2: no zeliak breakout, counterclockwise + -- 3: zeliak breakout, counterclockwise + + local ccw = ABP_4H:Get("healerCCW") and 2 or 0; + local z = ABP_4H:Get("healerZeliak") and 1 or 0; + + return ccw + z; +end diff --git a/4H-Assist/ui.lua b/4H-Assist/ui.lua index 1739989..49d15c4 100644 --- a/4H-Assist/ui.lua +++ b/4H-Assist/ui.lua @@ -687,8 +687,9 @@ function ABP_4H:CreateMainWindow() roleSelector:SetFullWidth(true); roleSelector:SetList(self.RoleNamesColored, self.RolesSorted); roleSelector:SetCallback("OnValueChanged", function(widget, event, value) - if self:Get("healerCCW") and self.RoleCategories[value] == self.Categories.healer then - value = self.HealerMap[value]; + local healerSetup = ABP_4H:GetHealerSetup(); + if self.RoleCategories[value] == self.Categories.healer then + value = self.HealerMap[healerSetup][value]; end window:SetUserData("role", value); window:SetUserData("tick", -1);