From c929b3c78fd79650bfc1295587b82e3d59da92f4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 May 2020 13:43:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=80=E9=87=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= 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 f6157cb..3002b92 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -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",