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