Skip to content

Commit

Permalink
Remove left click calling from BA plugin
Browse files Browse the repository at this point in the history
Being able to spam left click without paying attention to what actually
needs to be called is overpowered. Until we come up with something
better (like binding the different calls to Ctrl, Alt, Ctrl+Alt) we
shouldn't offer this particular feature
  • Loading branch information
SomeoneWithAnInternetConnection committed Mar 6, 2018
1 parent 4887e0e commit 2056186
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@
)
public interface BarbarianAssaultConfig extends Config
{
@ConfigItem(
keyName = "removeUnused",
name = "Remove incorrect calls",
description = "Removes incorrect calls for Role horn"
)
default boolean removeWrong()
{
return true;
}

@ConfigItem(
keyName = "showTimer",
name = "Show call change timer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@
import net.runelite.api.Varbits;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.kit.KitType;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
Expand Down Expand Up @@ -111,39 +108,6 @@ public void onGameTick(GameTick event)
}
}

@Subscribe
public void onMenuOpen(MenuEntryAdded event)
{
if (config.removeWrong() && overlay.getCurrentRound() != null && event.getTarget().endsWith("horn"))
{
MenuEntry[] menuEntries = client.getMenuEntries();
WidgetInfo callInfo = overlay.getCurrentRound().getRoundRole().getCall();
Widget callWidget = client.getWidget(callInfo);
String call = Calls.getOption(callWidget.getText());
MenuEntry correctCall = null;

entries.clear();
for (MenuEntry entry : menuEntries)
{
String option = entry.getOption();
if (option.equals(call))
{
correctCall = entry;
}
else if (!option.startsWith("Tell-"))
{
entries.add(entry);
}
}

if (correctCall != null)
{
entries.add(correctCall);
client.setMenuEntries(entries.toArray(new MenuEntry[entries.size()]));
}
}
}

@Subscribe
public void onVarbitChange(VarbitChanged event)
{
Expand Down

0 comments on commit 2056186

Please sign in to comment.