1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-07-22 19:17:45 +00:00

Send status and hudparam updates after modifying effectmap

This commit is contained in:
Rushi 2025-07-21 21:07:31 +02:00
parent fab2af1fa3
commit c82390b6cf

View file

@ -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;
}