Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Suppliestracker: Fixes Ancient magic rune check and individual item price in tooltip. #2111

Merged
merged 3 commits into from
Dec 11, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ public final class AnimationID

// Combat counter
public static final int BARRAGE_ANIMATION = 1979;
public static final int BLITZ_ANIMATION = 1978;
public static final int CHIN_ANIMATION = 7618;

// Gauntlet Hunleff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ private String buildToolTip(int itemId, int qty)
{
ItemDefinition item = this.itemManager.getItemDefinition(itemId);
final String name = item.getName();
final long price = item.getPrice();
final long price = itemManager.getItemPrice(itemId);
return name + " x " + qty + " (" + QuantityFormatter.quantityToStackSize(price * qty) + ") ";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
import javax.inject.Singleton;
import javax.swing.SwingUtilities;
import lombok.extern.slf4j.Slf4j;
import static net.runelite.api.AnimationID.BARRAGE_ANIMATION;
import static net.runelite.api.AnimationID.BLITZ_ANIMATION;
import static net.runelite.api.AnimationID.BLOWPIPE_ATTACK;
import static net.runelite.api.AnimationID.HIGH_LEVEL_MAGIC_ATTACK;
import static net.runelite.api.AnimationID.LOW_LEVEL_MAGIC_ATTACK;
Expand Down Expand Up @@ -371,6 +373,17 @@ else if (animationChanged.getActor().getAnimation() == LOW_LEVEL_MAGIC_ATTACK)
actionStack.push(newAction);
}
}
else if (animationChanged.getActor().getAnimation() == BARRAGE_ANIMATION || animationChanged.getActor().getAnimation() == BLITZ_ANIMATION )
{
old = client.getItemContainer(InventoryID.INVENTORY);

if (old != null && old.getItems() != null && actionStack.stream().noneMatch(a ->
a.getType() == CAST))
{
MenuAction newAction = new MenuAction(CAST, old.getItems());
actionStack.push(newAction);
}
}
}
}

Expand Down