From c82390b6cf593a2cb36ccb751435244e56cabdb1 Mon Sep 17 00:00:00 2001 From: Rushi <44952533+Skyliegirl33@users.noreply.github.com> Date: Mon, 21 Jul 2025 21:07:31 +0200 Subject: [PATCH] Send status and hudparam updates after modifying effectmap --- src/world/Actor/Chara.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/world/Actor/Chara.cpp b/src/world/Actor/Chara.cpp index 7a068c90..1d88ee8e 100644 --- a/src/world/Actor/Chara.cpp +++ b/src/world/Actor/Chara.cpp @@ -606,12 +606,6 @@ std::map< uint8_t, Sapphire::StatusEffect::StatusEffectPtr >::iterator Chara::re auto pEffect = pEffectIt->second; pEffect->removeStatus(); - if( updateStatus ) - { - Network::Util::Packet::sendActorControl( getInRangePlayerIds( isPlayer() ), getId(), StatusEffectLose, pEffect->getId() ); - Network::Util::Packet::sendHudParam( *this ); - } - auto it = m_statusEffectMap.erase( pEffectIt ); for( auto effectIt = it; effectIt != m_statusEffectMap.end(); ) @@ -635,6 +629,12 @@ std::map< uint8_t, Sapphire::StatusEffect::StatusEffectPtr >::iterator Chara::re Logger::warn( "Slot id being freed: {}", effectSlotId ); + if( updateStatus ) + { + Network::Util::Packet::sendActorControl( getInRangePlayerIds( isPlayer() ), getId(), StatusEffectLose, pEffect->getId() ); + Network::Util::Packet::sendHudParam( *this ); + } + return it; }