From 05e56ec7ce5777591b28aa24382eb02aef3fbc8e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 24 Aug 2022 10:23:08 +0800 Subject: [PATCH] 1 --- server/gameserver/hero.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/gameserver/hero.cc b/server/gameserver/hero.cc index a558c4d4..00839dba 100644 --- a/server/gameserver/hero.cc +++ b/server/gameserver/hero.cc @@ -256,6 +256,9 @@ void Hero::DecHP(float dec_hp, int killer_id, const std::string& killer_name, in if (GetHP() <= 0.0001f && !IsDead(room)) { BeKill(killer_id, killer_name, weapon_id); } + if (new_health > old_health && room->IsPveRoom()) { + room->pve_data.AddDamageInfo(killer_id, GetUniId(), new_health - old_health); + } room->frame_event.AddHpChg(GetWeakPtrRef()); }