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:
parent
ddbb6b8403
commit
c7dc5195f6
1 changed files with 7 additions and 10 deletions
|
@ -355,16 +355,13 @@ bool Sapphire::Entity::Chara::checkAction()
|
||||||
|
|
||||||
void Sapphire::Entity::Chara::update( uint64_t tickCount )
|
void Sapphire::Entity::Chara::update( uint64_t tickCount )
|
||||||
{
|
{
|
||||||
if( isAlive() )
|
updateStatusEffects();
|
||||||
|
|
||||||
|
if( std::difftime( static_cast< time_t >( tickCount ), m_lastTickTime ) > 3000 )
|
||||||
{
|
{
|
||||||
updateStatusEffects();
|
onTick();
|
||||||
|
|
||||||
if( std::difftime( static_cast< time_t >( tickCount ), m_lastTickTime ) > 3000 )
|
m_lastTickTime = static_cast< time_t >( tickCount );
|
||||||
{
|
|
||||||
onTick();
|
|
||||||
|
|
||||||
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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue