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();
|
Hero* hero = (Hero*)bullet->GetSender().Get();
|
||||||
if (hero->GetAbility()->GetSwitchTimes(kEnableDmgForwardTimes) > 0 &&
|
if (hero->GetAbility()->GetSwitchTimes(kEnableDmgForwardTimes) > 0 &&
|
||||||
hero->master.Get() &&
|
hero->master.Get() &&
|
||||||
!hero->master.Get()->dead &&
|
!hero->master.Get()->dead
|
||||||
hero->master.Get()->GetBattleContext()->GetBrainLifePct() > 0.0f){
|
){
|
||||||
float recover_hp = dmg_out *
|
if (hero->master.Get()->GetBattleContext()->GetBrainLifePct() > 0.0f) {
|
||||||
hero->master.Get()->GetBattleContext()->GetBrainLifePct();
|
float recover_hp = dmg_out *
|
||||||
if (recover_hp > 0.0f) {
|
hero->master.Get()->GetBattleContext()->GetBrainLifePct();
|
||||||
hero->master.Get()->AddHp(recover_hp);
|
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