This commit is contained in:
aozhiwei 2022-09-28 17:41:56 +08:00
parent d9b974aad6
commit 8136a76143
3 changed files with 11 additions and 0 deletions

View File

@ -607,7 +607,11 @@ void Human::FillMFPlayerStats(cs::MFPlayerStats* stats_pb)
stats_pb->set_history_heal_amount(stats.history_heal_amount);
stats_pb->set_gold(stats.gold);
#if 1
stats_pb->set_score(stats.pve_rank_score);
#else
stats_pb->set_score(stats.score);
#endif
stats_pb->set_pass_score(stats.pass_score);
stats_pb->set_rank_score(stats.rank_score);
stats_pb->set_has_pass(has_pass);

View File

@ -331,6 +331,7 @@ void Incubator::SpawnWaveMon(int wave)
Hero* hero = (Hero*)param.sender.GetUserData();
Human* hum = hero->room->GetOneAlivePlayer();
if (hum) {
hum->room->pve_data.AddDamageInfo(hum->GetUniId(), hero->GetUniId(), 1);
hero->BeKill(hum->GetUniId(), hum->name, hum->GetCurrWeapon()->weapon_id);
} else {
hero->BeKill(VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas);

View File

@ -44,6 +44,9 @@ void PveData::OnBeKill(Hero* hero)
Human* hum = room->GetHumanByUniId(pair.first);
if (hum) {
int win_score = pair.second / total_dmg * base_score;
#ifdef DEBUG
a8::XPrintf("kill_score:%f \n", {win_score});
#endif
hum->WinPveScore(win_score);
}
}
@ -87,6 +90,9 @@ void PveData::OnBeKill(Hero* hero)
[this, win_score] (Human* hum, a8::XParams& param)
{
if (!hum->dead) {
#ifdef DEBUG
a8::XPrintf("round_score:%f \n", {win_score});
#endif
hum->WinPveScore(win_score);
}
return true;