object indicators: don't mark unnamed objects
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.objectindicators;
|
package net.runelite.client.plugins.objectindicators;
|
||||||
|
|
||||||
|
import com.google.common.base.Strings;
|
||||||
import java.awt.BasicStroke;
|
import java.awt.BasicStroke;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
@@ -85,7 +86,10 @@ class ObjectIndicatorsOverlay extends Overlay
|
|||||||
// This is a multiloc
|
// This is a multiloc
|
||||||
composition = composition.getImpostor();
|
composition = composition.getImpostor();
|
||||||
// Only mark the object if the name still matches
|
// Only mark the object if the name still matches
|
||||||
if (composition == null || !composition.getName().equals(colorTileObject.getName()))
|
if (composition == null
|
||||||
|
|| Strings.isNullOrEmpty(composition.getName())
|
||||||
|
|| "null".equals(composition.getName())
|
||||||
|
|| !composition.getName().equals(colorTileObject.getName()))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,6 +288,18 @@ public class ObjectIndicatorsPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ObjectComposition objectComposition = client.getObjectDefinition(object.getId());
|
||||||
|
if (objectComposition.getImpostorIds() == null)
|
||||||
|
{
|
||||||
|
// Multiloc names are instead checked in the overlay
|
||||||
|
String name = objectComposition.getName();
|
||||||
|
if (Strings.isNullOrEmpty(name) || name.equals("null"))
|
||||||
|
{
|
||||||
|
// was marked, but name has changed
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (ObjectPoint objectPoint : objectPoints)
|
for (ObjectPoint objectPoint : objectPoints)
|
||||||
{
|
{
|
||||||
if (worldPoint.getRegionX() == objectPoint.getRegionX()
|
if (worldPoint.getRegionX() == objectPoint.getRegionX()
|
||||||
@@ -297,7 +309,7 @@ public class ObjectIndicatorsPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
log.debug("Marking object {} due to matching {}", object, objectPoint);
|
log.debug("Marking object {} due to matching {}", object, objectPoint);
|
||||||
objects.add(new ColorTileObject(object,
|
objects.add(new ColorTileObject(object,
|
||||||
client.getObjectDefinition(object.getId()),
|
objectComposition,
|
||||||
objectPoint.getName(),
|
objectPoint.getName(),
|
||||||
objectPoint.getColor()));
|
objectPoint.getColor()));
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user