This commit is contained in:
aozhiwei 2023-03-23 15:12:59 +08:00
parent 7fb029fb96
commit 4208e1e715
2 changed files with 6 additions and 2 deletions

View File

@ -3306,7 +3306,7 @@ void Human::CalcStats()
} }
stats->alive_time = alive_time; stats->alive_time = alive_time;
} }
#if 0 #if 1
GetTeam()->team_rank = 1; GetTeam()->team_rank = 1;
#endif #endif
if (GetTeam()->team_rank) { if (GetTeam()->team_rank) {

View File

@ -271,9 +271,10 @@ void Team::GenBattleReportData(a8::MutableXObject* params)
} }
{ {
auto teams_pb = a8::MutableXObject::CreateArray();
room->TraverseTeams room->TraverseTeams
( (
[params] (Team* team) [teams_pb] (Team* team)
{ {
auto members_pb = a8::MutableXObject::CreateArray(); auto members_pb = a8::MutableXObject::CreateArray();
team->TraverseMembers team->TraverseMembers
@ -288,8 +289,10 @@ void Team::GenBattleReportData(a8::MutableXObject* params)
auto team_pb = a8::MutableXObject::CreateObject(); auto team_pb = a8::MutableXObject::CreateObject();
team_pb->SetVal("team_id", team->GetTeamId()); team_pb->SetVal("team_id", team->GetTeamId());
team_pb->SetVal("members", *members_pb); team_pb->SetVal("members", *members_pb);
teams_pb->Push(*team_pb);
return true; return true;
}); });
params->SetVal("team_list", *teams_pb);
} }
{ {
@ -416,6 +419,7 @@ void Team::GenBattleReportData(a8::MutableXObject* params)
} }
members_pb->Push(*member_pb); members_pb->Push(*member_pb);
}; };
params->SetVal("members", *members_pb);
params->SetVal("pvp_team_kills", pvp_team_kills); params->SetVal("pvp_team_kills", pvp_team_kills);
} }