Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow filtering ba gambles from loot notifier #657

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Unreleased

- Minor: Allow excluding Barbarian Assault high gambles from loot notifications to avoid duplication with the gambles notifier. (#657)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to condense if too verbose

- Minor: Treat `SPAM` messages as matchable game messages for the chat notifier. (#653)

## 1.10.21
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/dinkplugin/DinkPluginConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,17 @@ default boolean lootIncludeClueScrolls() {
return true;
}

@ConfigItem(
keyName = "lootIncludeGambles",
name = "Include BA Gambles",
description = "Allow notifications for barbarian assault high gambles",
position = 36,
section = lootSection
)
default boolean lootIncludeGambles() {
return false;
}

@ConfigItem(
keyName = "lootItemAllowlist",
name = "Item Allowlist",
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/dinkplugin/notifiers/LootNotifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ public void onLootReceived(LootReceived lootReceived) {

// only consider non-NPC and non-PK loot
if (lootReceived.getType() == LootRecordType.EVENT || lootReceived.getType() == LootRecordType.PICKPOCKET) {
if ("Barbarian Assault high gamble".equals(lootReceived.getName()) && !config.lootIncludeGambles()) {
// skip ba gambles, depending on config (since we have GambleNotifier)
return;
}

if (!config.lootIncludeClueScrolls() && StringUtils.startsWithIgnoreCase(lootReceived.getName(), "Clue Scroll")) {
// skip clue scroll loot, depending on config
return;
Expand Down
Loading