From 8e06383d1a92493fdc4295763798211ae910b62c Mon Sep 17 00:00:00 2001 From: Ganom Date: Fri, 17 May 2019 16:51:13 -0400 Subject: [PATCH 1/4] Update to Raids, fixes timer issue aswell. --- .../client/plugins/raids/RaidsConfig.java | 32 +++- .../client/plugins/raids/RaidsOverlay.java | 39 +++-- .../client/plugins/raids/RaidsPlugin.java | 105 +++++++----- .../client/plugins/raids/RaidsTimer.java | 150 ++++++++++++++++++ 4 files changed, 258 insertions(+), 68 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsTimer.java diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java index 14f5add239..751e25d2f2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2018, Kamiel + * Copyright (c) 2019, ganom * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,8 +36,8 @@ public interface RaidsConfig extends Config @ConfigItem( position = 0, keyName = "raidsTimer", - name = "Level time tooltip", - description = "Displays your level times as a tooltip on the points overlay" + name = "Display elapsed raid time", + description = "Display elapsed raid time" ) default boolean raidsTimer() { @@ -168,8 +169,7 @@ public interface RaidsConfig extends Config position = 12, keyName = "enhanceScouterTitle", name = "Enhance scouter title", - description = "Adds #combat and good puzzles to scouter title", - hidden = true + description = "Adds #combat and good puzzles to scouter title" ) default boolean enhanceScouterTitle() { @@ -288,6 +288,28 @@ public interface RaidsConfig extends Config @ConfigItem( position = 25, + keyName = "hideVanguards", + name = "Hide Vanguard raids", + description = "Completely hides raids with Vanguards" + ) + default boolean hideVanguards() + { + return false; + } + + @ConfigItem( + position = 26, + keyName = "hideUnknownCombat", + name = "Hide Unknown combat raids", + description = "Completely hides raids with Unknown combat" + ) + default boolean hideUnknownCombat() + { + return false; + } + + @ConfigItem( + position = 27, keyName = "layoutMessage", name = "Send raid layout message when entering raid", description = "Sends game message with raid layout on entering new raid" @@ -298,7 +320,7 @@ public interface RaidsConfig extends Config } @ConfigItem( - position = 26, + position = 28, keyName = "displayFloorBreak", name = "Layout floor break", description = "Displays floor break in layout" diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java index de7fd5779a..b70bf23621 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2018, Kamiel + * Copyright (c) 2019, ganom * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -151,7 +152,10 @@ public class RaidsOverlay extends Overlay boolean iceDemon = false; boolean tightrope = false; boolean thieving = false; + boolean vanguards = false; + boolean unknownCombat = false; String puzzles = ""; + String roomName = ""; if (config.enhanceScouterTitle() || config.scavsBeforeIce() || sharable) { for (Room layoutRoom : plugin.getRaid().getLayout().getRooms()) @@ -168,9 +172,19 @@ public class RaidsOverlay extends Overlay { case COMBAT: combatCount++; + roomName = room.getBoss().getName(); + switch (RaidRoom.Boss.fromString(roomName)) + { + case VANGUARDS: + vanguards = true; + break; + case UNKNOWN: + unknownCombat = true; + break; + } break; case PUZZLE: - String roomName = room.getPuzzle().getName(); + roomName = room.getPuzzle().getName(); switch (RaidRoom.Puzzle.fromString(roomName)) { case CRABS: @@ -195,13 +209,12 @@ public class RaidsOverlay extends Overlay roomCount++; } if (tightrope) - { puzzles = crabs ? "cr" : iceDemon ? "ri" : thieving ? "tr" : "?r"; - } - else if (config.hideRopeless()) + + if ((config.hideVanguards() && vanguards) || (config.hideRopeless() && !tightrope) || (config.hideUnknownCombat() && unknownCombat)) { panelComponent.getChildren().add(TitleComponent.builder() - .text("No Tightrope!") + .text("Bad Raid!") .color(Color.RED) .build()); @@ -217,9 +230,7 @@ public class RaidsOverlay extends Overlay for (Integer s : scavRooms) { if (s > i) - { break; - } prev = s; } scavsBeforeIceRooms.add(prev); @@ -288,9 +299,7 @@ public class RaidsOverlay extends Overlay if (config.showRecommendedItems()) { if (plugin.getRecommendedItemsList().get(bossNameLC) != null) - { imageIds.addAll(plugin.getRecommendedItemsList().get(bossNameLC)); - } } panelComponent.getChildren().add(LineComponent.builder() @@ -305,9 +314,7 @@ public class RaidsOverlay extends Overlay String puzzleName = room.getPuzzle().getName(); String puzzleNameLC = puzzleName.toLowerCase(); if (plugin.getRecommendedItemsList().get(puzzleNameLC) != null) - { imageIds.addAll(plugin.getRecommendedItemsList().get(puzzleNameLC)); - } if (plugin.getRoomWhitelist().contains(puzzleNameLC)) { color = Color.GREEN; @@ -411,25 +418,15 @@ public class RaidsOverlay extends Overlay { BufferedImage bim; if (id != SpriteID.SPELL_ICE_BARRAGE) - { bim = itemManager.getImage(id); - } else - { bim = spriteManager.getSprite(id, 0); - } if (bim == null) - { return null; - } if (!small) - { return ImageUtil.resizeCanvas(bim, ICON_SIZE, ICON_SIZE); - } if (id != SpriteID.SPELL_ICE_BARRAGE) - { return ImageUtil.resizeImage(bim, SMALL_ICON_SIZE, SMALL_ICON_SIZE); - } return ImageUtil.resizeCanvas(bim, SMALL_ICON_SIZE, SMALL_ICON_SIZE); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java index 772a9b1b48..615c582606 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2018, Kamiel + * Copyright (c) 2019, ganom * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +29,7 @@ import com.google.inject.Binder; import com.google.inject.Provides; import java.awt.image.BufferedImage; import java.text.DecimalFormat; +import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -48,6 +50,7 @@ import net.runelite.api.NullObjectID; import static net.runelite.api.Perspective.SCENE_SIZE; import net.runelite.api.Point; import net.runelite.api.SpriteID; +import static net.runelite.api.SpriteID.TAB_QUESTS_BROWN_RAIDING_PARTY; import net.runelite.api.Tile; import net.runelite.api.VarPlayer; import net.runelite.api.Varbits; @@ -96,6 +99,9 @@ import org.apache.commons.lang3.StringUtils; public class RaidsPlugin extends Plugin { private static final int LOBBY_PLANE = 3; + private static final String RAID_START_MESSAGE = "The raid has begun!"; + private static final String LEVEL_COMPLETE_MESSAGE = "level complete!"; + private static final String RAID_COMPLETE_MESSAGE = "Congratulations - your raid is complete!"; private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("###.##"); static final DecimalFormat POINTS_FORMAT = new DecimalFormat("#,###"); private static final String SPLIT_REGEX = "\\s*,\\s*"; @@ -181,6 +187,7 @@ public class RaidsPlugin extends Plugin private String tooltip; public boolean canShow; private NavigationButton navButton; + private RaidsTimer timer; @Provides RaidsConfig provideConfig(ConfigManager configManager) @@ -220,9 +227,11 @@ public class RaidsPlugin extends Plugin overlayManager.remove(overlay); overlayManager.remove(pointsOverlay); clientToolbar.removeNavigation(navButton); + infoBoxManager.removeInfoBox(timer); inRaidChambers = false; widgetOverlay = null; raid = null; + timer = null; final Widget widget = client.getWidget(WidgetInfo.RAIDS_POINTS_INFOBOX); if (widget != null) @@ -240,6 +249,12 @@ public class RaidsPlugin extends Plugin return; } + if (event.getKey().equals("raidsTimer")) + { + updateInfoBoxState(); + return; + } + updateLists(); clientThread.invokeLater(() -> checkRaidPresence(true)); } @@ -274,26 +289,26 @@ public class RaidsPlugin extends Plugin String message = Text.removeTags(event.getMessage()); Matcher matcher; - matcher = LEVEL_COMPLETE_REGEX.matcher(message); - if (matcher.find()) + if (config.raidsTimer() && message.startsWith(RAID_START_MESSAGE)) { - String floor = matcher.group(1); - int time = timeToSeconds(matcher.group(2)); - if (floor.equals("Upper")) + timer = new RaidsTimer(spriteManager.getSprite(TAB_QUESTS_BROWN_RAIDING_PARTY, 0), this, Instant.now()); + infoBoxManager.addInfoBox(timer); + } + + if (timer != null && message.contains(LEVEL_COMPLETE_MESSAGE)) + { + timer.timeFloor(); + } + + if (message.startsWith(RAID_COMPLETE_MESSAGE)) + { + if (timer != null) { - upperTime = time; - } - else if (floor.equals("Middle")) - { - middleTime = time; - } - else if (floor.equals("Lower")) - { - lowerTime = time; + timer.timeOlm(); + timer.setStopped(true); } updateTooltip(); } - matcher = RAID_COMPLETE_REGEX.matcher(message); if (matcher.find()) { @@ -410,6 +425,7 @@ public class RaidsPlugin extends Plugin if (force || inRaidChambers != setting) { inRaidChambers = setting; + updateInfoBoxState(); if (inRaidChambers) { @@ -434,14 +450,9 @@ public class RaidsPlugin extends Plugin overlay.setScoutOverlayShown(true); sendRaidLayoutMessage(); } - else + else if (!config.scoutOverlayAtBank()) { - if (!config.scoutOverlayAtBank()) - { - overlay.setScoutOverlayShown(false); - } - - reset(); + overlay.setScoutOverlayShown(false); } } @@ -474,6 +485,30 @@ public class RaidsPlugin extends Plugin .build()); } + private void updateInfoBoxState() + { + if (timer == null) + { + return; + } + + if (inRaidChambers && config.raidsTimer()) + { + if (!infoBoxManager.getInfoBoxes().contains(timer)) + { + infoBoxManager.addInfoBox(timer); + } + } + else + { + infoBoxManager.removeInfoBox(timer); + } + + if (!inRaidChambers) + { + timer = null; + } + } private void updateLists() { @@ -494,14 +529,10 @@ public class RaidsPlugin extends Plugin String everything = m.group(1).toLowerCase(); int split = everything.indexOf(','); if (split < 0) - { continue; - } String key = everything.substring(0, split); if (key.length() < 1) - { continue; - } String[] itemNames = everything.substring(split).split(SPLIT_REGEX); map.computeIfAbsent(key, k -> new ArrayList<>()); @@ -509,25 +540,15 @@ public class RaidsPlugin extends Plugin for (String itemName : itemNames) { if (itemName.equals("")) - { continue; - } if (itemName.equals("ice barrage")) - { map.get(key).add(SpriteID.SPELL_ICE_BARRAGE); - } else if (itemName.startsWith("salve")) - { map.get(key).add(ItemID.SALVE_AMULETEI); - } else if (itemManager.search(itemName).size() > 0) - { map.get(key).add(itemManager.search(itemName).get(0).getId()); - } else - { log.info("RaidsPlugin: Could not find an item ID for item: " + itemName); - } } } } @@ -817,7 +838,7 @@ public class RaidsPlugin extends Plugin StringBuilder builder = new StringBuilder(); if (seconds >= 3600) { - builder.append((int) Math.floor(seconds / 3600)).append(";"); + builder.append((int) Math.floor(seconds / 3600) + ";"); } seconds %= 3600; if (builder.toString().equals("")) @@ -842,7 +863,7 @@ public class RaidsPlugin extends Plugin tooltip = null; return; } - builder.append("Upper level: ").append(secondsToTime(upperTime)); + builder.append("Upper level: " + secondsToTime(upperTime)); if (middleTime == -1) { if (lowerTime == -1) @@ -852,12 +873,12 @@ public class RaidsPlugin extends Plugin } else { - builder.append("
Lower level: ").append(secondsToTime(lowerTime - upperTime)); + builder.append("
Lower level: " + secondsToTime(lowerTime - upperTime)); } } else { - builder.append("
Middle level: ").append(secondsToTime(middleTime - upperTime)); + builder.append("
Middle level: " + secondsToTime(middleTime - upperTime)); if (lowerTime == -1) { tooltip = builder.toString(); @@ -865,7 +886,7 @@ public class RaidsPlugin extends Plugin } else { - builder.append("
Lower level: ").append(secondsToTime(lowerTime - middleTime)); + builder.append("
Lower level: " + secondsToTime(lowerTime - middleTime)); } } if (raidTime == -1) @@ -873,7 +894,7 @@ public class RaidsPlugin extends Plugin tooltip = builder.toString(); return; } - builder.append("
Olm: ").append(secondsToTime(raidTime - lowerTime)); + builder.append("
Olm: " + secondsToTime(raidTime - lowerTime)); tooltip = builder.toString(); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsTimer.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsTimer.java new file mode 100644 index 0000000000..8df3087054 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsTimer.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2018, Kamiel + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.plugins.raids; + +import java.awt.Color; +import java.awt.image.BufferedImage; +import java.time.Duration; +import java.time.Instant; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import lombok.Setter; +import net.runelite.client.plugins.Plugin; +import net.runelite.client.ui.overlay.infobox.InfoBox; + +public class RaidsTimer extends InfoBox +{ + private final Instant startTime; + private Instant floorTime; + private LocalTime time; + private LocalTime firstFloorTime; + private LocalTime secondFloorTime; + private LocalTime thirdFloorTime; + private LocalTime olmTime; + + @Setter + private boolean stopped; + + public RaidsTimer(BufferedImage image, Plugin plugin, Instant startTime) + { + super(image, plugin); + this.startTime = startTime; + floorTime = startTime; + stopped = false; + } + + public void timeFloor() + { + Duration elapsed = Duration.between(floorTime, Instant.now()); + + if (firstFloorTime == null) + { + firstFloorTime = LocalTime.ofSecondOfDay(elapsed.getSeconds()); + } + else if (secondFloorTime == null) + { + secondFloorTime = LocalTime.ofSecondOfDay(elapsed.getSeconds()); + } + else if (thirdFloorTime == null) + { + thirdFloorTime = LocalTime.ofSecondOfDay(elapsed.getSeconds()); + } + + floorTime = Instant.now(); + } + + public void timeOlm() + { + Duration elapsed = Duration.between(floorTime, Instant.now()); + olmTime = LocalTime.ofSecondOfDay(elapsed.getSeconds()); + } + + @Override + public String getText() + { + if (startTime == null) + { + return ""; + } + + if (!stopped) + { + Duration elapsed = Duration.between(startTime, Instant.now()); + time = LocalTime.ofSecondOfDay(elapsed.getSeconds()); + } + + if (time.getHour() > 0) + { + return time.format(DateTimeFormatter.ofPattern("HH:mm")); + } + + return time.format(DateTimeFormatter.ofPattern("mm:ss")); + } + + @Override + public Color getTextColor() + { + if (stopped) + { + return Color.GREEN; + } + + return Color.WHITE; + } + + @Override + public String getTooltip() + { + StringBuilder builder = new StringBuilder(); + builder.append("Elapsed raid time: "); + builder.append(time.format(DateTimeFormatter.ofPattern("HH:mm:ss"))); + + if (firstFloorTime != null) + { + builder.append("
First floor: "); + builder.append(firstFloorTime.format(DateTimeFormatter.ofPattern("mm:ss"))); + } + + if (secondFloorTime != null) + { + builder.append("
Second floor: "); + builder.append(secondFloorTime.format(DateTimeFormatter.ofPattern("mm:ss"))); + } + + if (thirdFloorTime != null) + { + builder.append("
Third floor: "); + builder.append(thirdFloorTime.format(DateTimeFormatter.ofPattern("mm:ss"))); + } + + if (olmTime != null) + { + builder.append("
Olm: "); + builder.append(olmTime.format(DateTimeFormatter.ofPattern("mm:ss"))); + } + + return builder.toString(); + } +} From c8b556f391890fd141a9b5a15c3deb0e70221455 Mon Sep 17 00:00:00 2001 From: Ganom Date: Sat, 18 May 2019 12:27:34 -0400 Subject: [PATCH 2/4] Adding Braces --- .../runelite/client/plugins/raids/RaidsPlugin.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java index 615c582606..92dfdbbc14 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java @@ -529,10 +529,14 @@ public class RaidsPlugin extends Plugin String everything = m.group(1).toLowerCase(); int split = everything.indexOf(','); if (split < 0) + { continue; + } String key = everything.substring(0, split); if (key.length() < 1) + { continue; + } String[] itemNames = everything.substring(split).split(SPLIT_REGEX); map.computeIfAbsent(key, k -> new ArrayList<>()); @@ -540,15 +544,25 @@ public class RaidsPlugin extends Plugin for (String itemName : itemNames) { if (itemName.equals("")) + { continue; + } if (itemName.equals("ice barrage")) + { map.get(key).add(SpriteID.SPELL_ICE_BARRAGE); + } else if (itemName.startsWith("salve")) + { map.get(key).add(ItemID.SALVE_AMULETEI); + } else if (itemManager.search(itemName).size() > 0) + { map.get(key).add(itemManager.search(itemName).get(0).getId()); + } else + { log.info("RaidsPlugin: Could not find an item ID for item: " + itemName); + } } } } From 2347253b269791310e19e5aaa51fe1b71d02ba7b Mon Sep 17 00:00:00 2001 From: Ganom Date: Sat, 18 May 2019 12:28:53 -0400 Subject: [PATCH 3/4] Adding Braces --- .../client/plugins/raids/RaidsOverlay.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java index b70bf23621..784b2a9afe 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java @@ -209,7 +209,9 @@ public class RaidsOverlay extends Overlay roomCount++; } if (tightrope) + { puzzles = crabs ? "cr" : iceDemon ? "ri" : thieving ? "tr" : "?r"; + } if ((config.hideVanguards() && vanguards) || (config.hideRopeless() && !tightrope) || (config.hideUnknownCombat() && unknownCombat)) { @@ -230,7 +232,9 @@ public class RaidsOverlay extends Overlay for (Integer s : scavRooms) { if (s > i) + { break; + } prev = s; } scavsBeforeIceRooms.add(prev); @@ -299,7 +303,9 @@ public class RaidsOverlay extends Overlay if (config.showRecommendedItems()) { if (plugin.getRecommendedItemsList().get(bossNameLC) != null) + { imageIds.addAll(plugin.getRecommendedItemsList().get(bossNameLC)); + } } panelComponent.getChildren().add(LineComponent.builder() @@ -314,7 +320,9 @@ public class RaidsOverlay extends Overlay String puzzleName = room.getPuzzle().getName(); String puzzleNameLC = puzzleName.toLowerCase(); if (plugin.getRecommendedItemsList().get(puzzleNameLC) != null) + { imageIds.addAll(plugin.getRecommendedItemsList().get(puzzleNameLC)); + } if (plugin.getRoomWhitelist().contains(puzzleNameLC)) { color = Color.GREEN; @@ -418,15 +426,25 @@ public class RaidsOverlay extends Overlay { BufferedImage bim; if (id != SpriteID.SPELL_ICE_BARRAGE) + { bim = itemManager.getImage(id); + } else + { bim = spriteManager.getSprite(id, 0); + } if (bim == null) + { return null; + } if (!small) + { return ImageUtil.resizeCanvas(bim, ICON_SIZE, ICON_SIZE); + } if (id != SpriteID.SPELL_ICE_BARRAGE) + { return ImageUtil.resizeImage(bim, SMALL_ICON_SIZE, SMALL_ICON_SIZE); + } return ImageUtil.resizeCanvas(bim, SMALL_ICON_SIZE, SMALL_ICON_SIZE); } } From 4dc9d2f60c9247f32787e51907e3af87187c6c48 Mon Sep 17 00:00:00 2001 From: Ganom Date: Sat, 18 May 2019 12:32:28 -0400 Subject: [PATCH 4/4] Revert append change. --- .../net/runelite/client/plugins/raids/RaidsPlugin.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java index 92dfdbbc14..4c0b9fc28c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java @@ -877,7 +877,7 @@ public class RaidsPlugin extends Plugin tooltip = null; return; } - builder.append("Upper level: " + secondsToTime(upperTime)); + builder.append("Upper level: ").append(secondsToTime(upperTime)); if (middleTime == -1) { if (lowerTime == -1) @@ -887,12 +887,12 @@ public class RaidsPlugin extends Plugin } else { - builder.append("
Lower level: " + secondsToTime(lowerTime - upperTime)); + builder.append("
Lower level: ").append(secondsToTime(lowerTime - upperTime)); } } else { - builder.append("
Middle level: " + secondsToTime(middleTime - upperTime)); + builder.append("
Middle level: ").append(secondsToTime(middleTime - upperTime)); if (lowerTime == -1) { tooltip = builder.toString(); @@ -900,7 +900,7 @@ public class RaidsPlugin extends Plugin } else { - builder.append("
Lower level: " + secondsToTime(lowerTime - middleTime)); + builder.append("
Lower level: ").append(secondsToTime(lowerTime - middleTime)); } } if (raidTime == -1) @@ -908,7 +908,7 @@ public class RaidsPlugin extends Plugin tooltip = builder.toString(); return; } - builder.append("
Olm: " + secondsToTime(raidTime - lowerTime)); + builder.append("
Olm: ").append(secondsToTime(raidTime - lowerTime)); tooltip = builder.toString(); } }