project(mixins): Update
This commit is contained in:
@@ -54,7 +54,7 @@ public class CopyRuneLiteClasses extends AbstractInjector
|
|||||||
{
|
{
|
||||||
ClassFile runeliteObjectVanilla = inject.vanilla.findClass(className);
|
ClassFile runeliteObjectVanilla = inject.vanilla.findClass(className);
|
||||||
|
|
||||||
final ClassFile runeLiteObjectDeob = inject.getDeobfuscated()
|
final ClassFile runeLiteDeob = inject.getDeobfuscated()
|
||||||
.findClass(className);
|
.findClass(className);
|
||||||
|
|
||||||
if (runeliteObjectVanilla == null)
|
if (runeliteObjectVanilla == null)
|
||||||
@@ -62,11 +62,11 @@ public class CopyRuneLiteClasses extends AbstractInjector
|
|||||||
runeliteObjectVanilla = new ClassFile(inject.vanilla);
|
runeliteObjectVanilla = new ClassFile(inject.vanilla);
|
||||||
runeliteObjectVanilla.setVersion(Opcodes.V1_8);
|
runeliteObjectVanilla.setVersion(Opcodes.V1_8);
|
||||||
runeliteObjectVanilla.setName(className);
|
runeliteObjectVanilla.setName(className);
|
||||||
runeliteObjectVanilla.setAccess(runeLiteObjectDeob.getAccess());
|
runeliteObjectVanilla.setAccess(runeLiteDeob.getAccess());
|
||||||
|
|
||||||
if (runeLiteObjectDeob.getParentClass() != null)
|
if (runeLiteDeob.getParentClass() != null)
|
||||||
{
|
{
|
||||||
ClassFile deobClass = inject.getDeobfuscated().findClass(runeLiteObjectDeob.getParentClass().getName());
|
ClassFile deobClass = inject.getDeobfuscated().findClass(runeLiteDeob.getParentClass().getName());
|
||||||
|
|
||||||
if (deobClass != null)
|
if (deobClass != null)
|
||||||
{
|
{
|
||||||
@@ -74,25 +74,30 @@ public class CopyRuneLiteClasses extends AbstractInjector
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
runeliteObjectVanilla.setParentClass(runeLiteObjectDeob.getParentClass());
|
runeliteObjectVanilla.setParentClass(runeLiteDeob.getParentClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inject.toVanilla.put(runeLiteObjectDeob, runeliteObjectVanilla);
|
inject.toVanilla.put(runeLiteDeob, runeliteObjectVanilla);
|
||||||
|
|
||||||
for (Class interfaze : runeLiteObjectDeob.getInterfaces())
|
for (Class interfaze : runeLiteDeob.getInterfaces())
|
||||||
{
|
{
|
||||||
runeliteObjectVanilla.getInterfaces().addInterface(interfaze);
|
runeliteObjectVanilla.getInterfaces().addInterface(interfaze);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Field field : runeLiteObjectDeob.getFields())
|
for (Field field : runeLiteDeob.getFields())
|
||||||
{
|
{
|
||||||
field.setType(InjectUtil.deobToVanilla(inject, field.getType()));
|
field.setType(InjectUtil.deobToVanilla(inject, field.getType()));
|
||||||
runeliteObjectVanilla.addField(field);
|
runeliteObjectVanilla.addField(field);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Method method : runeLiteObjectDeob.getMethods())
|
for (Method method : runeLiteDeob.getMethods())
|
||||||
{
|
{
|
||||||
|
if (className.equals("RuneLiteMenuEntry") && (method.getName().equals("getItemId") || method.getName().equals("getWidget")))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
transformMethod(method);
|
transformMethod(method);
|
||||||
runeliteObjectVanilla.addMethod(method);
|
runeliteObjectVanilla.addMethod(method);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -949,6 +949,17 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
@Override
|
@Override
|
||||||
public void setMenuEntries(MenuEntry[] menuEntries)
|
public void setMenuEntries(MenuEntry[] menuEntries)
|
||||||
{
|
{
|
||||||
|
boolean var2 = false;
|
||||||
|
|
||||||
|
if (client.getTempMenuAction() != null && client.getMenuOptionCount() > 0)
|
||||||
|
{
|
||||||
|
var2 = client.getTempMenuAction().getParam0() == client.getMenuArguments1()[client.getMenuOptionCount() - 1] &&
|
||||||
|
client.getTempMenuAction().getParam1() == client.getMenuArguments2()[client.getMenuOptionCount() - 1] &&
|
||||||
|
client.getTempMenuAction().getOption().equals(client.getMenuOptions()[client.getMenuOptionCount() - 1]) &&
|
||||||
|
client.getTempMenuAction().getIdentifier() == client.getMenuIdentifiers()[client.getMenuOptionCount() - 1] &&
|
||||||
|
client.getTempMenuAction().getOpcode() == client.getMenuOpcodes()[client.getMenuOptionCount() - 1];
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < menuEntries.length; ++i)
|
for (int i = 0; i < menuEntries.length; ++i)
|
||||||
{
|
{
|
||||||
RSRuneLiteMenuEntry menuEntry = (RSRuneLiteMenuEntry) menuEntries[i];
|
RSRuneLiteMenuEntry menuEntry = (RSRuneLiteMenuEntry) menuEntries[i];
|
||||||
@@ -960,6 +971,15 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
|
|
||||||
client.setMenuOptionCount(menuEntries.length);
|
client.setMenuOptionCount(menuEntries.length);
|
||||||
tmpMenuOptionsCount = menuEntries.length;
|
tmpMenuOptionsCount = menuEntries.length;
|
||||||
|
|
||||||
|
if (var2 && client.getMenuOptionCount() > 0)
|
||||||
|
{
|
||||||
|
client.getTempMenuAction().setParam0(client.getMenuArguments1()[client.getMenuOptionCount() - 1]);
|
||||||
|
client.getTempMenuAction().setParam1(client.getMenuArguments2()[client.getMenuOptionCount() - 1]);
|
||||||
|
client.getTempMenuAction().setOption(client.getMenuOptions()[client.getMenuOptionCount() - 1]);
|
||||||
|
client.getTempMenuAction().setIdentifier(client.getMenuIdentifiers()[client.getMenuOptionCount() - 1]);
|
||||||
|
client.getTempMenuAction().setOpcode(client.getMenuOpcodes()[client.getMenuOptionCount() - 1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -1038,6 +1058,7 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
int menuIdentifier = client.getMenuIdentifiers()[tmpOptionsCount];
|
int menuIdentifier = client.getMenuIdentifiers()[tmpOptionsCount];
|
||||||
int menuArgument1 = client.getMenuArguments1()[tmpOptionsCount];
|
int menuArgument1 = client.getMenuArguments1()[tmpOptionsCount];
|
||||||
int menuArgument2 = client.getMenuArguments2()[tmpOptionsCount];
|
int menuArgument2 = client.getMenuArguments2()[tmpOptionsCount];
|
||||||
|
|
||||||
if (rl$menuEntries[tmpOptionsCount] == null)
|
if (rl$menuEntries[tmpOptionsCount] == null)
|
||||||
{
|
{
|
||||||
rl$menuEntries[tmpOptionsCount] = newRuneliteMenuEntry(tmpOptionsCount);
|
rl$menuEntries[tmpOptionsCount] = newRuneliteMenuEntry(tmpOptionsCount);
|
||||||
@@ -1655,15 +1676,67 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
{
|
{
|
||||||
RSRuneLiteMenuEntry menuEntry = null;
|
RSRuneLiteMenuEntry menuEntry = null;
|
||||||
|
|
||||||
for (int i = client.getMenuOptionCount() - 1; i >= 0; --i)
|
int i;
|
||||||
|
for (i = client.getMenuOptionCount() - 1; i >= 0; --i)
|
||||||
{
|
{
|
||||||
if (client.getMenuOptions()[i] == option && client.getMenuTargets()[i] == target && client.getMenuIdentifiers()[i] == id && client.getMenuOpcodes()[i] == opcode)
|
if (client.getMenuOptions()[i].equals(option) && client.getMenuTargets()[i].equals(target) && client.getMenuIdentifiers()[i] == id && client.getMenuOpcodes()[i] == opcode)
|
||||||
{
|
{
|
||||||
menuEntry = rl$menuEntries[i];
|
menuEntry = rl$menuEntries[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (menuEntry == null && option.equals(target))
|
||||||
|
{
|
||||||
|
if (tmpMenuOptionsCount < 500)
|
||||||
|
{
|
||||||
|
int var10000 = tmpMenuOptionsCount;
|
||||||
|
tmpMenuOptionsCount = (var10000 + 1);
|
||||||
|
i = var10000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
client.getMenuOpcodes()[i] = opcode;
|
||||||
|
client.getMenuIdentifiers()[i] = id;
|
||||||
|
client.getMenuOptions()[i] = option;
|
||||||
|
client.getMenuTargets()[i] = target;
|
||||||
|
client.getMenuArguments1()[i] = param0;
|
||||||
|
client.getMenuArguments2()[i] = param1;
|
||||||
|
client.getMenuForceLeftClick()[i] = false;
|
||||||
|
menuEntry = rl$menuEntries[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
MenuOptionClicked menuOptionClicked = null;
|
||||||
|
|
||||||
|
if (menuEntry == null)
|
||||||
|
{
|
||||||
|
menuOptionClicked = new MenuOptionClicked(newBareRuneliteMenuEntry());
|
||||||
|
|
||||||
|
if (canvasX != -1 || canvasY != -1)
|
||||||
|
{
|
||||||
|
client.getLogger().warn("Unable to find clicked menu op {} targ {} action {} id {} p0 {} p1 {}", option, target, opcode, id, param0, param1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
menuOptionClicked = new MenuOptionClicked(menuEntry);
|
||||||
|
|
||||||
|
client.getCallbacks().post(menuOptionClicked);
|
||||||
|
|
||||||
|
if (menuEntry.getConsumer() != null)
|
||||||
|
{
|
||||||
|
menuEntry.getConsumer().accept(menuEntry);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (menuOptionClicked.isConsumed())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The RuneScape client may deprioritize an action in the menu by incrementing the opcode with 2000,
|
* The RuneScape client may deprioritize an action in the menu by incrementing the opcode with 2000,
|
||||||
* undo it here so we can get the correct opcode
|
* undo it here so we can get the correct opcode
|
||||||
@@ -1675,27 +1748,6 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
opcode -= 2000;
|
opcode -= 2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
final MenuOptionClicked menuOptionClicked = new MenuOptionClicked();
|
|
||||||
menuOptionClicked.setParam0(param0);
|
|
||||||
menuOptionClicked.setMenuOption(option);
|
|
||||||
menuOptionClicked.setMenuTarget(target);
|
|
||||||
menuOptionClicked.setMenuAction(MenuAction.of(opcode));
|
|
||||||
menuOptionClicked.setId(id);
|
|
||||||
menuOptionClicked.setParam1(param1);
|
|
||||||
menuOptionClicked.setSelectedItemIndex(client.getSelectedItemSlot());
|
|
||||||
|
|
||||||
client.getCallbacks().post(menuOptionClicked);
|
|
||||||
|
|
||||||
if (menuEntry != null && menuEntry.getConsumer() != null)
|
|
||||||
{
|
|
||||||
menuEntry.getConsumer().accept(menuEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (menuOptionClicked.isConsumed())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (printMenuActions)
|
if (printMenuActions)
|
||||||
{
|
{
|
||||||
client.getLogger().info(
|
client.getLogger().info(
|
||||||
@@ -1704,6 +1756,14 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
menuOptionClicked.getMenuAction(), opcode + (decremented ? 2000 : 0),
|
menuOptionClicked.getMenuAction(), opcode + (decremented ? 2000 : 0),
|
||||||
menuOptionClicked.getParam0(), menuOptionClicked.getParam1(), canvasX, canvasY
|
menuOptionClicked.getParam0(), menuOptionClicked.getParam1(), canvasX, canvasY
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (menuEntry != null)
|
||||||
|
{
|
||||||
|
client.getLogger().info(
|
||||||
|
"|MenuEntry|: Idx={} MenuOption={} MenuTarget={} Id={} MenuAction={} Param0={} Param1={} Consumer={} IsItemOp={} ItemOp={} ItemID={} Widget={}",
|
||||||
|
menuEntry.getIdx(), menuEntry.getOption(), menuEntry.getTarget(), menuEntry.getIdentifier(), menuEntry.getType(), menuEntry.getParam0(), menuEntry.getParam1(), menuEntry.getConsumer(), menuEntry.isItemOp(), menuEntry.getItemOp(), menuEntry.getItemId(), menuEntry.getWidget()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
copy$menuAction(menuOptionClicked.getParam0(), menuOptionClicked.getParam1(),
|
copy$menuAction(menuOptionClicked.getParam0(), menuOptionClicked.getParam1(),
|
||||||
@@ -2944,5 +3004,22 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
client.setLowMemory(true);
|
client.setLowMemory(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Override
|
||||||
|
public Widget getSelectedWidget()
|
||||||
|
{
|
||||||
|
int selectedSpellWidget = client.getSelectedSpellWidget();
|
||||||
|
int selectedSpellChildIndex = client.getSelectedSpellChildIndex();
|
||||||
|
|
||||||
|
Widget widget = client.getWidget(selectedSpellWidget);
|
||||||
|
|
||||||
|
if (widget != null && selectedSpellChildIndex > -1)
|
||||||
|
{
|
||||||
|
return widget.getChild(selectedSpellChildIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018, OpenOSRS
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package net.runelite.mixins;
|
||||||
|
|
||||||
|
import net.runelite.api.MenuAction;
|
||||||
|
import net.runelite.api.mixins.Inject;
|
||||||
|
import net.runelite.api.mixins.Mixin;
|
||||||
|
import net.runelite.api.mixins.Shadow;
|
||||||
|
import net.runelite.api.widgets.Widget;
|
||||||
|
import net.runelite.rs.api.RSClient;
|
||||||
|
import net.runelite.rs.api.RSRuneLiteMenuEntry;
|
||||||
|
|
||||||
|
@Mixin(RSRuneLiteMenuEntry.class)
|
||||||
|
public abstract class RuneLiteMenuEntryMixin implements RSRuneLiteMenuEntry
|
||||||
|
{
|
||||||
|
@Shadow("client")
|
||||||
|
private static RSClient client;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Override
|
||||||
|
public int getItemId()
|
||||||
|
{
|
||||||
|
MenuAction menuAction = this.getType();
|
||||||
|
if (menuAction == MenuAction.CC_OP || menuAction == MenuAction.CC_OP_LOW_PRIORITY)
|
||||||
|
{
|
||||||
|
int param1 = this.getParam1();
|
||||||
|
int param0 = this.getParam0();
|
||||||
|
if (param1 == 9764864)
|
||||||
|
{
|
||||||
|
Widget widget = client.getWidget(param1);
|
||||||
|
if (param0 != -1)
|
||||||
|
{
|
||||||
|
widget = widget.getChild(param0);
|
||||||
|
return widget.getItemId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Override
|
||||||
|
public Widget getWidget()
|
||||||
|
{
|
||||||
|
MenuAction menuAction = this.getType();
|
||||||
|
if (menuAction == MenuAction.CC_OP || menuAction == MenuAction.CC_OP_LOW_PRIORITY)
|
||||||
|
{
|
||||||
|
int param1 = this.getParam1();
|
||||||
|
int param0 = this.getParam0();
|
||||||
|
if (param1 == 9764864)
|
||||||
|
{
|
||||||
|
Widget widget = client.getWidget(param1);
|
||||||
|
if (param0 != -1)
|
||||||
|
{
|
||||||
|
widget = widget.getChild(param0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -194,6 +194,10 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Override
|
@Override
|
||||||
void setDraggedOnWidget(Widget widget);
|
void setDraggedOnWidget(Widget widget);
|
||||||
|
|
||||||
|
@Import("widgetDragDuration")
|
||||||
|
@Override
|
||||||
|
int getDragTime();
|
||||||
|
|
||||||
@Import("Widget_interfaceComponents")
|
@Import("Widget_interfaceComponents")
|
||||||
RSWidget[][] getWidgets();
|
RSWidget[][] getWidgets();
|
||||||
|
|
||||||
@@ -329,6 +333,9 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Override
|
@Override
|
||||||
void setMenuOptionCount(int menuOptionCount);
|
void setMenuOptionCount(int menuOptionCount);
|
||||||
|
|
||||||
|
@Import("tempMenuAction")
|
||||||
|
RSMenuAction getTempMenuAction();
|
||||||
|
|
||||||
@Import("menuActions")
|
@Import("menuActions")
|
||||||
String[] getMenuOptions();
|
String[] getMenuOptions();
|
||||||
|
|
||||||
|
|||||||
@@ -28,18 +28,33 @@ import net.runelite.mapping.Import;
|
|||||||
|
|
||||||
public interface RSMenuAction
|
public interface RSMenuAction
|
||||||
{
|
{
|
||||||
|
@Import("action")
|
||||||
|
String getOption();
|
||||||
|
|
||||||
@Import("action")
|
@Import("action")
|
||||||
void setOption(String yes);
|
void setOption(String yes);
|
||||||
|
|
||||||
|
@Import("opcode")
|
||||||
|
int getOpcode();
|
||||||
|
|
||||||
@Import("opcode")
|
@Import("opcode")
|
||||||
void setOpcode(int yes);
|
void setOpcode(int yes);
|
||||||
|
|
||||||
|
@Import("identifier")
|
||||||
|
int getIdentifier();
|
||||||
|
|
||||||
@Import("identifier")
|
@Import("identifier")
|
||||||
void setIdentifier(int yes);
|
void setIdentifier(int yes);
|
||||||
|
|
||||||
|
@Import("param0")
|
||||||
|
int getParam0();
|
||||||
|
|
||||||
@Import("param0")
|
@Import("param0")
|
||||||
void setParam0(int yes);
|
void setParam0(int yes);
|
||||||
|
|
||||||
|
@Import("param1")
|
||||||
|
int getParam1();
|
||||||
|
|
||||||
@Import("param1")
|
@Import("param1")
|
||||||
void setParam1(int yes);
|
void setParam1(int yes);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import net.runelite.api.MenuAction;
|
import net.runelite.api.MenuAction;
|
||||||
import net.runelite.api.MenuEntry;
|
import net.runelite.api.MenuEntry;
|
||||||
|
import net.runelite.api.widgets.Widget;
|
||||||
|
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
|
||||||
|
|
||||||
public class RuneLiteMenuEntry implements MenuEntry
|
public class RuneLiteMenuEntry implements MenuEntry
|
||||||
{
|
{
|
||||||
@@ -322,6 +324,70 @@ public class RuneLiteMenuEntry implements MenuEntry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isItemOp()
|
||||||
|
{
|
||||||
|
MenuAction var1 = this.getType();
|
||||||
|
if (var1 == MenuAction.CC_OP || var1 == MenuAction.CC_OP_LOW_PRIORITY) {
|
||||||
|
int var2 = this.getIdentifier();
|
||||||
|
int var3 = this.getParam1();
|
||||||
|
if (var3 == 9764864) {
|
||||||
|
switch(var2) {
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
return true;
|
||||||
|
case 5:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemOp()
|
||||||
|
{
|
||||||
|
MenuAction var1 = this.getType();
|
||||||
|
if (var1 == MenuAction.CC_OP || var1 == MenuAction.CC_OP_LOW_PRIORITY) {
|
||||||
|
int var2 = this.getIdentifier();
|
||||||
|
int var3 = this.getParam1();
|
||||||
|
if (var3 == 9764864) {
|
||||||
|
switch(var2) {
|
||||||
|
case 2:
|
||||||
|
return 1;
|
||||||
|
case 3:
|
||||||
|
return 2;
|
||||||
|
case 4:
|
||||||
|
return 3;
|
||||||
|
case 5:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
return 4;
|
||||||
|
case 7:
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemId()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Widget getWidget()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
@@ -346,6 +412,5 @@ public class RuneLiteMenuEntry implements MenuEntry
|
|||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return "MenuEntryImpl(getOption=" + this.getOption() + ", getTarget=" + this.getTarget() + ", getIdentifier=" + this.getIdentifier() + ", getType=" + this.getType() + ", getParam0=" + this.getParam0() + ", getParam1=" + this.getParam1() + ", isForceLeftClick=" + this.isForceLeftClick() + ", isDeprioritized=" + this.isDeprioritized() + ")";
|
return "MenuEntryImpl(getOption=" + this.getOption() + ", getTarget=" + this.getTarget() + ", getIdentifier=" + this.getIdentifier() + ", getType=" + this.getType() + ", getParam0=" + this.getParam0() + ", getParam1=" + this.getParam1() + ", isForceLeftClick=" + this.isForceLeftClick() + ", isDeprioritized=" + this.isDeprioritized() + ")";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user