僵尸死亡不产生经验

This commit is contained in:
aozhiwei 2020-07-30 09:38:19 +08:00
parent 9153944fd2
commit a9fc65206d

View File

@ -572,21 +572,21 @@ void Room::OnHumanDie(Human* hum)
if (hum->GetRace() == kHumanRace) { if (hum->GetRace() == kHumanRace) {
RemoveRescue(hum); RemoveRescue(hum);
hum->DeadDrop(); hum->DeadDrop();
for (auto& pair : human_hash_) {
if (pair.second != hum) {
pair.second->WinExp(hum, hum->meta->i->dead_exp());
}
}
{
Human* killer = GetPlayerByUniId(hum->stats.killer_id);
if (killer && killer != hum) {
killer->WinExp(hum, hum->meta->i->killer_exp());
}
}
} else if (hum->GetRace() == kZombieRace) { } else if (hum->GetRace() == kZombieRace) {
} else { } else {
abort(); abort();
} }
for (auto& pair : human_hash_) {
if (pair.second != hum) {
pair.second->WinExp(hum, hum->meta->i->dead_exp());
}
}
{
Human* killer = GetPlayerByUniId(hum->stats.killer_id);
if (killer && killer != hum) {
killer->WinExp(hum, hum->meta->i->killer_exp());
}
}
NotifyUiUpdate(); NotifyUiUpdate();
} else { } else {
--alive_count_; --alive_count_;