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

Merge pull request #980 from arieshi255/fix-statuseffects

[3.x] Send status and hudparam updates after modifying effectmap
This commit is contained in:
hkAlice 2025-07-21 18:29:39 -03:00 committed by GitHub
commit 2d88379eaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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