corp plugin: remove dark core attack deprioritization
Removed at Jagex's request
This commit is contained in:
@@ -31,17 +31,6 @@ import net.runelite.client.config.ConfigItem;
|
|||||||
@ConfigGroup("corp")
|
@ConfigGroup("corp")
|
||||||
public interface CorpConfig extends Config
|
public interface CorpConfig extends Config
|
||||||
{
|
{
|
||||||
@ConfigItem(
|
|
||||||
keyName = "leftClickCore",
|
|
||||||
name = "Left click walk on core",
|
|
||||||
description = "Prioritizes Walk here over Attack on the Dark energy core",
|
|
||||||
position = 1
|
|
||||||
)
|
|
||||||
default boolean leftClickCore()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "showDamage",
|
keyName = "showDamage",
|
||||||
name = "Show damage overlay",
|
name = "Show damage overlay",
|
||||||
|
|||||||
@@ -35,16 +35,12 @@ import net.runelite.api.Actor;
|
|||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.GameState;
|
import net.runelite.api.GameState;
|
||||||
import net.runelite.api.MenuAction;
|
|
||||||
import static net.runelite.api.MenuAction.MENU_ACTION_DEPRIORITIZE_OFFSET;
|
|
||||||
import net.runelite.api.MenuEntry;
|
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.NpcID;
|
import net.runelite.api.NpcID;
|
||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.events.GameStateChanged;
|
import net.runelite.api.events.GameStateChanged;
|
||||||
import net.runelite.api.events.HitsplatApplied;
|
import net.runelite.api.events.HitsplatApplied;
|
||||||
import net.runelite.api.events.InteractingChanged;
|
import net.runelite.api.events.InteractingChanged;
|
||||||
import net.runelite.api.events.MenuEntryAdded;
|
|
||||||
import net.runelite.api.events.NpcDespawned;
|
import net.runelite.api.events.NpcDespawned;
|
||||||
import net.runelite.api.events.NpcSpawned;
|
import net.runelite.api.events.NpcSpawned;
|
||||||
import net.runelite.client.chat.ChatColorType;
|
import net.runelite.client.chat.ChatColorType;
|
||||||
@@ -65,10 +61,6 @@ import net.runelite.client.ui.overlay.OverlayManager;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class CorpPlugin extends Plugin
|
public class CorpPlugin extends Plugin
|
||||||
{
|
{
|
||||||
private static final int NPC_SECTION_ACTION = MenuAction.NPC_SECOND_OPTION.getId();
|
|
||||||
private static final String ATTACK = "Attack";
|
|
||||||
private static final String DARK_ENERGY_CORE = "Dark energy core";
|
|
||||||
|
|
||||||
@Getter(AccessLevel.PACKAGE)
|
@Getter(AccessLevel.PACKAGE)
|
||||||
private NPC corp;
|
private NPC corp;
|
||||||
|
|
||||||
@@ -224,28 +216,4 @@ public class CorpPlugin extends Plugin
|
|||||||
|
|
||||||
players.add(source);
|
players.add(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
|
||||||
public void onMenuEntryAdded(MenuEntryAdded menuEntryAdded)
|
|
||||||
{
|
|
||||||
if (menuEntryAdded.getType() != NPC_SECTION_ACTION
|
|
||||||
|| !config.leftClickCore() || !menuEntryAdded.getOption().equals(ATTACK))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final int npcIndex = menuEntryAdded.getIdentifier();
|
|
||||||
final NPC npc = client.getCachedNPCs()[npcIndex];
|
|
||||||
if (npc == null || !npc.getName().equals(DARK_ENERGY_CORE))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// since this is the menu entry add event, this is the last menu entry
|
|
||||||
MenuEntry[] menuEntries = client.getMenuEntries();
|
|
||||||
MenuEntry menuEntry = menuEntries[menuEntries.length - 1];
|
|
||||||
|
|
||||||
menuEntry.setType(NPC_SECTION_ACTION + MENU_ACTION_DEPRIORITIZE_OFFSET);
|
|
||||||
client.setMenuEntries(menuEntries);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user