This commit is contained in:
aozhiwei 2022-09-26 11:44:28 +08:00
parent 5e1a49a961
commit e62c621d5b
3 changed files with 30 additions and 0 deletions

View File

@ -974,6 +974,7 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
if (stats.pve_kill_boss) {
stats.victory = true;
}
} else {
}
if (stats.victory) {
@ -1046,6 +1047,29 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
p->add_values(std::get<1>(tuple));
}
}
{
if (room->IsPveRoom()) {
msg.set_mode(GetTeam()->GetMemberNum() <= 1 ? 1 : 2);
msg.set_my_rank(room->pve_data.wave);
msg.set_max_rank(room->pve_data.max_wave);
} else {
if (GetTeam()->GetMemberNum() <= 1) {
msg.set_mode(1);
msg.set_my_rank(stats.rank);
msg.set_max_rank(room->GetHumanNum());
} else {
if (GetTeam()->team_rank <= 0) {
msg.set_mode(1);
msg.set_my_rank(stats.rank);
msg.set_max_rank(room->GetHumanNum());
} else {
msg.set_mode(2);
msg.set_my_rank(GetTeam()->team_rank);
msg.set_max_rank(room->GetTeamNum());
}
}
}
}
}
void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id)

View File

@ -6,6 +6,7 @@ class Team
{
public:
Room* room = nullptr;
int team_rank = 0;
void SetInitTeamMemberNum(int init_num) { init_team_member_num_ = init_num; };
void SetAutoFill(bool auto_fill) { auto_fill_ = auto_fill; };

View File

@ -1144,6 +1144,11 @@ message SMGameOver
optional int32 pve_max_wave = 18; //pve总波次
optional int32 pve_instance_id = 19; //pve副本id
optional int32 map_id = 20; //id
optional int32 mode = 21; //1: 2:
optional int32 my_rank = 22; //
optional int32 max_rank = 23; //
}
//