Skip to content

Commit

Permalink
clues: add divine runepouch
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Aug 23, 2022
1 parent 00b510f commit 5ec7ad4
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ public class ClueScrollPlugin extends Plugin
private static final Color HIGHLIGHT_FILL_COLOR = new Color(0, 255, 0, 20);
private static final String CLUE_TAG_NAME = "clue";
private static final int[] RUNEPOUCH_AMOUNT_VARBITS = {
Varbits.RUNE_POUCH_AMOUNT1, Varbits.RUNE_POUCH_AMOUNT2, Varbits.RUNE_POUCH_AMOUNT3
Varbits.RUNE_POUCH_AMOUNT1, Varbits.RUNE_POUCH_AMOUNT2, Varbits.RUNE_POUCH_AMOUNT3, Varbits.RUNE_POUCH_AMOUNT4
};
private static final int[] RUNEPOUCH_RUNE_VARBITS = {
Varbits.RUNE_POUCH_RUNE1, Varbits.RUNE_POUCH_RUNE2, Varbits.RUNE_POUCH_RUNE3
Varbits.RUNE_POUCH_RUNE1, Varbits.RUNE_POUCH_RUNE2, Varbits.RUNE_POUCH_RUNE3, Varbits.RUNE_POUCH_RUNE4
};

@Getter
Expand Down Expand Up @@ -352,9 +352,10 @@ else if (event.getMenuOption().equals("Search") && clue instanceof EmoteClue)
@Subscribe
public void onItemContainerChanged(final ItemContainerChanged event)
{
final ItemContainer itemContainer = event.getItemContainer();
if (event.getContainerId() == InventoryID.EQUIPMENT.getId())
{
equippedItems = event.getItemContainer().getItems();
equippedItems = itemContainer.getItems();
return;
}

Expand All @@ -363,10 +364,11 @@ public void onItemContainerChanged(final ItemContainerChanged event)
return;
}

inventoryItems = event.getItemContainer().getItems();
inventoryItems = itemContainer.getItems();

// Add runes from rune pouch to inventoryItems
if (event.getItemContainer().contains(ItemID.RUNE_POUCH) || event.getItemContainer().contains(ItemID.RUNE_POUCH_L))
if (itemContainer.contains(ItemID.RUNE_POUCH) || itemContainer.contains(ItemID.RUNE_POUCH_L)
|| itemContainer.contains(ItemID.DIVINE_RUNE_POUCH))
{
List<Item> runePouchContents = getRunepouchContents();

Expand All @@ -393,8 +395,6 @@ public void onItemContainerChanged(final ItemContainerChanged event)
// Check if item was removed from inventory
if (clue != null && clueItemId != null)
{
ItemContainer itemContainer = event.getItemContainer();

// Check if clue was removed from inventory
if (!itemContainer.contains(clueItemId))
{
Expand All @@ -405,7 +405,7 @@ public void onItemContainerChanged(final ItemContainerChanged event)
// if three step clue check for clue scroll pieces
if (clue instanceof ThreeStepCrypticClue)
{
if (((ThreeStepCrypticClue) clue).update(event.getContainerId(), event.getItemContainer()))
if (((ThreeStepCrypticClue) clue).update(event.getContainerId(), itemContainer))
{
worldMapPointsSet = false;
npcsToMark.clear();
Expand Down

0 comments on commit 5ec7ad4

Please sign in to comment.