Quantcast

add main tank and assist module

Ou Junhui [11-08-21 - 15:46]
add main tank and assist module
Filename
oUF_Simple/core/spawn.lua
oUF_Simple/oUF_Simple.toc
oUF_Simple/templates/mainassist.lua
oUF_Simple/templates/maintank.lua
oUF_SimpleConfig/mainassist.lua
oUF_SimpleConfig/maintank.lua
oUF_SimpleConfig/oUF_SimpleConfig.toc
oUF_SimpleConfig/raid.lua
rFilter_Zork/classes/hunter.lua
diff --git a/oUF_Simple/core/spawn.lua b/oUF_Simple/core/spawn.lua
index 8e9e9de..e1851ba 100644
--- a/oUF_Simple/core/spawn.lua
+++ b/oUF_Simple/core/spawn.lua
@@ -29,6 +29,8 @@ if L.F.CreateBossStyle then oUF:RegisterStyle(A.."Boss", L.F.CreateBossStyle) en
 if L.F.CreateNamePlateStyle then oUF:RegisterStyle(A.."Nameplate",L.F.CreateNamePlateStyle) end
 if L.F.CreateRaidStyle then oUF:RegisterStyle(A.."Raid", L.F.CreateRaidStyle) end
 if L.F.CreateArenaStyle then oUF:RegisterStyle(A.."Arena", L.F.CreateArenaStyle) end
+if L.F.CreateMainTankStyle then oUF:RegisterStyle(A.."MainTank", L.F.CreateMainTankStyle) end
+if L.F.CreateMainAssistStyle then oUF:RegisterStyle(A.."MainAssist", L.F.CreateMainAssistStyle) end

 -----------------------------
 -- Spawn Units
@@ -162,50 +164,54 @@ if L.F.CreateRaidStyle then
       ]]):format(L.C.raid.size[1], L.C.raid.size[2], L.C.raid.scale)
     ):SetPoint(unpack(L.C.raid.points[i])) --config needs to provide 8 point tables, one for each raid group
   end
+end

-  if L.C.raid.tank and L.C.raid.tank.enabled then
-    oUF:SpawnHeader(
-      A.."RaidHeader".."MainTank",
-      L.C.raid.setup.template,
-      L.C.raid.setup.visibility,
-      "showPlayer", L.C.raid.setup.showPlayer,
-      "showSolo",   L.C.raid.setup.showSolo,
-      "showParty",  L.C.raid.setup.showParty,
-      "showRaid",   L.C.raid.setup.showRaid,
-      "point",      L.C.raid.setup.point,
-      "xOffset",    L.C.raid.setup.xOffset,
-      "yOffset",    L.C.raid.setup.yOffset,
-      "groupFilter",    "MAINTANK",
-      "unitsPerColumn", 5,
-      "oUF-initialConfigFunction", ([[
-        self:SetWidth(%d)
-        self:SetHeight(%d)
-        self:GetParent():SetScale(%f)
-      ]]):format(L.C.raid.size[1], L.C.raid.size[2], L.C.raid.scale)
-    ):SetPoint(unpack(L.C.raid.tank.point))
-  end
+--spawn maintank
+if L.F.CreateMainTankStyle then
+  oUF:SetActiveStyle(A.."MainTank")
+  oUF:SpawnHeader(
+    A.."RaidHeader".."MainTank",
+    L.C.maintank.setup.template,
+    L.C.maintank.setup.visibility,
+    "showPlayer", L.C.maintank.setup.showPlayer,
+    "showSolo",   L.C.maintank.setup.showSolo,
+    "showParty",  L.C.maintank.setup.showParty,
+    "showRaid",   L.C.maintank.setup.showRaid,
+    "point",      L.C.maintank.setup.point,
+    "xOffset",    L.C.maintank.setup.xOffset,
+    "yOffset",    L.C.maintank.setup.yOffset,
+    "groupFilter",    "MAINTANK",
+    "unitsPerColumn", 5,
+    "oUF-initialConfigFunction", ([[
+      self:SetWidth(%d)
+      self:SetHeight(%d)
+      self:GetParent():SetScale(%f)
+    ]]):format(L.C.maintank.size[1], L.C.maintank.size[2], L.C.maintank.scale)
+  ):SetPoint(unpack(L.C.maintank.point))
+end

-  if L.C.raid.assist and L.C.raid.assist.enabled then
-    oUF:SpawnHeader(
-      A.."RaidHeader".."MainAssist",
-      L.C.raid.setup.template,
-      L.C.raid.setup.visibility,
-      "showPlayer", L.C.raid.setup.showPlayer,
-      "showSolo",   L.C.raid.setup.showSolo,
-      "showParty",  L.C.raid.setup.showParty,
-      "showRaid",   L.C.raid.setup.showRaid,
-      "point",      L.C.raid.setup.point,
-      "xOffset",    L.C.raid.setup.xOffset,
-      "yOffset",    L.C.raid.setup.yOffset,
-      "groupFilter",    "MAINASSIST",
-      "unitsPerColumn", 5,
-      "oUF-initialConfigFunction", ([[
-        self:SetWidth(%d)
-        self:SetHeight(%d)
-        self:GetParent():SetScale(%f)
-      ]]):format(L.C.raid.size[1], L.C.raid.size[2], L.C.raid.scale)
-    ):SetPoint(unpack(L.C.raid.assist.point))
-  end
+--spawn mainassist
+if L.F.CreateMainAssistStyle then
+  oUF:SetActiveStyle(A.."MainAssist")
+  oUF:SpawnHeader(
+    A.."RaidHeader".."MainAssist",
+    L.C.mainassist.setup.template,
+    L.C.mainassist.setup.visibility,
+    "showPlayer", L.C.mainassist.setup.showPlayer,
+    "showSolo",   L.C.mainassist.setup.showSolo,
+    "showParty",  L.C.mainassist.setup.showParty,
+    "showRaid",   L.C.mainassist.setup.showRaid,
+    "point",      L.C.mainassist.setup.point,
+    "xOffset",    L.C.mainassist.setup.xOffset,
+    "yOffset",    L.C.mainassist.setup.yOffset,
+    "groupFilter",    "MAINASSIST",
+    "unitsPerColumn", 5,
+    "oUF-initialConfigFunction", ([[
+      self:SetWidth(%d)
+      self:SetHeight(%d)
+      self:GetParent():SetScale(%f)
+    ]]):format(L.C.mainassist.size[1], L.C.mainassist.size[2], L.C.mainassist.scale)
+  ):SetPoint(unpack(L.C.mainassist.point))
 end

 --spawn arena frames
diff --git a/oUF_Simple/oUF_Simple.toc b/oUF_Simple/oUF_Simple.toc
index dddf25c..e2f4812 100644
--- a/oUF_Simple/oUF_Simple.toc
+++ b/oUF_Simple/oUF_Simple.toc
@@ -27,5 +27,7 @@ templates\boss.lua
 templates\nameplate.lua
 templates\raid.lua
 templates\arena.lua
+templates\maintank.lua
+templates\mainassist.lua

 core\spawn.lua
diff --git a/oUF_Simple/templates/mainassist.lua b/oUF_Simple/templates/mainassist.lua
new file mode 100644
index 0000000..cb4d1fc
--- /dev/null
+++ b/oUF_Simple/templates/mainassist.lua
@@ -0,0 +1,29 @@
+
+-- oUF_Simple: templates/mainassist
+-- rawoil, 2021
+
+-----------------------------
+-- Variables
+-----------------------------
+
+local A, L = ...
+
+-----------------------------
+-- CreateMainAssistStyle
+-----------------------------
+
+if not L.C.mainassist or not L.C.mainassist.enabled then return end
+
+local function CreateMainAssistStyle(self)
+  --config
+  self.cfg = L.C.mainassist
+  --settings
+  self.settings = {}
+  self.settings.template = "mainassist"
+  self.settings.setupFrame = false
+  self.settings.setupHeader = true
+  self.settings.createDrag = true
+  --style
+  L.F.CreateStyle(self)
+end
+L.F.CreateMainAssistStyle = CreateMainAssistStyle
\ No newline at end of file
diff --git a/oUF_Simple/templates/maintank.lua b/oUF_Simple/templates/maintank.lua
new file mode 100644
index 0000000..f71504e
--- /dev/null
+++ b/oUF_Simple/templates/maintank.lua
@@ -0,0 +1,29 @@
+
+-- oUF_Simple: templates/maintank
+-- rawoil, 2021
+
+-----------------------------
+-- Variables
+-----------------------------
+
+local A, L = ...
+
+-----------------------------
+-- CreateRaidMainTankStyle
+-----------------------------
+
+if not L.C.maintank or not L.C.maintank.enabled then return end
+
+local function CreateMainTankStyle(self)
+  --config
+  self.cfg = L.C.maintank
+  --settings
+  self.settings = {}
+  self.settings.template = "maintank"
+  self.settings.setupFrame = false
+  self.settings.setupHeader = true
+  self.settings.createDrag = true
+  --style
+  L.F.CreateStyle(self)
+end
+L.F.CreateMainTankStyle = CreateMainTankStyle
\ No newline at end of file
diff --git a/oUF_SimpleConfig/mainassist.lua b/oUF_SimpleConfig/mainassist.lua
new file mode 100644
index 0000000..cc1cf83
--- /dev/null
+++ b/oUF_SimpleConfig/mainassist.lua
@@ -0,0 +1,71 @@
+
+-- oUF_SimpleConfig: main assist for raid
+-- rawoil, 2021
+
+-----------------------------
+-- Variables
+-----------------------------
+
+local A, L = ...
+
+-----------------------------
+-- Main Assist Config
+-----------------------------
+
+L.C.mainassist = {
+  enabled = true,
+  size = {80,20},
+  point = {"TOPLEFT", "oUF_SimpleRaidHeader2", "TOPRIGHT", 130, 0},
+  scale = 1*L.C.globalscale,
+  --healthbar
+  healthbar = {
+    --health and absorb bar cannot be disabled, they match the size of the frame
+    colorDisconnected = true,
+    colorClass = false,
+    colorReaction = false,
+    colorHealth = true,
+    colorThreat = false,
+    name = {
+      enabled = true,
+      points = {
+        {"LEFT",2,0},
+        {"RIGHT",-2,0},
+      },
+      size = 12,
+      align = "CENTER",
+      tag = "[name]",
+    },
+    debuffHighlight = true,
+  },
+  --raidmark
+  raidmark = {
+    enabled = true,
+    size = {14,14},
+    point = {"CENTER","TOP",0,0},
+  },
+  --debuff watch
+  debuffwatch = {
+    enabled = true,
+    dispellable = true,
+    filterOnly = true,
+    matchByName = false,
+    point = {"CENTER","CENTER",0,0},
+    size = 18,
+  },
+  --range alpha
+  range = {
+    enabled = true,
+    alpha = 0.3,  -- outside alpha
+  },
+  setup = {
+    template = nil,
+    visibility = "custom [group:raid] show; hide",
+    showPlayer = false,
+    showSolo = false,
+    showParty = false,
+    showRaid = true,
+    point = "TOP",
+    xOffset = 0,
+    yOffset = -5,
+  },
+}
\ No newline at end of file
diff --git a/oUF_SimpleConfig/maintank.lua b/oUF_SimpleConfig/maintank.lua
new file mode 100644
index 0000000..40ca704
--- /dev/null
+++ b/oUF_SimpleConfig/maintank.lua
@@ -0,0 +1,71 @@
+
+-- oUF_SimpleConfig: main tank for raid
+-- rawoil, 2021
+
+-----------------------------
+-- Variables
+-----------------------------
+
+local A, L = ...
+
+-----------------------------
+-- Main Tank Config
+-----------------------------
+
+L.C.maintank = {
+  enabled = true,
+  size = {80,20},
+  point = {"TOPLEFT", "oUF_SimpleRaidHeader1", "TOPRIGHT", 130, 0},
+  scale = 1*L.C.globalscale,
+  --healthbar
+  healthbar = {
+    --health and absorb bar cannot be disabled, they match the size of the frame
+    colorDisconnected = true,
+    colorClass = false,
+    colorReaction = false,
+    colorHealth = true,
+    colorThreat = false,
+    name = {
+      enabled = true,
+      points = {
+        {"LEFT",2,0},
+        {"RIGHT",-2,0},
+      },
+      size = 12,
+      align = "CENTER",
+      tag = "[name]",
+    },
+    debuffHighlight = true,
+  },
+  --raidmark
+  raidmark = {
+    enabled = true,
+    size = {14,14},
+    point = {"CENTER","TOP",0,0},
+  },
+  --debuff watch
+  debuffwatch = {
+    enabled = true,
+    dispellable = true,
+    filterOnly = true,
+    matchByName = false,
+    point = {"CENTER","CENTER",0,0},
+    size = 18,
+  },
+  --range alpha
+  range = {
+    enabled = true,
+    alpha = 0.3,  -- outside alpha
+  },
+  setup = {
+    template = nil,
+    visibility = "custom [group:raid] show; hide",
+    showPlayer = false,
+    showSolo = false,
+    showParty = false,
+    showRaid = true,
+    point = "TOP",
+    xOffset = 0,
+    yOffset = -5,
+  },
+}
\ No newline at end of file
diff --git a/oUF_SimpleConfig/oUF_SimpleConfig.toc b/oUF_SimpleConfig/oUF_SimpleConfig.toc
index 0dc501d..f53ebd7 100644
--- a/oUF_SimpleConfig/oUF_SimpleConfig.toc
+++ b/oUF_SimpleConfig/oUF_SimpleConfig.toc
@@ -18,4 +18,6 @@ boss.lua
 arena.lua
 nameplate.lua
 raid.lua
+maintank.lua
+mainassist.lua
 debuffs.lua
\ No newline at end of file
diff --git a/oUF_SimpleConfig/raid.lua b/oUF_SimpleConfig/raid.lua
index f5acb52..66672a6 100644
--- a/oUF_SimpleConfig/raid.lua
+++ b/oUF_SimpleConfig/raid.lua
@@ -84,16 +84,6 @@ L.C.raid = {
     enabled = true,
     alpha = 0.3,  -- outside alpha
   },
-  --main tank
-  tank = {
-    enabled = false,
-    point = {"TOPLEFT", "oUF_SimpleRaidHeader2", "TOPRIGHT", 10, 0}
-  },
-  --main assist
-  assist = {
-    enabled = false,
-    point = {"TOPLEFT", "oUF_SimpleRaidHeader3", "TOPRIGHT", 10, 0}
-  },
   setup = {
     template = nil,
     visibility = "custom [group:raid] show; hide",
diff --git a/rFilter_Zork/classes/hunter.lua b/rFilter_Zork/classes/hunter.lua
index d2efca6..5764436 100644
--- a/rFilter_Zork/classes/hunter.lua
+++ b/rFilter_Zork/classes/hunter.lua
@@ -24,41 +24,45 @@ local A, L = ...
 -- spec with ur own
 ----------------------------
 if L.C.playerClass == "HUNTER" then
-  -- 杀戮命令, row 1 col 1
-  -- rFilter:CreateDebuff(13554,"target",36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",8,0},"show",{0,1},true,"player")
-  rFilter:CreateCooldown(34026,36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",8,0},"[combat]show;hide",{0.2,1},true)
+  -- 狂野, row 1 col 1
+  rFilter:CreateBuff(34471,"player",36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",8,0},"show",{0,1},true,nil)
+  rFilter:CreateCooldown(19574,36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",8,0},"[combat]show;hide",{0.2,1},true)
   -- 急速射击, row 1 col 2
   rFilter:CreateBuff(3045,"player",36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",50,0},"show",{0,1},true,nil)
   rFilter:CreateCooldown(3045,36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",50,0},"[combat]show;hide",{0.2,1},true)
-  -- 冰冻陷阱, row 1 col 3
-  rFilter:CreateDebuff(14309,"target",36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",92,0},"show",{0,1},true,nil)
-  rFilter:CreateCooldown(14311,36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",92,0},"[combat]show;hide",{0.2,1},true)
-  -- 震荡射击, row 1 col 4
-  rFilter:CreateDebuff(5116,"target",36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",134,0},"show",{0,1},true,nil)
-  rFilter:CreateCooldown(5116,36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",134,0},"[combat]show;hide",{0.2,1},true)
+  -- 杀戮命令, row 1 col 3
+  rFilter:CreateCooldown(34026,36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",92,0},"[combat]show;hide",{0.2,1},true)
+  -- 多重射击, row 1 col 4
+  rFilter:CreateCooldown(27021,36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",134,0},"[combat]show;hide",{0.2,1},true)
   -- 奥射, row 1 col 5 315496 212283
-  -- rFilter:CreateBuff(212283,"player",36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",176,0},"show",{0,1},true,nil)
   rFilter:CreateCooldown(14286,36,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",176,0},"[combat]show;hide",{0.2,1},true)

-  -- 多重射击, row 2 col 1
-  -- rFilter:CreateBuff(35099,"player",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",8,-42},"show",{0,1},true,nil)
-  rFilter:CreateCooldown(27021,24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",8,-42},"[combat]show;hide",{0.2,1},true)
-  -- mislead, row 2 col 2
+  -- 震荡射击, row 2 col 1
+  rFilter:CreateDebuff(5116,"target",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",8,-42},"show",{0,1},true,nil)
+  rFilter:CreateCooldown(5116,24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",8,-42},"[combat]show;hide",{0.2,1},true)
+  -- 误导, row 2 col 2
   rFilter:CreateBuff(34477,"player",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",38,-42},"show",{0,1},true,nil)
   rFilter:CreateCooldown(34477,24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",38,-42},"[combat]show;hide",{0.2,1},true)
   -- 假死, row 2 col 3
   rFilter:CreateBuff(5384,"player",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",68,-42},"show",{0,1},true,nil)
   rFilter:CreateCooldown(5384,24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",68,-42},"[combat]show;hide",{0.2,1},true)
-  -- 狂野, row 2 col 4
-  rFilter:CreateBuff(34471,"player",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",98,-42},"show",{0,1},true,nil)
-  rFilter:CreateCooldown(19574,24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",98,-42},"[combat]show;hide",{0.2,1},true)
+  -- 冰冻陷阱, row 2 col 4
+  rFilter:CreateDebuff(14309,"target",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",98,-42},"show",{0,1},true,nil)
+  rFilter:CreateCooldown(14311,24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",98,-42},"[combat]show;hide",{0.2,1},true)
   -- 毒蛇钉刺, row 2 col 5
   rFilter:CreateDebuff(13554,"target",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",128,-42},"show",{0,1},true,"player")
-  -- rFilter:CreateCooldown(13554,24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",128,-42},"[combat]show;hide",{0.2,1},true)
   -- 瞄准射击, row 2 col 6
   rFilter:CreateDebuff(20904,"target",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",158,-42},"show",{0,1},true,"player")
   rFilter:CreateCooldown(20904,24,{"TOPLEFT",oUF_SimplePlayer, "TOPRIGHT",158,-42},"[combat]show;hide",{0.2,1},true)
   -- 胁迫, row 2 col 7
   rFilter:CreateDebuff(19577,"target",24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",188,-42},"show",{0,1},true,nil)
   rFilter:CreateCooldown(19577,24,{"TOPLEFT",oUF_SimplePlayer,"TOPRIGHT",188,-42},"[combat]show;hide",{0.2,1},true)
+
+  -- extra target
+  -- 快速射击
+  rFilter:CreateBuff(6150,"player",24,{"BOTTOMLEFT",oUF_SimpleTarget,"TOPLEFT",0,40},"show",{0,1},true,nil)
+  -- 凶猛灵感
+  rFilter:CreateBuff(34456,"player",24,{"BOTTOMLEFT",oUF_SimpleTarget,"TOPLEFT",30,40},"show",{0,1},true,nil)
+  -- 龙脊
+  rFilter:CreateBuff(34775,"player",24,{"BOTTOMLEFT",oUF_SimpleTarget,"TOPLEFT",60,40},"show",{0,1},true,nil)
 end