修复血量问题

This commit is contained in:
aozhiwei 2020-05-26 13:43:16 +08:00
parent 60cb263e4d
commit c929b3c78f

View File

@ -3216,7 +3216,7 @@ void Human::AdjustDecHp(float old_health, float& new_health)
{
Buff* buff = GetBuffByEffectId(kBET_NewProtect);
if (buff) {
if (GetHP() < GetMaxHP() * buff->meta->param1) {
if (new_health < GetMaxHP() * buff->meta->param1) {
new_health = std::max(GetMaxHP() * buff->meta->param1, (float)0);
#ifdef DEBUG
a8::UdpLog::Instance()->Debug("触发新手保护buff %d %s %s %f %f",