From eb14952e714205426eef0d74ec1d72bd9f3dedea Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 22 May 2020 15:01:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E6=89=8B=E4=BF=9D?= =?UTF-8?q?=E6=8A=A4buff=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/human.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 98e78d7..3cf8571 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -3210,7 +3210,7 @@ void Human::AdjustDecHp(float old_health, float& new_health) Buff* buff = GetBuffByEffectId(kBET_NewProtect); if (buff) { if (GetHP() < GetMaxHP() * buff->meta->param1) { - new_health = GetMaxHP() * buff->meta->param1; + new_health = std::max(GetMaxHP() * buff->meta->param1, GetMaxHP()); } } }