-------------------------------------------------------------------------------- -- Module declaration -- local mod, CL = BigWigs:NewBoss("Glubtok", 36, 89) if not mod then return end mod:RegisterEnableMob(47162) -------------------------------------------------------------------------------- -- Initialization -- function mod:GetOptions() return { "stages", } end function mod:OnBossEnable() self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "CheckBossStatus") self:Death("Win", 47162) end function mod:OnEngage() self:RegisterUnitEvent("UNIT_HEALTH", nil, "boss1") end -------------------------------------------------------------------------------- -- Event Handlers -- function mod:UNIT_HEALTH(event, unit) local hp = UnitHealth(unit) / UnitHealthMax(unit) * 100 if hp < 56 then self:UnregisterUnitEvent(event, unit) self:MessageOld("stages", "cyan", nil, CL.soon:format(CL.phase:format(2)), false) end end