I'm a total newbie in Lua Script coding... I'll try to explain what I want to achieve.
Here is my current code:
PostUpdateHealth method seems not reachable at this point. When I try to hook Update_StatusBars then it works.
Code: Select all
local E = unpack(ElvUI) -- import: Engine local UF = E.UnitFrames -- ElvUI's UnitFrames local EMOSA = E:NewModule("EMOSA") -- this AddOn function EMOSA:HealthGradient(frame, bg, text, textPos) print("YEAH !!!") end function EMOSA:Initialize() print('YEAH !!') hooksecurefunc(UF, "PostUpdateHealth", EMOSA.HealthGradient) end local function InitializeCallback() print('YEAH !') EMOSA:Initialize() end E:RegisterModule(EMOSA:GetName(), InitializeCallback)
But I want to add some gradient to my healthbar, like this one which I've made with Weakaura :
Can you just guide me for the first few steps?