添加新手保护buff处理

This commit is contained in:
aozhiwei 2020-05-22 15:01:59 +08:00
parent 457c25096d
commit eb14952e71

View File

@ -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());
}
}
}