Lumbridge npcs have some bad compositions and return null in the dev tools.

This commit is contained in:
Levi Schuck
2018-04-08 15:05:45 -05:00
committed by Adam
parent fed264989f
commit d184a908f7

View File

@@ -154,22 +154,28 @@ public class DevToolsOverlay extends Overlay
for (NPC npc : npcs) for (NPC npc : npcs)
{ {
NPCComposition composition = npc.getComposition(); NPCComposition composition = npc.getComposition();
Color color = composition.getCombatLevel() > 1 ? YELLOW : ORANGE;
if (composition.getConfigs() != null) if (composition.getConfigs() != null)
{ {
composition = composition.transform(); NPCComposition transformedComposition = composition.transform();
} if (transformedComposition == null)
String text = composition.getName() + " (ID: " + composition.getId() + ") (A: " + npc.getAnimation()
+ ") (G: " + npc.getGraphic() + ")";
if (npc.getCombatLevel() > 1)
{ {
OverlayUtil.renderActorOverlay(graphics, npc, text, YELLOW); color = GRAY;
} }
else else
{ {
OverlayUtil.renderActorOverlay(graphics, npc, text, ORANGE); composition = transformedComposition;
} }
} }
String text = String.format("%s (ID: %d) (A: %d) (G: %d)",
composition.getName(),
composition.getId(),
npc.getAnimation(),
npc.getGraphic());
OverlayUtil.renderActorOverlay(graphics, npc, text, color);
}
} }
private void renderTileObjects(Graphics2D graphics) private void renderTileObjects(Graphics2D graphics)