1
This commit is contained in:
parent
aeacf61ade
commit
a76e7cf2ea
@ -2243,14 +2243,17 @@ void Human::OnBulletHit(IBullet* bullet)
|
||||
Hero* hero = (Hero*)bullet->GetSender().Get();
|
||||
if (hero->GetAbility()->GetSwitchTimes(kEnableDmgForwardTimes) > 0 &&
|
||||
hero->master.Get() &&
|
||||
!hero->master.Get()->dead &&
|
||||
hero->master.Get()->GetBattleContext()->GetBrainLifePct() > 0.0f){
|
||||
!hero->master.Get()->dead
|
||||
){
|
||||
if (hero->master.Get()->GetBattleContext()->GetBrainLifePct() > 0.0f) {
|
||||
float recover_hp = dmg_out *
|
||||
hero->master.Get()->GetBattleContext()->GetBrainLifePct();
|
||||
if (recover_hp > 0.0f) {
|
||||
hero->master.Get()->AddHp(recover_hp);
|
||||
}
|
||||
}
|
||||
hero->master.Get()->GetTrigger()->DmgOut(this, dmg_out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user