client: make actions follow menu entry params.
This commit is contained in:
@@ -1843,17 +1843,7 @@ public interface Client extends GameShell
|
|||||||
|
|
||||||
void setRenderSelf(boolean enabled);
|
void setRenderSelf(boolean enabled);
|
||||||
|
|
||||||
/**
|
void invokeMenuAction(String option, String target, int identifier, int opcode, int param0, int param1);
|
||||||
* @param param0 This is SceneX for gameObject, index for items, and 0 for npc.
|
|
||||||
* @param param1 This is SceneY for gameObject, static for items, and 0 for npc.
|
|
||||||
* @param opcode Menu entry Action opcode.
|
|
||||||
* @param id Targets ID
|
|
||||||
* @param menuEntry Do these actually matter?
|
|
||||||
* @param targetString Do these actually matter?
|
|
||||||
* @param canvasX Canvas X Point
|
|
||||||
* @param canvasY Canvas Y Point
|
|
||||||
*/
|
|
||||||
void invokeMenuAction(int param0, int param1, int opcode, int id, String menuEntry, String targetString, int canvasX, int canvasY);
|
|
||||||
|
|
||||||
MouseRecorder getMouseRecorder();
|
MouseRecorder getMouseRecorder();
|
||||||
|
|
||||||
|
|||||||
@@ -1435,9 +1435,9 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Inject
|
@Inject
|
||||||
public void invokeMenuAction(int param0, int param1, int opcode, int id, String menuOption, String menuTarget, int canvasX, int canvasY)
|
public void invokeMenuAction(String option, String target, int identifier, int opcode, int param0, int param1)
|
||||||
{
|
{
|
||||||
client.sendMenuAction(param0, param1, opcode, id, menuOption, "!AUTHENTIC" + menuTarget, canvasX, canvasY);
|
client.sendMenuAction(param0, param1, opcode, identifier, option, "!AUTHENTIC" + target, 658, 384);
|
||||||
}
|
}
|
||||||
|
|
||||||
@FieldHook("Login_username")
|
@FieldHook("Login_username")
|
||||||
@@ -1883,4 +1883,4 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
|
|
||||||
return widgetClickMask;
|
return widgetClickMask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public abstract class WorldHoppingMixin implements RSClient
|
|||||||
public void openWorldHopper()
|
public void openWorldHopper()
|
||||||
{
|
{
|
||||||
// The clicked x & y coordinates (the last arguments) are not processed in the game or sent to Jagex, so they don't have to be real.
|
// The clicked x & y coordinates (the last arguments) are not processed in the game or sent to Jagex, so they don't have to be real.
|
||||||
invokeMenuAction(-1, WidgetInfo.WORLD_SWITCHER_BUTTON.getId(), MenuOpcode.CC_OP.getId(), 1, "World Switcher", "", 658, 384);
|
invokeMenuAction("World Switcher", "", 1, MenuOpcode.CC_OP.getId(), -1, WidgetInfo.WORLD_SWITCHER_BUTTON.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -23,6 +23,6 @@ public abstract class WorldHoppingMixin implements RSClient
|
|||||||
public void hopToWorld(World world)
|
public void hopToWorld(World world)
|
||||||
{
|
{
|
||||||
final int worldId = world.getId();
|
final int worldId = world.getId();
|
||||||
invokeMenuAction(worldId, WidgetInfo.WORLD_SWITCHER_LIST.getId(), MenuOpcode.CC_OP.getId(), 1, "Switch", "<col=ff9040>" + (worldId - 300) + "</col>", 683, 244);
|
invokeMenuAction("Switch", "<col=ff9040>" + (worldId - 300) + "</col>", 1, MenuOpcode.CC_OP.getId(), worldId, WidgetInfo.WORLD_SWITCHER_LIST.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user