56 lines
2.7 KiB
Lua
56 lines
2.7 KiB
Lua
-- Jin'do the Hexxer (Octo BigWigs Raids/ZG/Jindo.lua), native server events.
|
|
-- boss_jindo.cpp: Hex 17172, Delusions of Jin'do 24306 (20 s curse; see the Shades), Brain Wash Totem 24262,
|
|
-- Powerful Healing Ward 24309. A curse that ends early was decursed. Octo's shade auto-targeting needs protected
|
|
-- targeting and is not ported.
|
|
local L = {
|
|
trigger_engage = "Welcome to the great show, friends. Step right up to die!",
|
|
bar_hex = " Hexxed", msg_hex = " is Hexxed - Dispel!", msg_curseYou = "You are cursed! Kill the Shades!",
|
|
bar_curse = " Cursed", msg_curseDispel = "Delusions of Jin'do was decursed!",
|
|
msg_brainWash = "Brain Wash Totem!", msg_healingWard = "Healing Totem!",
|
|
}
|
|
local timer = {hexDuration = 5, curseDuration = 20}
|
|
local icon = {hex = "Spell_Nature_Polymorph", curse = "Spell_Shadow_UnholyFrenzy", brainWash = "Spell_Totem_WardOfDraining",
|
|
healingWard = "Spell_Holy_LayOnHands"}
|
|
local m = OctoBossMods:NewModule("Jin'do the Hexxer", {npcs = {11380}, displayName = "Jin'do the Hexxer", zone = "Zul'Gurub",
|
|
engageYells = {L.trigger_engage}})
|
|
local function dispeller() local _, c = UnitClass("player") return c == "PRIEST" or c == "PALADIN" end
|
|
function m:OnEngage() self.cursed = {} end
|
|
function m:Curse(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
self.cursed[dstName] = GetTime()
|
|
self:Bar(dstName .. L.bar_curse, timer.curseDuration, icon.curse, true, "Blue")
|
|
if dstGUID == UnitGUID("player") then
|
|
self:WarningSign(icon.curse, 1)
|
|
self:Message(L.msg_curseYou, "Personal", false, "Beware")
|
|
end
|
|
end
|
|
function m:CurseFade(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(dstName .. L.bar_curse)
|
|
local t = self.cursed[dstName]
|
|
self.cursed[dstName] = nil
|
|
if t and GetTime() - t < timer.curseDuration - 1 then self:Message(L.msg_curseDispel, "Urgent") end
|
|
end
|
|
function m:Hex(_, _, _, dstName)
|
|
if not dstName then return end
|
|
self:Bar(dstName .. L.bar_hex, timer.hexDuration, icon.hex, true, "Green")
|
|
if dispeller() then
|
|
self:Message(dstName .. L.msg_hex, "Important", false, "Info")
|
|
self:WarningSign(icon.hex, 0.7)
|
|
end
|
|
end
|
|
function m:HexFade(_, _, _, dstName) if dstName then self:RemoveBar(dstName .. L.bar_hex) end end
|
|
function m:BrainWash()
|
|
self:WarningSign(icon.brainWash, 0.7)
|
|
self:Message(L.msg_brainWash, "Attention", false, "Alarm")
|
|
end
|
|
function m:HealingWard()
|
|
self:WarningSign(icon.healingWard, 0.7)
|
|
self:Message(L.msg_healingWard, "Attention")
|
|
end
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[24306] = "Curse", [17172] = "Hex"},
|
|
SPELL_AURA_REMOVED = {[24306] = "CurseFade", [17172] = "HexFade"},
|
|
SPELL_CAST_SUCCESS = {[24262] = "BrainWash", [24309] = "HealingWard"},
|
|
}
|