Skip to content

Commit 89c31ea

Browse files
committed
fix(loottracker): Track automated bird nest searching onChatMessage (runelite#19975)
- Added support for tracking the loot received from the next searched bird nest that's automated by the game itself - Modified LootTrackerPlugin#onChatMessage to see if loot from a searched bird nest was received and call #onInvChange - The message is also fired for the automated proceeding searches by the game
1 parent 2546a01 commit 89c31ea

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,11 @@ else if (message.equals("You clean a batch of arrowtips."))
11721172
{
11731173
countChangedItems(ItemID.DIRTY_ARROWTIPS, client.getBoostedSkillLevel(Skill.FLETCHING));
11741174
}
1175+
1176+
if (message.endsWith("out of the bird's nest."))
1177+
{
1178+
onInvChange(collectInvItems(LootRecordType.EVENT, BIRDNEST_EVENT));
1179+
}
11751180
}
11761181

11771182
private void countChangedItems(int itemId, Object metadata)

runelite-client/src/test/java/net/runelite/client/plugins/loottracker/LootTrackerPluginTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ public void testWintertodtRewardCart()
585585
when(client.getLocalPlayer()).thenReturn(player);
586586
when(client.getBoostedSkillLevel(Skill.FIREMAKING)).thenReturn(99);
587587

588-
doNothing().when(lootTrackerPlugin).addLoot(any(), anyInt(), any(), any(), any(Collection.class));
588+
doNothing().when(lootTrackerPlugin).addLoot(any(), anyInt(), any(), any(), anyCollection());
589589

590590
ItemContainer itemContainer = mock(ItemContainer.class);
591591
when(itemContainer.getItems()).thenReturn(new Item[]{

0 commit comments

Comments
 (0)