Merge branch 'online' into dev
This commit is contained in:
commit
c9ab65044e
@ -2243,13 +2243,16 @@ 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){
|
||||
float recover_hp = dmg_out *
|
||||
hero->master.Get()->GetBattleContext()->GetBrainLifePct();
|
||||
if (recover_hp > 0.0f) {
|
||||
hero->master.Get()->AddHp(recover_hp);
|
||||
!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