37 lines
1.7 KiB
Lua
37 lines
1.7 KiB
Lua
-- Blackwing Alchemist (Octo BigWigs Raids/BWL/Alchemists.lua), Turtle trash, native server events.
|
|
-- Alchemist's Fire 36734-36737 (spell_template). Octo-only spawn (not on the local server).
|
|
local L = {
|
|
msg_fire = "Get out of the raid! - Alchemist's Fire", msg_fireOther = "Alchemist's Fire on %s",
|
|
bar_fire = "Alchemist's Fire", say_fire = "Don't be near me - Alchemist's Fire!",
|
|
}
|
|
local FIRE_SECONDS, ICON = 8, "INV_Potion_33"
|
|
local MARKS = {6, 5, 4, 3, 2, 1} -- Skull and Cross stay on the kill targets.
|
|
|
|
local m = OctoBossMods:NewModule("Blackwing Alchemist", {npcs = {51233}, displayName = "Blackwing Alchemist",
|
|
zone = "Blackwing Lair", trash = true})
|
|
|
|
function m:OnEngage() self.nextMark = 1 self.marked = {} end
|
|
function m:Fire(_, _, dstGUID, dstName)
|
|
if not dstName or not self:Throttle("fire" .. dstName, 2) then return end
|
|
if dstGUID == UnitGUID("player") then
|
|
self:Message(L.msg_fire, "Important", true, "RunAway")
|
|
self:Bar(L.bar_fire, FIRE_SECONDS, ICON, true, "Red")
|
|
SendChatMessage(L.say_fire, "SAY")
|
|
else
|
|
self:Message(format(L.msg_fireOther, dstName), "Urgent")
|
|
end
|
|
local mark = MARKS[self.nextMark]
|
|
self.nextMark = self.nextMark % #MARKS + 1
|
|
self.marked[dstName] = true
|
|
self:SetRaidTargetForPlayer(dstName, mark)
|
|
end
|
|
function m:FireFade(_, _, _, dstName)
|
|
if not dstName or not self.marked[dstName] then return end
|
|
self.marked[dstName] = nil
|
|
self:RestorePreviousRaidTargetForPlayer(dstName)
|
|
end
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[36734] = "Fire", [36735] = "Fire", [36736] = "Fire", [36737] = "Fire"},
|
|
SPELL_AURA_REMOVED = {[36734] = "FireFade", [36735] = "FireFade", [36736] = "FireFade", [36737] = "FireFade"},
|
|
}
|