wiki: Fix dupe menu entries (#1913)

wiki: Fix dupe menu entries
This commit is contained in:
ST0NEWALL
2019-11-07 06:45:04 -05:00
committed by GitHub

View File

@@ -399,7 +399,8 @@ public class WikiPlugin extends Plugin
); );
} }
if (widgetID == WidgetInfo.ACHIEVEMENT_DIARY_CONTAINER.getId()) if (widgetID == WidgetInfo.ACHIEVEMENT_DIARY_CONTAINER.getId()
&& event.getOption().contains("Open"))
{ {
Widget w = getWidget(widgetID, widgetIndex); Widget w = getWidget(widgetID, widgetIndex);
if (w.getActions() == null) if (w.getActions() == null)
@@ -426,7 +427,8 @@ public class WikiPlugin extends Plugin
); );
} }
if (WidgetInfo.TO_GROUP(widgetID) == WidgetInfo.SKILLS_CONTAINER.getGroupId()) if (WidgetInfo.TO_GROUP(widgetID) == WidgetInfo.SKILLS_CONTAINER.getGroupId()
&& event.getOption().contains("View"))
{ {
Widget w = getWidget(widgetID, widgetIndex); Widget w = getWidget(widgetID, widgetIndex);
if (w.getParentId() != WidgetInfo.SKILLS_CONTAINER.getId()) if (w.getParentId() != WidgetInfo.SKILLS_CONTAINER.getId())
@@ -446,7 +448,7 @@ public class WikiPlugin extends Plugin
MENUOP_WIKI, MENUOP_WIKI,
action.replace("View ", "").replace("Guide ", ""), action.replace("View ", "").replace("Guide ", ""),
MenuOpcode.RUNELITE.getId(), MenuOpcode.RUNELITE.getId(),
event.getIdentifier(), 0,
widgetIndex, widgetIndex,
widgetID, widgetID,
false false