diff --git a/CHANGELOG.md b/CHANGELOG.md index 56816976..9f2fb641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## Unreleased - Minor: Enable the leagues notifier for Demonic Pacts. (#932, #933) -- Bugfix: Prevent double notifications to metadata webhook upon TOA Purple Loot. (#930) +- Bugfix: Prevent double notifications to metadata webhook upon TOA Purple Loot. (#930, #934) ## 1.13.2 diff --git a/src/main/java/dinkplugin/notifiers/MetaNotifier.java b/src/main/java/dinkplugin/notifiers/MetaNotifier.java index 93724f67..cf7025e7 100644 --- a/src/main/java/dinkplugin/notifiers/MetaNotifier.java +++ b/src/main/java/dinkplugin/notifiers/MetaNotifier.java @@ -34,7 +34,6 @@ import net.runelite.api.gameval.ObjectID; import net.runelite.client.callback.ClientThread; import net.runelite.client.config.ConfigManager; -import net.runelite.client.eventbus.Subscribe; import net.runelite.client.game.ItemManager; import net.runelite.client.plugins.chatcommands.ChatCommandsPlugin; import net.runelite.client.util.QuantityFormatter; @@ -104,8 +103,7 @@ public void onWallObjectSpawned(WallObjectSpawned event) { return; } - if (isToaPurple && isEnabled()) { - isToaPurple = false; + if (isEnabled()) { clientThread.invokeAtTickEnd(this::notifyPurpleAmascut); } } @@ -173,6 +171,12 @@ private void notifyGroupStorage() { } private void notifyPurpleAmascut() { + if (isToaPurple) { + isToaPurple = false; // prevent multiple notifications + } else { + return; // not notification worthy + } + // inspect multiloc to ensure local player is the recipient of the purple drop (s/o @rdutta) for (@Varbit int varbitId : TOA_CHEST_VARBS) { if (client.getVarbitValue(varbitId) == 2) {