37 lines
2.0 KiB
Lua
37 lines
2.0 KiB
Lua
-- Gri'lek (Octo BigWigs Raids/ZG/Grilek.lua), native server events.
|
|
-- boss_grilek.cpp: Avatar 24646, Ground Tremor 6524. Octo's extra Gri'lek abilities (stun, roots, sweeping strikes) are
|
|
-- Octo-server additions without known spell IDs here; they are not ported until their IDs are confirmed.
|
|
local GRILEK = 15082
|
|
local L = {bar_avatarCd = "Avatar CD", bar_avatarDur = "Avatar!", msg_avatar = "Avatar - Run away from the boss!",
|
|
bar_groundTremorCd = "Ground Tremor CD", bar_groundTremorDur = "Ground Tremor Stun"}
|
|
local timer = {firstAvatar = 25, avatarCd = 10, avatarDur = 15, firstGroundTremor = 18, groundTremorCd = 18, groundTremorDur = 2}
|
|
local icon = {avatar = "Ability_Creature_Cursed_05", groundTremor = "spell_nature_earthquake"}
|
|
local m = OctoBossMods:NewModule("Gri'lek", {npcs = {GRILEK}, displayName = "Gri'lek", zone = "Zul'Gurub"})
|
|
function m:OnEngage()
|
|
self:Bar(L.bar_avatarCd, timer.firstAvatar, icon.avatar, true, "White")
|
|
self:Bar(L.bar_groundTremorCd, timer.firstGroundTremor, icon.groundTremor, true, "Black")
|
|
end
|
|
function m:Avatar(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= GRILEK then return end
|
|
self:RemoveBar(L.bar_avatarCd)
|
|
self:Bar(L.bar_avatarDur, timer.avatarDur, icon.avatar, true, "Cyan")
|
|
self:Message(L.msg_avatar, "Urgent", false, "RunAway")
|
|
self:WarningSign(icon.avatar, 1)
|
|
end
|
|
function m:AvatarOver(_, _, dstGUID)
|
|
if OctoBossMods.NpcId(dstGUID) ~= GRILEK then return end
|
|
self:RemoveBar(L.bar_avatarDur)
|
|
self:Bar(L.bar_avatarCd, timer.avatarCd, icon.avatar, true, "White")
|
|
end
|
|
function m:GroundTremor()
|
|
if not self:Throttle("tremor", 5) then return end
|
|
self:RemoveBar(L.bar_groundTremorCd)
|
|
self:Bar(L.bar_groundTremorDur, timer.groundTremorDur, icon.groundTremor, true, "Black")
|
|
self:DelayedBar(timer.groundTremorDur, L.bar_groundTremorCd, timer.groundTremorCd - timer.groundTremorDur, icon.groundTremor, true, "Black")
|
|
end
|
|
m.events = {
|
|
SPELL_AURA_APPLIED = {[24646] = "Avatar"},
|
|
SPELL_AURA_REMOVED = {[24646] = "AvatarOver"},
|
|
SPELL_CAST_SUCCESS = {[6524] = "GroundTremor"},
|
|
}
|