xpdrops: fix recoloring xpdrops with hide skill icons on

The widget child array is filled with nulls to hide the sprites. It is also
valid for the child array to have null entries in it in general, but that does
not happen otherwise.
This commit is contained in:
Adam
2020-07-17 21:17:39 -04:00
parent 7f354ca5e4
commit abbff79294

View File

@@ -28,6 +28,7 @@ import com.google.inject.Provides;
import java.util.Arrays;
import java.util.EnumMap;
import java.util.Map;
import java.util.Objects;
import java.util.stream.IntStream;
import javax.inject.Inject;
import net.runelite.api.Client;
@@ -112,6 +113,7 @@ public class XpDropPlugin extends Plugin
final IntStream spriteIDs =
Arrays.stream(children)
.skip(1) // skip text
.filter(Objects::nonNull)
.mapToInt(Widget::getSpriteId);
int color = 0;