1
This commit is contained in:
parent
5e1a49a961
commit
e62c621d5b
@ -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)
|
||||
|
@ -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; };
|
||||
|
@ -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; //最大排名
|
||||
|
||||
}
|
||||
|
||||
//离开
|
||||
|
Loading…
x
Reference in New Issue
Block a user