bringup
This commit is contained in:
@@ -41,6 +41,7 @@ import net.runelite.api.ItemDefinition;
|
||||
import net.runelite.api.ItemContainer;
|
||||
import net.runelite.api.VarClientInt;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
import static net.runelite.client.plugins.lootingbagviewer.LootingBagViewerOverlay.PLACEHOLDER_WIDTH;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.components.ComponentConstants;
|
||||
|
||||
@@ -39,7 +39,7 @@ import net.runelite.api.Constants;
|
||||
import net.runelite.api.FontID;
|
||||
import net.runelite.api.InventoryID;
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.ItemComposition;
|
||||
import net.runelite.api.ItemDefinition;
|
||||
import net.runelite.api.ItemContainer;
|
||||
import net.runelite.api.ItemID;
|
||||
import net.runelite.api.ScriptID;
|
||||
@@ -245,7 +245,7 @@ public class ItemsKeptOnDeathPlugin extends Plugin
|
||||
continue;
|
||||
}
|
||||
|
||||
final ItemComposition c = itemManager.getItemComposition(i.getId());
|
||||
final ItemDefinition c = itemManager.getItemDefinition(i.getId());
|
||||
|
||||
// Bonds are always kept and do not count towards the limit.
|
||||
if (id == ItemID.OLD_SCHOOL_BOND || id == ItemID.OLD_SCHOOL_BOND_UNTRADEABLE)
|
||||
@@ -344,7 +344,7 @@ public class ItemsKeptOnDeathPlugin extends Plugin
|
||||
int exchangePrice = itemManager.getItemPrice(canonicalizedItemId);
|
||||
if (exchangePrice == 0)
|
||||
{
|
||||
final ItemComposition c1 = itemManager.getItemComposition(canonicalizedItemId);
|
||||
final ItemDefinition c1 = itemManager.getItemDefinition(canonicalizedItemId);
|
||||
exchangePrice = c1.getPrice();
|
||||
}
|
||||
else
|
||||
@@ -453,7 +453,7 @@ public class ItemsKeptOnDeathPlugin extends Plugin
|
||||
if (price == 0)
|
||||
{
|
||||
// Default to alch price
|
||||
price = (int) (itemManager.getItemComposition(cid).getPrice() * Constants.HIGH_ALCHEMY_MULTIPLIER);
|
||||
price = (int) (itemManager.getItemDefinition(cid).getPrice() * Constants.HIGH_ALCHEMY_MULTIPLIER);
|
||||
}
|
||||
total += (long) price * w.getItemQuantity();
|
||||
}
|
||||
@@ -472,9 +472,9 @@ public class ItemsKeptOnDeathPlugin extends Plugin
|
||||
* @param c The item
|
||||
* @return
|
||||
*/
|
||||
private static boolean isTradeable(final ItemComposition c)
|
||||
private static boolean isTradeable(final ItemDefinition c)
|
||||
{
|
||||
// ItemComposition:: isTradeable checks if they are traded on the grand exchange, some items are trade-able but not via GE
|
||||
// ItemDefinition:: isTradeable checks if they are traded on the grand exchange, some items are trade-able but not via GE
|
||||
if (c.getNote() != -1
|
||||
|| c.getLinkedNoteId() != -1
|
||||
|| c.isTradeable())
|
||||
@@ -593,7 +593,7 @@ public class ItemsKeptOnDeathPlugin extends Plugin
|
||||
* @param c Items Composition
|
||||
* @return
|
||||
*/
|
||||
private static Widget createItemWidget(final Widget parent, final int qty, final ItemComposition c)
|
||||
private static Widget createItemWidget(final Widget parent, final int qty, final ItemDefinition c)
|
||||
{
|
||||
final Widget itemWidget = parent.createChild(-1, WidgetType.GRAPHIC);
|
||||
itemWidget.setItemId(c.getId());
|
||||
|
||||
@@ -41,10 +41,10 @@ import net.runelite.client.ui.overlay.components.ComponentOrientation;
|
||||
import net.runelite.client.ui.overlay.components.ImageComponent;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
|
||||
class LootingBagViewerOverlay extends Overlay
|
||||
public class LootingBagViewerOverlay extends Overlay
|
||||
{
|
||||
private static final int INVENTORY_SIZE = 28;
|
||||
private static final int PLACEHOLDER_WIDTH = 36;
|
||||
public static final int PLACEHOLDER_WIDTH = 36;
|
||||
private static final int PLACEHOLDER_HEIGHT = 32;
|
||||
private static final ImageComponent PLACEHOLDER_IMAGE = new ImageComponent(new BufferedImage(PLACEHOLDER_WIDTH, PLACEHOLDER_HEIGHT, BufferedImage.TYPE_4BYTE_ABGR));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user