mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
a3cfd711fe
The class-colour write sourced r, g, b from the health bar rather than from PFUI_CLASS_COLORS[class], which the condition tested for but never read. So "class colours on friendly names" only produced a class colour when friendclassc - a bar option - happened to be on as well; otherwise the name took the generic friendly colour. In every case it also inherited the tapped-grey and barcombatstate overrides meant for the bar, neither of which belongs on the name. The name now reads the class table directly. The discarded "and PFUI_CLASS_COLORS[class]" term was dead weight: the table carries an __index metamethod returning a grey ColorMixin for any missing key, so it was always truthy and merely allocated a throwaway table per evaluation. "and class" is the real guard. One behaviour change falls out - a friendly player of an unrecognised class now takes that grey fallback rather than the bar colour, which is what the option means. (cherry picked from commit f880dc3528db2ba0d0936b00a4dff8deec48e6d2) (cherry picked from commit 111d70004d4fb172f168aa48a4cb6177a7f0d393)