xpdrops: reset xpdrop color on wrong prayer

This commit is contained in:
Adam
2020-07-10 00:07:46 -04:00
parent 8464d9b604
commit 623de63269

View File

@@ -115,7 +115,7 @@ public class XpDropPlugin extends Plugin
.skip(1) // skip text .skip(1) // skip text
.mapToInt(Widget::getSpriteId); .mapToInt(Widget::getSpriteId);
int color = text.getTextColor(); int color = -1;
switch (prayer) switch (prayer)
{ {
@@ -143,7 +143,14 @@ public class XpDropPlugin extends Plugin
break; break;
} }
text.setTextColor(color); if (color != -1)
{
text.setTextColor(color);
}
else
{
resetTextColor(text);
}
} }
private void resetTextColor(Widget widget) private void resetTextColor(Widget widget)