Changing logic into nested ifs seems to reduce the number of checks and allows to eliminate isMaxLevel:
Lua Code:
if isMaxLevel then
if E.db.PCB.experienceBar.capped then
bar.text:Settext(L["capped"])
end
elseif E.db.PCB.experienceBar.progress then
--draw
...
end
Also, in line 10 setting the last 0 to, for example, 1 would allow in line 11 to delete "or 0".