Files
2026-11-23 03:28:32 +02:00

85 lines
4.9 KiB
Lua

-- High Priestess Arlokk (Octo BigWigs Raids/ZG/Arlokk.lua), native server events.
-- boss_arlokk.cpp: Mark of Arlokk 24210, Shadow Word: Pain 24212, Gouge 12540, Ravage 24213, Whirlwind 15589,
-- Panther Transform 24190 (panther phase, from the server aura). Her vanish is server visibility off, read from this
-- client's own raid targets like Renataki's.
local ARLOKK = 14515
local L = {
trigger_engage = "Bethekk, your priestess calls upon your might!",
msg_trollPhase = "Troll Phase - Casting Gouge and Shadow Word: Pain", msg_pantherPhase = "Panther Phase - +35% damage - Casting Backstab and Ravage",
msg_vanishPhase = "Vanish Phase - Casting Mark of Arlokk", bar_return = "Re-Appear CD", bar_returnSoon = "Re-Appear Soon...",
bar_nextVanish = "Next Vanish", msg_mark = " is Marked!", bar_mark = " Marked", bar_ww = "Whirlwind CD",
bar_ravage = " Ravage Stun", bar_gouge = " Gouged", bar_swp = " Shadow Word: Pain", msg_swp = " Shadow Word: Pain - Dispel!",
}
local timer = {firstVanish = 35, vanish = 75, unvanish = 35, unvanishSoon = 15, mark = 120, ww = 16, ravage = 2, gouge = 4, swp = 18}
local icon = {vanish = "Ability_Vanish", mark = "Ability_Hunter_Snipershot", ww = "Ability_Whirlwind", ravage = "spell_frost_stun",
gouge = "ability_gouge", swp = "spell_shadow_shadowwordpain"}
local m = OctoBossMods:NewModule("High Priestess Arlokk", {npcs = {ARLOKK}, displayName = "High Priestess Arlokk", zone = "Zul'Gurub",
engageYells = {L.trigger_engage}})
local function visible()
for _, unit in ipairs({"target", "focus", "mouseover", "targettarget"}) do
if OctoBossMods.NpcId(UnitGUID(unit)) == ARLOKK then return true end
end
local n = IsInRaid() and GetNumGroupMembers() or 0
for i = 1, n do if OctoBossMods.NpcId(UnitGUID("raid" .. i .. "target")) == ARLOKK then return true end end
return false
end
local function dispeller() local _, c = UnitClass("player") return c == "PRIEST" or c == "PALADIN" end
function m:OnEngage()
self.vanished, self.wasSeen = false, visible()
self:Bar(L.bar_nextVanish, timer.firstVanish, icon.vanish, true, "White")
self:Message(L.msg_trollPhase, "Important")
self:ScheduleRepeatingEvent("vanish", function() self:Watch() end, 0.5)
end
function m:Watch()
local v = visible()
if v then self.wasSeen = true end
if self.wasSeen and not v and not self.vanished then
self.vanished = true
self:RemoveBar(L.bar_nextVanish)
self:RemoveBar(L.bar_ww)
self:Message(L.msg_vanishPhase, "Attention")
self:Bar(L.bar_return, timer.unvanish, icon.vanish, true, "White")
self:DelayedBar(timer.unvanish, L.bar_returnSoon, timer.unvanishSoon, icon.vanish, true, "White")
elseif v and self.vanished then
self.vanished = false
self:RemoveBar(L.bar_return)
self:CancelDelayedBar(L.bar_returnSoon)
self:RemoveBar(L.bar_returnSoon)
end
end
function m:PantherPhase(_, _, dstGUID)
if OctoBossMods.NpcId(dstGUID) ~= ARLOKK or not self:Throttle("panther", 10) then return end
self.vanished = false
self:RemoveBar(L.bar_return)
self:CancelDelayedBar(L.bar_returnSoon)
self:RemoveBar(L.bar_returnSoon)
self:Bar(L.bar_nextVanish, timer.vanish, icon.vanish, true, "White")
self:Message(L.msg_pantherPhase, "Attention")
end
function m:Mark(_, _, _, dstName)
if not dstName then return end
self:Message(dstName .. L.msg_mark, "Attention")
self:Bar(dstName .. L.bar_mark, timer.mark, icon.mark, true, "Green")
end
function m:MarkFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_mark) end end
function m:Whirlwind() if self:Throttle("ww", 5) then self:Bar(L.bar_ww, timer.ww, icon.ww, true, "Blue") end end
local function debuffBar(self, dstName, suffix, seconds, ic, col) if dstName then self:Bar(dstName .. suffix, seconds, ic, true, col) end end
function m:Ravage(_, _, _, dstName) debuffBar(self, dstName, L.bar_ravage, timer.ravage, icon.ravage, "Black") end
function m:RavageFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_ravage) end end
function m:Gouge(_, _, _, dstName) debuffBar(self, dstName, L.bar_gouge, timer.gouge, icon.gouge, "Red") end
function m:GougeFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_gouge) end end
function m:Swp(_, _, _, dstName)
if not dstName then return end
self:Bar(dstName .. L.bar_swp, timer.swp, icon.swp, true, "Magenta")
if dispeller() then
self:Message(dstName .. L.msg_swp, "Personal", false, "Info")
self:WarningSign(icon.swp, 0.7)
end
end
function m:SwpFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_swp) end end
m.events = {
SPELL_AURA_APPLIED = {[24190] = "PantherPhase", [24210] = "Mark", [24213] = "Ravage", [12540] = "Gouge", [24212] = "Swp"},
SPELL_AURA_REMOVED = {[24210] = "MarkFade", [24213] = "RavageFade", [12540] = "GougeFade", [24212] = "SwpFade"},
SPELL_CAST_SUCCESS = {[15589] = "Whirlwind", [24190] = "PantherPhase"},
}