Skip to content

Commit 2546a01

Browse files
committed
revert(loottracker): Reverted ItemContainerChanged changes
1 parent 0208195 commit 2546a01

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,29 +1221,12 @@ public void onItemContainerChanged(ItemContainerChanged event)
12211221

12221222
log.debug("Inv change: {} Ground items: {}", items, groundItems);
12231223

1224-
final Set<Integer> removedItemIDs = diffr.entrySet().stream().map(Multiset.Entry::getElement).collect(Collectors.toSet());
1225-
final Set<Integer> currentInventoryItemIDs = currentInventory.entrySet().stream().map(Multiset.Entry::getElement).collect(Collectors.toSet());
1226-
// Determines whether to ignore #resetEvent or not due to the game possibly continuing to modify the players inventory without any interaction
1227-
// An example of this would be searching bird nests, as after searching one nest, the game will continue to search the rest of the nests in the inventory until interrupted
1228-
boolean ignoreReset = false;
1229-
if (removedItemIDs.stream().anyMatch(BIRDNEST_IDS::contains))
1230-
{
1231-
onInvChange(collectInvItems(LootRecordType.EVENT, BIRDNEST_EVENT));
1232-
if (currentInventoryItemIDs.stream().anyMatch(BIRDNEST_IDS::contains))
1233-
{
1234-
ignoreReset = true;
1235-
}
1236-
}
1237-
12381224
if (inventorySnapshotCb != null)
12391225
{
12401226
inventorySnapshotCb.accept(items, groundItems, diffr);
12411227
}
12421228

1243-
if (!ignoreReset)
1244-
{
1245-
resetEvent();
1246-
}
1229+
resetEvent();
12471230
}
12481231

12491232
@Subscribe

0 commit comments

Comments
 (0)