Showing results 1 to 3 of 3
Search took 0.00 seconds.
Search: Posts Made By: SDPhantom
Forum: Classic - AddOn Help/Support 10-05-19, 02:34 PM
Replies: 8
Views: 8,027
Posted By SDPhantom
Since you split out the special handling for 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...
Forum: Classic - AddOn Help/Support 10-03-19, 02:42 PM
Replies: 8
Views: 8,027
Posted By SDPhantom
It's pure Lua code to get a UI color escape from...

It's pure Lua code to get a UI color escape from a percentage value. Works fine on the live Lua demo (https://www.lua.org/cgi-bin/demo).
I don't know anything about Pitbull4, never used it.

Edit:...
Forum: Classic - AddOn Help/Support 10-02-19, 02:34 PM
Replies: 8
Views: 8,027
Posted By SDPhantom
Here's how I usually handle the health...

Here's how I usually handle the health gradient.
("|cff%02x%02x00"):format(math.ceil(math.max(math.min(2*(1-percent),1),0)*255),math.ceil(math.max(math.min(2*percent,1),0)*255));
Note: percent is a...
Showing results 1 to 3 of 3