client: refactor a bit more, and add assertion.
This commit is contained in:
@@ -1385,20 +1385,20 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Replace("menuAction")
|
@Replace("menuAction")
|
||||||
static void rl$menuAction(int param0, int param1, int opcode, int id, String menuOption, String menuTarget, int canvasX, int canvasY)
|
static void rl$menuAction(int param0, int param1, int opcode, int id, String option, String target, int canvasX, int canvasY)
|
||||||
{
|
{
|
||||||
boolean authentic = true;
|
boolean authentic = true;
|
||||||
if (menuTarget != null && menuTarget.startsWith("!AUTHENTIC"))
|
if (target != null && target.startsWith("!AUTHENTIC"))
|
||||||
{
|
{
|
||||||
authentic = false;
|
authentic = false;
|
||||||
menuTarget = menuTarget.substring(10);
|
target = target.substring(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (printMenuActions && client.getLogger().isDebugEnabled())
|
if (printMenuActions && client.getLogger().isDebugEnabled())
|
||||||
{
|
{
|
||||||
client.getLogger().debug(
|
client.getLogger().debug(
|
||||||
"|MenuAction|: Param0={} Param1={} Opcode={} Id={} MenuOption={} MenuTarget={} CanvasX={} CanvasY={} Authentic={}",
|
"|MenuAction|: MenuOption={} MenuTarget={} Id={} Opcode={} Param0={} Param1={} CanvasX={} CanvasY={} Authentic={}",
|
||||||
param0, param1, opcode, id, menuOption, menuTarget, canvasX, canvasY, authentic
|
option, target, id, opcode, param0, param1, canvasX, canvasY, authentic
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1411,8 +1411,8 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
}
|
}
|
||||||
|
|
||||||
final MenuOptionClicked menuOptionClicked = new MenuOptionClicked(
|
final MenuOptionClicked menuOptionClicked = new MenuOptionClicked(
|
||||||
menuOption,
|
option,
|
||||||
menuTarget,
|
target,
|
||||||
id,
|
id,
|
||||||
opcode,
|
opcode,
|
||||||
param0,
|
param0,
|
||||||
@@ -1437,6 +1437,8 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
@Inject
|
@Inject
|
||||||
public void invokeMenuAction(String option, String target, int identifier, int opcode, int param0, int param1)
|
public void invokeMenuAction(String option, String target, int identifier, int opcode, int param0, int param1)
|
||||||
{
|
{
|
||||||
|
assert isClientThread();
|
||||||
|
|
||||||
client.sendMenuAction(param0, param1, opcode, identifier, option, "!AUTHENTIC" + target, 658, 384);
|
client.sendMenuAction(param0, param1, opcode, identifier, option, "!AUTHENTIC" + target, 658, 384);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user