Originally Posted by
SilenceDK
1. There really aren't any unnecessary lines of code
2. WeakAuras has been including the 'return' in its default when you select custom for a color function of late. But you can use closures in Lua that return functions, so it's not like it's completely against the rules.
3. He doesn't need those values because the deterministic aspect of the function is based solely around UnitPower(). He probably just forgot to delete r1,g1,etc from the WeakAuras template.
1. if you consider double checking as usefull you are right.
2.its not agains the rules but you will never use it like this
Code:
return function()
--code
end
if you do smth like this it looks like that:
Code:
function abc(a)
return function()
end
end
3. its fine to use hard coded colors. i just dont like it to define things and dont use them.