From 6cd6e481ce224767a3cfcffc96f624d087c4ace8 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 15 Dec 2023 23:15:20 +0100 Subject: Resetting guess and burrow locations when clearing the burrows at Diana NPC. --- .../skyhanni/features/event/diana/GriffinBurrowHelper.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/event') diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index b246b374a..f91d6f809 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -110,15 +110,22 @@ object GriffinBurrowHelper { if (event.message.startsWith("§c ☠ §r§7You were killed by §r")) { particleBurrows = particleBurrows.editCopy { keys.removeIf { this[it] == BurrowType.MOB } } } + if (event.message == "§6Poof! §r§eYou have cleared your griffin burrows!") { + reset() + } } @SubscribeEvent fun onWorldChange(event: LorenzWorldChangeEvent) { + reset() + } + + private fun reset() { guessLocation = null targetLocation = null animationLocation = null lastDug = null - particleBurrows = particleBurrows.editCopy { clear() } + particleBurrows = emptyMap() } private fun findBlock(point: LorenzVec): LorenzVec { -- cgit