menu swapper: add shift-modifier to bank deposit box
This commit is contained in:
committed by
GitHub
parent
dc6942197e
commit
183761cafb
@@ -47,6 +47,7 @@ import net.runelite.api.events.MenuOpened;
|
||||
import net.runelite.api.events.MenuOptionClicked;
|
||||
import net.runelite.api.events.PostItemComposition;
|
||||
import net.runelite.api.events.WidgetMenuOptionClicked;
|
||||
import net.runelite.api.widgets.WidgetID;
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
import net.runelite.client.callback.ClientThread;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
@@ -314,8 +315,8 @@ public class MenuEntrySwapperPlugin extends Plugin
|
||||
&& menuEntryAdded.getOption().startsWith("Deposit-"))
|
||||
{
|
||||
ShiftDepositMode shiftDepositMode = config.bankDepositShiftClick();
|
||||
final int actionId = shiftDepositMode.getMenuAction().getId();
|
||||
final int opId = shiftDepositMode.getIdentifier();
|
||||
final int opId = WidgetInfo.TO_GROUP(menuEntryAdded.getActionParam1()) == WidgetID.DEPOSIT_BOX_GROUP_ID ? shiftDepositMode.getIdentifierDepositBox() : shiftDepositMode.getIdentifier();
|
||||
final int actionId = opId >= 6 ? MenuAction.CC_OP_LOW_PRIORITY.getId() : MenuAction.CC_OP.getId();
|
||||
bankModeSwap(actionId, opId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,23 +26,22 @@ package net.runelite.client.plugins.menuentryswapper;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.runelite.api.MenuAction;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum ShiftDepositMode
|
||||
{
|
||||
DEPOSIT_1("Deposit-1", MenuAction.CC_OP, 3),
|
||||
DEPOSIT_5("Deposit-5", MenuAction.CC_OP, 4),
|
||||
DEPOSIT_10("Deposit-10", MenuAction.CC_OP, 5),
|
||||
DEPOSIT_X("Deposit-X", MenuAction.CC_OP_LOW_PRIORITY, 6),
|
||||
DEPOSIT_ALL("Deposit-All", MenuAction.CC_OP_LOW_PRIORITY, 8),
|
||||
EXTRA_OP("Eat/Wield/Etc.", MenuAction.CC_OP_LOW_PRIORITY, 9),
|
||||
OFF("Off", MenuAction.UNKNOWN, 0);
|
||||
DEPOSIT_1("Deposit-1", 3, 2),
|
||||
DEPOSIT_5("Deposit-5", 4, 3),
|
||||
DEPOSIT_10("Deposit-10", 5, 4),
|
||||
DEPOSIT_X("Deposit-X", 6, 6),
|
||||
DEPOSIT_ALL("Deposit-All", 8, 5),
|
||||
EXTRA_OP("Eat/Wield/Etc.", 9, 0),
|
||||
OFF("Off", 0, 0);
|
||||
|
||||
private final String name;
|
||||
private final MenuAction menuAction;
|
||||
private final int identifier;
|
||||
private final int identifierDepositBox;
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
|
||||
Reference in New Issue
Block a user