1
This commit is contained in:
parent
af6955400f
commit
7dcc460ea2
@ -951,6 +951,7 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
||||
}
|
||||
msg.set_team_id(team_id);
|
||||
msg.set_team_rank(stats.rank);
|
||||
msg.set_personal_rank(stats.rank);
|
||||
msg.set_team_allcnt(1);
|
||||
msg.set_game_over(room->IsGameOver() || (alive_team_num == 1));
|
||||
msg.set_victory(!dead);
|
||||
@ -974,12 +975,54 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
||||
cs::MFPlayerStats* p = msg.add_player_stats();
|
||||
FillMFPlayerStats(p);
|
||||
}
|
||||
{
|
||||
msg.set_total_team_num(room->GetTeamNum());
|
||||
if (room->IsPveRoom()) {
|
||||
msg.set_pve_wave(room->pve_data.wave);
|
||||
msg.set_pve_max_wave(room->pve_data.max_wave);
|
||||
msg.set_pve_instance_id(room->pve_instance->pb->gemini_id());
|
||||
}
|
||||
}
|
||||
{
|
||||
for (auto& pair : spoils_items) {
|
||||
auto p = msg.add_spoils_items();
|
||||
p->add_values(pair.first);
|
||||
p->add_values(pair.second);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
{
|
||||
{
|
||||
auto p = msg.add_spoils_items();
|
||||
p->add_values(10001);
|
||||
p->add_values(1000);
|
||||
}
|
||||
{
|
||||
int items[] = {
|
||||
110101,
|
||||
110111,
|
||||
110121,
|
||||
110131,
|
||||
110141,
|
||||
110151,
|
||||
110161,
|
||||
110171,
|
||||
110181,
|
||||
110201,
|
||||
110211,
|
||||
110221,
|
||||
110231,
|
||||
110241,
|
||||
110251,
|
||||
110261,
|
||||
110271,
|
||||
110281
|
||||
};
|
||||
auto p = msg.add_spoils_items();
|
||||
p->add_values(10001);
|
||||
p->add_values(1000);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
stats.CalcReward(this, stats.rank, stats.kills);
|
||||
TypeConvert::ToPb(stats.over_reward, msg.mutable_reward());
|
||||
|
@ -949,6 +949,11 @@ int Room::GetAliveTeamNum()
|
||||
return num;
|
||||
}
|
||||
|
||||
int Room::GetTeamNum()
|
||||
{
|
||||
return team_hash_.size();
|
||||
}
|
||||
|
||||
bool Room::CanJoin(const std::string& accountid,
|
||||
RoomType_e self_room_type,
|
||||
RoomMode_e self_room_mode,
|
||||
|
@ -188,6 +188,7 @@ public:
|
||||
bool OverBorder(const a8::Vec2& pos, ColliderComponent* collider);
|
||||
Human* GetWatchWarTarget(Human* hum);
|
||||
bool BattleStarted();
|
||||
int GetTeamNum();
|
||||
int GetAliveTeamNum();
|
||||
Team* GetAliveTeam();
|
||||
bool CanJoin(const std::string& accountid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user