Respect "Only show loot" option for item notifications
Fixes #7176 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -222,9 +222,12 @@ public class GroundItemsPlugin extends Plugin
|
||||
existing.setQuantity(existing.getQuantity() + groundItem.getQuantity());
|
||||
}
|
||||
|
||||
boolean isHighlighted = config.highlightedColor().equals(getHighlighted(groundItem.getName(),
|
||||
groundItem.getGePrice(), groundItem.getHaPrice()));
|
||||
if (config.notifyHighlightedDrops() && isHighlighted)
|
||||
boolean shouldNotify = !config.onlyShowLoot() && config.highlightedColor().equals(getHighlighted(
|
||||
groundItem.getName(),
|
||||
groundItem.getGePrice(),
|
||||
groundItem.getHaPrice()));
|
||||
|
||||
if (config.notifyHighlightedDrops() && shouldNotify)
|
||||
{
|
||||
notifyHighlightedItem(groundItem);
|
||||
}
|
||||
@@ -294,6 +297,16 @@ public class GroundItemsPlugin extends Plugin
|
||||
if (groundItem != null)
|
||||
{
|
||||
groundItem.setMine(true);
|
||||
|
||||
boolean shouldNotify = config.onlyShowLoot() && config.highlightedColor().equals(getHighlighted(
|
||||
groundItem.getName(),
|
||||
groundItem.getGePrice(),
|
||||
groundItem.getHaPrice()));
|
||||
|
||||
if (config.notifyHighlightedDrops() && shouldNotify)
|
||||
{
|
||||
notifyHighlightedItem(groundItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user