1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-03 17:27:47 +00:00

stop dot/hot only instead of all statuses in case of a scripted status still wants to update

This commit is contained in:
collett 2023-07-24 08:45:39 +09:00
parent ddbb6b8403
commit c7dc5195f6

View file

@ -355,8 +355,6 @@ bool Sapphire::Entity::Chara::checkAction()
void Sapphire::Entity::Chara::update( uint64_t tickCount ) void Sapphire::Entity::Chara::update( uint64_t tickCount )
{ {
if( isAlive() )
{
updateStatusEffects(); updateStatusEffects();
if( std::difftime( static_cast< time_t >( tickCount ), m_lastTickTime ) > 3000 ) if( std::difftime( static_cast< time_t >( tickCount ), m_lastTickTime ) > 3000 )
@ -365,7 +363,6 @@ void Sapphire::Entity::Chara::update( uint64_t tickCount )
m_lastTickTime = static_cast< time_t >( tickCount ); m_lastTickTime = static_cast< time_t >( tickCount );
} }
}
m_lastUpdate = static_cast< time_t >( tickCount ); m_lastUpdate = static_cast< time_t >( tickCount );
} }
@ -1059,7 +1056,7 @@ void Sapphire::Entity::Chara::onTick()
} }
} }
if( thisTickDmg != 0 ) if( thisTickDmg != 0 && isAlive() )
{ {
thisTickDmg = applyShieldProtection( thisTickDmg ); thisTickDmg = applyShieldProtection( thisTickDmg );
if( thisTickDmg > 0 ) if( thisTickDmg > 0 )
@ -1068,7 +1065,7 @@ void Sapphire::Entity::Chara::onTick()
static_cast< uint8_t >( ActionEffectType::Damage ), thisTickDmg ), true ); static_cast< uint8_t >( ActionEffectType::Damage ), thisTickDmg ), true );
} }
if( thisTickHeal != 0 ) if( thisTickHeal != 0 && isAlive() )
{ {
heal( thisTickHeal ); heal( thisTickHeal );
sendToInRangeSet( makeActorControl( getId(), HPFloatingText, 0, sendToInRangeSet( makeActorControl( getId(), HPFloatingText, 0,