Skip to content

Commit

Permalink
raids: remove party scout message
Browse files Browse the repository at this point in the history
This isn't used much and is superseded by !layout
  • Loading branch information
Adam- committed Jun 15, 2022
1 parent ebda554 commit 0c4f355
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
class RaidsOverlay extends OverlayPanel
{
private static final int OLM_PLANE = 0;
static final String BROADCAST_ACTION = "Broadcast layout";
static final String SCREENSHOT_ACTION = "Screenshot";

private final Client client;
Expand All @@ -74,7 +73,6 @@ private RaidsOverlay(Client client, RaidsPlugin plugin, RaidsConfig config, Worl
this.config = config;
this.worldService = worldService;
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Raids overlay"));
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY, BROADCAST_ACTION, "Raids overlay"));
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY, SCREENSHOT_ACTION, "Raids overlay"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@
import net.runelite.client.events.OverlayMenuClicked;
import net.runelite.client.game.SpriteManager;
import net.runelite.client.input.KeyManager;
import net.runelite.client.party.PartyMember;
import net.runelite.client.party.PartyService;
import net.runelite.client.party.messages.PartyChatMessage;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.raids.events.RaidReset;
Expand Down Expand Up @@ -152,9 +149,6 @@ public class RaidsPlugin extends Plugin
@Inject
private ClientThread clientThread;

@Inject
private PartyService party;

@Inject
private ChatCommandManager chatCommandManager;

Expand Down Expand Up @@ -357,11 +351,7 @@ public void onOverlayMenuClicked(final OverlayMenuClicked event)
return;
}

if (event.getEntry().getOption().equals(RaidsOverlay.BROADCAST_ACTION))
{
sendRaidLayoutMessage();
}
else if (event.getEntry().getOption().equals(RaidsOverlay.SCREENSHOT_ACTION))
if (event.getEntry().getOption().equals(RaidsOverlay.SCREENSHOT_ACTION))
{
screenshotScoutOverlay();
}
Expand Down Expand Up @@ -477,21 +467,11 @@ private void sendRaidLayoutMessage()
.append(raidData)
.build();

final PartyMember localMember = party.getLocalMember();
chatMessageManager.queue(QueuedMessage.builder()
.type(ChatMessageType.FRIENDSCHATNOTIFICATION)
.runeLiteFormattedMessage(layoutMessage)
.build());

if (party.getMembers().isEmpty() || localMember == null)
{
chatMessageManager.queue(QueuedMessage.builder()
.type(ChatMessageType.FRIENDSCHATNOTIFICATION)
.runeLiteFormattedMessage(layoutMessage)
.build());
}
else
{
final PartyChatMessage message = new PartyChatMessage(layoutMessage);
message.setMemberId(localMember.getMemberId());
party.send(message);
}
}

private void updateInfoBoxState()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import net.runelite.client.chat.ChatClient;
import net.runelite.client.config.ChatColorConfig;
import net.runelite.client.config.RuneLiteConfig;
import net.runelite.client.party.PartyService;
import net.runelite.client.ui.overlay.OverlayManager;
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
import net.runelite.client.util.ImageCapture;
Expand Down Expand Up @@ -83,10 +82,6 @@ public class RaidsPluginTest
@Bind
InfoBoxManager infoBoxManager;

@Mock
@Bind
PartyService partyService;

@Mock
@Bind
OverlayManager overlayManager;
Expand Down

0 comments on commit 0c4f355

Please sign in to comment.