Fix Default Icon Logic in DBC Addon to work with Layering System of CNPC+

This commit is contained in:
Kam committed 2026-02-28 17:05:54 -05:00
1 parent 8056640102
commit f71694e210
2 files changed
+21 -6

No files matched your search

@@ -107,8 +107,9 @@ public class AbilityIcon extends Gui {
} else if (hasDefaultLayers()) {
// Path 2: Default layers — draw each layer with its dynamic color
for (Ability.DefaultIconLayer defLayer : defaultLayers) {
if (defLayer.texture == null || defLayer.texture.isEmpty()) continue;
ImageData imageData = ClientCacheHandler.getImageData(defLayer.texture);
String texPath = defLayer.getTextureForState(state);
if (texPath == null || texPath.isEmpty()) continue;
ImageData imageData = ClientCacheHandler.getImageData(texPath);
if (imageData != null && imageData.imageLoaded()) {
int color = defLayer.getColor();
float r = ((color >> 16) & 0xFF) / 255f;