I've been using EVENT_ENLIGHTENED_STATE_GAINED to start the scrolling overlay on my own freestanding champion bar, but have had to rely on using EVENT_EXPERIENCE_GAIN or even EVENT_EXPERIENCE_UPDATE with IsEnlightenedAvailableForAccount and IsEnlightenedAvailableForCharacter to fire functions...
Something like this...
Lua Code:
function GetEnlightenedPoolAmount()
local pool = GetEnlightenedPool()
local Elabel = ZO_ChampionEnlightenedLabel
local stats = ZO_ChampionFrameStatusBar
local oldText = Elabel:GetText()
local newText
if IsEnlightenedAvailableForAccount and pool ~= 0 then
newText = pool
Elabel:SetHidden(false)
Elabel:SetText(pool)
ZO_ChampionEnlightenedLostLabel:SetText(string.format("|cFFFF00 " ..newText - oldText.." |r"))
timelineAnimation()
if IsEnlightenedAvailableForAccount and IsEnlightenedAvailableForCharacter then
stats:EnableScrollingOverlay(true)
else
stats:EndScrollOverlay()
end
end
end
EVENT_MANAGER:RegisterForEvent("ChampionBuddy", EVENT_EXPERIENCE_GAIN, GetEnlightenedPoolAmount )
Added that to some NEAT stuff Garkin helped me out with (Thank ya!) but still in beta :/ lol
Maybe it doesn't fire because you are always in a state of either being enlightened or the cooldown tic for GAINING enlightenment is currently counting down...
That's my guess
But I know that it DOES max out at 1200000, that's a lot of enlightenment!!