mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 19:17:45 +00:00
cannot absorb more than target remaining hp
This commit is contained in:
parent
511fc2b35a
commit
659786590c
1 changed files with 2 additions and 0 deletions
|
@ -483,6 +483,8 @@ void Action::Action::buildEffects()
|
|||
auto absorb = Math::CalcStats::calcAbsorbHP( m_pSource, dmg.first, Common::ActionTypeFilter::All );
|
||||
if( absorb > 0 )
|
||||
{
|
||||
if( absorb > actor->getHp() )
|
||||
absorb = actor->getHp();
|
||||
m_effectBuilder->heal( actor, m_pSource, absorb, Common::ActionHitSeverityType::NormalHeal, Common::ActionEffectResultFlag::EffectOnSource );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue