project(mixins): Always try to grab a widget
This commit is contained in:
@@ -64,24 +64,27 @@ public abstract class RuneLiteMenuEntryMixin implements RSRuneLiteMenuEntry
|
|||||||
@Inject
|
@Inject
|
||||||
@Override
|
@Override
|
||||||
public Widget getWidget()
|
public Widget getWidget()
|
||||||
{
|
|
||||||
MenuAction menuAction = this.getType();
|
|
||||||
if (menuAction == MenuAction.CC_OP || menuAction == MenuAction.CC_OP_LOW_PRIORITY)
|
|
||||||
{
|
{
|
||||||
int param1 = this.getParam1();
|
int param1 = this.getParam1();
|
||||||
int param0 = this.getParam0();
|
int param0 = this.getParam0();
|
||||||
if (param1 == 9764864)
|
|
||||||
{
|
|
||||||
Widget widget = client.getWidget(param1);
|
Widget widget = client.getWidget(param1);
|
||||||
|
|
||||||
|
if (widget == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (param0 != -1)
|
if (param0 != -1)
|
||||||
{
|
{
|
||||||
widget = widget.getChild(param0);
|
Widget child = widget.getChild(param0);
|
||||||
|
|
||||||
|
if (child != null)
|
||||||
|
{
|
||||||
|
return child;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user