This commit is contained in:
aozhiwei 2022-08-24 10:23:08 +08:00
parent 7390a49301
commit 05e56ec7ce

View File

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