From 6d6867fb09be155654ae5a401ed230aa4d9cd8a6 Mon Sep 17 00:00:00 2001 From: GDWR Date: Sat, 25 Mar 2023 22:03:37 +0000 Subject: [PATCH] Update state on client side when capture fails --- CHANGELOG.md | 1 + .../mod/common/client/net/battle/BattleCaptureEndHandler.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6592dec29..1e0ae3f7ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ - Fixed a Pokémon duplication glitch when teleporting between worlds. - Fixed dedicated servers being able to reload Cobblemon data with the vanilla ``/reload`` command causing unintended behavior for clients. - Fixed underground Pokémon spawning above ground. +- Fixed Pokémon portrait not reverting back to the Pokémon after a failed capture during battle. ### Developer - Add events that are being fired just before and after a Pokémon is being released (ReleasePokemonEvent) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/client/net/battle/BattleCaptureEndHandler.kt b/common/src/main/kotlin/com/cobblemon/mod/common/client/net/battle/BattleCaptureEndHandler.kt index c050c27549..a9b877d4ff 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/client/net/battle/BattleCaptureEndHandler.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/client/net/battle/BattleCaptureEndHandler.kt @@ -24,5 +24,6 @@ object BattleCaptureEndHandler : ClientPacketHandler { } else { activeBattlePokemon.ballCapturing?.finish() } + activeBattlePokemon.ballCapturing = null } } \ No newline at end of file