Originally Posted by Janede
Code:
return "|cff%02x%02x%02x%.0f%%|r" or "",r,g,b,100*cur/max;
|
Since you split out the special handling for max HP, the highlighted section is no longer necessary.
The reason it was there in the first place was taking advantage of Lua's behavior of its logic operators to create an inline conditional statement. With the condition removed, the false-side return is just extra baggage.
Note: If you want to try this for yourself later, keep in mind the true-side return has to result in a true evaluation as well, or it'll fall through and give the false-side return instead.