82 lines
4.5 KiB
Lua
82 lines
4.5 KiB
Lua
-- Bloodlord Mandokir (Octo BigWigs Raids/ZG/Mandokir.lua), native server events.
|
|
-- boss_mandokir.cpp: Threatening Gaze/Watch 24314 (aura names the watched player), Charge 24408, Whirlwind 13736,
|
|
-- Enrage 24318 (Ohgan 14988 died), Level Up 24312, Ohgan's Sunder Armor 24317 stacks. Octo's "stop your actions"
|
|
-- option calls protected functions and is not ported; the gaze warning stays.
|
|
local MANDOKIR, OHGAN = 11382, 14988
|
|
local L = {
|
|
trigger_engage = "I'll feed your souls to Hakkar himself!",
|
|
bar_gazeCd = "Threatening Gaze CD", bar_gazeDur = " Gaze!", msg_gaze = "Threatening Gaze - Stop all Actions ",
|
|
bar_whirlwindCd = "Whirlwind CD", bar_whirlwindCast = "Casting Whirlwind!", bar_chargeCd = "Charge CD",
|
|
bar_enrage = "Enrage", msg_enrage = "You killed Ohgan - Mandokir is Enraged!", msg_enrageFade = "Mandokir is no longer Enraged!",
|
|
bar_sunder = " Sunders", msg_sunderHigh = " Sunder Stacks - Seek Replacement!",
|
|
msg_levelUp = "Mandokir Leveled Up by killing someone - He is now Level ",
|
|
}
|
|
local timer = {gazeFirstCd = 33, gazeCd = 12, gazeDur = 8, whirlwindFirstCd = 20, whirlwindCast = 2, whirlwindCd = 18,
|
|
chargeFirstCd = 15.8, chargeCd = {30, 35}, enrage = 90, sunder = 20}
|
|
local icon = {gaze = "Spell_Shadow_Charm", whirlwind = "Ability_Whirlwind", charge = "Ability_Warrior_Charge",
|
|
enrage = "Spell_Shadow_UnholyFrenzy", sunder = "ability_warrior_sunder"}
|
|
local m = OctoBossMods:NewModule("Bloodlord Mandokir", {npcs = {MANDOKIR, OHGAN}, killNpcs = {MANDOKIR},
|
|
displayName = "Bloodlord Mandokir", zone = "Zul'Gurub", engageYells = {L.trigger_engage}})
|
|
function m:OnEngage()
|
|
self.level, self.sunders = 63, {}
|
|
self:Bar(L.bar_gazeCd, timer.gazeFirstCd, icon.gaze, true, "Orange")
|
|
self:Bar(L.bar_whirlwindCd, timer.whirlwindFirstCd, icon.whirlwind, true, "Cyan")
|
|
self:Bar(L.bar_chargeCd, timer.chargeFirstCd, icon.charge, true, "White")
|
|
end
|
|
function m:Gaze(_, _, dstGUID, dstName)
|
|
if not dstName then return end
|
|
self:RemoveBar(L.bar_gazeCd)
|
|
self:Bar(dstName .. L.bar_gazeDur, timer.gazeDur, icon.gaze, true, "Red")
|
|
self:Message(L.msg_gaze .. dstName, "Urgent", false, "Beware")
|
|
if dstGUID == UnitGUID("player") then self:WarningSign(icon.gaze, timer.gazeDur) end
|
|
self:DelayedBar(timer.gazeDur, L.bar_gazeCd, timer.gazeCd, icon.gaze, true, "Orange")
|
|
end
|
|
function m:GazeFade(_, _, dstGUID, dstName)
|
|
if dstName then self:RemoveBar(dstName .. L.bar_gazeDur) end
|
|
if dstGUID == UnitGUID("player") then self:RemoveWarningSign(icon.gaze) end
|
|
end
|
|
function m:Whirlwind()
|
|
if not self:Throttle("ww", 5) then return end
|
|
self:RemoveBar(L.bar_whirlwindCd)
|
|
self:Bar(L.bar_whirlwindCast, timer.whirlwindCast, icon.whirlwind, true, "Blue")
|
|
self:DelayedBar(timer.whirlwindCast, L.bar_whirlwindCd, timer.whirlwindCd, icon.whirlwind, true, "Cyan")
|
|
end
|
|
function m:Charge()
|
|
if self:Throttle("charge", 5) then self:IntervalBar(L.bar_chargeCd, timer.chargeCd[1], timer.chargeCd[2], icon.charge, true, "White") end
|
|
end
|
|
function m:Enrage(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= MANDOKIR then return end
|
|
self:Bar(L.bar_enrage, timer.enrage, icon.enrage, true, "Green")
|
|
self:Message(L.msg_enrage, "Urgent", false, "BikeHorn")
|
|
self:WarningSign(icon.enrage, 0.7)
|
|
end
|
|
function m:EnrageFade(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= MANDOKIR then return end
|
|
self:RemoveBar(L.bar_enrage)
|
|
self:Message(L.msg_enrageFade, "Urgent")
|
|
end
|
|
function m:LevelUp(_, _, dstGUID)
|
|
if dstGUID and dstGUID ~= "" and OctoBossMods.NpcId(dstGUID) ~= MANDOKIR then return end
|
|
if not self:Throttle("level", 1) then return end
|
|
self.level = (self.level or 63) + 1
|
|
self:Message(L.msg_levelUp .. self.level, "Attention")
|
|
end
|
|
function m:Sunder(_, _, dstGUID, dstName, _, _, _, _, stacks)
|
|
if not dstName then return end
|
|
stacks = tonumber(stacks) or 1
|
|
if self.sunders[dstName] then self:RemoveBar(self.sunders[dstName]) end
|
|
self.sunders[dstName] = dstName .. " " .. stacks .. L.bar_sunder
|
|
self:Bar(self.sunders[dstName], timer.sunder, icon.sunder, true, "Black")
|
|
if dstGUID == UnitGUID("player") and stacks >= 5 then
|
|
self:WarningSign(icon.sunder, 0.7)
|
|
self:Message(stacks .. L.msg_sunderHigh, "Personal")
|
|
end
|
|
end
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[24314] = "Gaze", [24318] = "Enrage", [24317] = "Sunder"},
|
|
SPELL_AURA_APPLIED_DOSE = {[24317] = "Sunder"},
|
|
SPELL_AURA_REMOVED = {[24314] = "GazeFade", [24318] = "EnrageFade"},
|
|
SPELL_CAST_START = {[13736] = "Whirlwind"},
|
|
SPELL_CAST_SUCCESS = {[13736] = "Whirlwind", [24408] = "Charge", [24312] = "LevelUp"},
|
|
}
|