From 890ef965202a418024ceb5fb46b51d9e27fe6918 Mon Sep 17 00:00:00 2001 From: Natalia Spence <52349324+Septikai@users.noreply.github.com> Date: Wed, 12 Nov 2025 13:06:52 +0000 Subject: fix: reset on profile switch --- src/main/kotlin/features/inventory/PetFeatures.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/kotlin/features/inventory/PetFeatures.kt b/src/main/kotlin/features/inventory/PetFeatures.kt index cdac6a0..646989c 100644 --- a/src/main/kotlin/features/inventory/PetFeatures.kt +++ b/src/main/kotlin/features/inventory/PetFeatures.kt @@ -11,6 +11,7 @@ import moe.nea.firmament.Firmament import moe.nea.firmament.annotations.Subscribe import moe.nea.firmament.events.HudRenderEvent import moe.nea.firmament.events.ProcessChatEvent +import moe.nea.firmament.events.ProfileSwitchEvent import moe.nea.firmament.events.SlotClickEvent import moe.nea.firmament.events.SlotRenderEvents import moe.nea.firmament.jarvis.JarvisIntegration @@ -73,6 +74,14 @@ object PetFeatures { private var tempTabPet: ParsedPet? = null private var tempChatPet: ParsedPet? = null + @Subscribe + fun onProfileSwitch(event: ProfileSwitchEvent) { + petMap.clear() + currentPetUUID = "" + tempTabPet = null + tempChatPet = null + } + @Subscribe fun onSlotRender(event: SlotRenderEvents.Before) { // Cache pets @@ -120,7 +129,6 @@ object PetFeatures { @Subscribe fun onChatEvent(event: ProcessChatEvent) { - println("^^^" + event.text.formattedString() + "$$$") // Handle AutoPet var matcher = autopetPattern.matcher(event.text.formattedString()) if (matcher.matches()) { -- cgit