finish bringup
This commit is contained in:
@@ -28,7 +28,7 @@ import net.runelite.api.ItemContainer;
|
|||||||
import lombok.Value;
|
import lombok.Value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An event called whenever the stack size of an {@link api.Item}
|
* An event called whenever the stack size of an {@link net.runelite.api.Item}
|
||||||
* in an {@link ItemContainer} is modified.
|
* in an {@link ItemContainer} is modified.
|
||||||
* <p>
|
* <p>
|
||||||
* Examples of when this event may trigger include:
|
* Examples of when this event may trigger include:
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ public class ItemsKeptOnDeathPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
final int id = item.getId();
|
final int id = item.getId();
|
||||||
final int qty = item.getQty();
|
final int qty = item.getQty();
|
||||||
final ItemDefinition c = itemManager.getItemComposition(id);
|
final ItemDefinition c = itemManager.getItemDefinition(id);
|
||||||
|
|
||||||
final Widget itemWidget = parent.createChild(-1, WidgetType.GRAPHIC);
|
final Widget itemWidget = parent.createChild(-1, WidgetType.GRAPHIC);
|
||||||
itemWidget.setOriginalWidth(Constants.ITEM_SPRITE_WIDTH);
|
itemWidget.setOriginalWidth(Constants.ITEM_SPRITE_WIDTH);
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ class KeyRemappingListener extends MouseAdapter implements KeyListener
|
|||||||
@Inject
|
@Inject
|
||||||
private KeyRemappingPlugin plugin;
|
private KeyRemappingPlugin plugin;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private KeyRemappingConfig config;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.Item;
|
import net.runelite.api.Item;
|
||||||
import net.runelite.api.ItemComposition;
|
import net.runelite.api.ItemDefinition;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.client.game.ItemManager;
|
import net.runelite.client.game.ItemManager;
|
||||||
import static net.runelite.client.plugins.itemskeptondeath.ItemsKeptOnDeathPlugin.DeathItems;
|
import static net.runelite.client.plugins.itemskeptondeath.ItemsKeptOnDeathPlugin.DeathItems;
|
||||||
@@ -80,7 +80,7 @@ public class ItemsKeptOnDeathPluginTest
|
|||||||
private Item mItem(final int id, final int qty, final String name, final boolean tradeable, final int price)
|
private Item mItem(final int id, final int qty, final String name, final boolean tradeable, final int price)
|
||||||
{
|
{
|
||||||
// Mock Item Composition and necessary ItemManager methods for this item
|
// Mock Item Composition and necessary ItemManager methods for this item
|
||||||
ItemComposition c = mock(ItemComposition.class);
|
ItemDefinition c = mock(ItemDefinition.class);
|
||||||
when(c.getId())
|
when(c.getId())
|
||||||
.thenReturn(id);
|
.thenReturn(id);
|
||||||
when(c.getName())
|
when(c.getName())
|
||||||
@@ -96,7 +96,7 @@ public class ItemsKeptOnDeathPluginTest
|
|||||||
when(c.getLinkedNoteId()).thenReturn(-1);
|
when(c.getLinkedNoteId()).thenReturn(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
when(itemManager.getItemComposition(id)).thenReturn(c);
|
when(itemManager.getItemDefinition(id)).thenReturn(c);
|
||||||
when(itemManager.canonicalize(id)).thenReturn(id);
|
when(itemManager.canonicalize(id)).thenReturn(id);
|
||||||
when(itemManager.getItemPrice(id, true)).thenReturn(price);
|
when(itemManager.getItemPrice(id, true)).thenReturn(price);
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public abstract class RSItemContainerMixin implements RSItemContainer
|
|||||||
|
|
||||||
@FieldHook("quantities")
|
@FieldHook("quantities")
|
||||||
@Inject
|
@Inject
|
||||||
public void stackSizesChanged(int idx)
|
public void stackSizesChanged(int containerID)
|
||||||
{
|
{
|
||||||
int cycle = client.getGameCycle();
|
int cycle = client.getGameCycle();
|
||||||
if (rl$lastCycle == cycle)
|
if (rl$lastCycle == cycle)
|
||||||
@@ -75,7 +75,7 @@ public abstract class RSItemContainerMixin implements RSItemContainer
|
|||||||
|
|
||||||
rl$lastCycle = cycle;
|
rl$lastCycle = cycle;
|
||||||
|
|
||||||
ItemContainerChanged event = new ItemContainerChanged(this);
|
ItemContainerChanged event = new ItemContainerChanged(containerID, this);
|
||||||
client.getCallbacks().postDeferred(event);
|
client.getCallbacks().postDeferred(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user