aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
index 7b337a2e5..cd2f667eb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt
@@ -98,13 +98,14 @@ object EnigmaSoulWaypoints {
val split = event.slot.stack.displayName.split("Enigma: ")
if (split.size == 2) {
event.makePickblock()
- if (soulLocations.contains(split.last())) {
- if (!trackedSouls.contains(split.last())) {
- ChatUtils.chat("§5Tracking the ${split.last()} Enigma Soul!", prefixColor = "§5")
- trackedSouls.add(split.last())
+ val name = split.last()
+ if (soulLocations.contains(name)) {
+ if (!trackedSouls.contains(name)) {
+ ChatUtils.chat("§5Tracking the $name Enigma Soul!", prefixColor = "§5")
+ trackedSouls.add(name)
} else {
- trackedSouls.remove(split.last())
- ChatUtils.chat("§5No longer tracking the ${split.last()} Enigma Soul!", prefixColor = "§5")
+ trackedSouls.remove(name)
+ ChatUtils.chat("§5No longer tracking the $name Enigma Soul!", prefixColor = "§5")
}
}
}