1
This commit is contained in:
parent
28844db74d
commit
2101c68196
@ -1,5 +1,6 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include <a8/mutable_xobject.h>
|
||||
#include "team.h"
|
||||
|
||||
#include "human.h"
|
||||
@ -8,6 +9,9 @@
|
||||
#include "bornpoint.h"
|
||||
#include "battledatacontext.h"
|
||||
|
||||
#include "mt/Map.h"
|
||||
#include "mt/PveGemini.h"
|
||||
|
||||
void Team::TraverseMembers(std::function<bool (Human*)> func)
|
||||
{
|
||||
for (Human* member : members_) {
|
||||
@ -187,3 +191,22 @@ void Team::SendTeamBattleReport(Human* sender)
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
void Team::GenBattleReportData(a8::MutableXObject* params)
|
||||
{
|
||||
params->SetVal("version", 2023030201);
|
||||
params->SetVal("room_uuid", a8::XValue(room->GetRoomUuid()));
|
||||
params->SetVal("room_mode", room->IsPveRoom() ? 0 : 1);
|
||||
params->SetVal("team_id", GetTeamId());
|
||||
params->SetVal("map_id", room->GetMapMeta()->map_id());
|
||||
params->SetVal("victory", room->IsPveRoom() ? 0 : team_rank == 1);
|
||||
|
||||
if (room->IsPveRoom()) {
|
||||
params->SetVal("pve_settelement_type", 1);
|
||||
params->SetVal("pve_instance_id", room->pve_instance->gemini_id());
|
||||
params->SetVal("pve_wave", room->pve_data.GetPassedWave());
|
||||
params->SetVal("pve_max_wave", room->pve_data.max_wave);
|
||||
} else {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,6 +5,11 @@ namespace cs
|
||||
class SMGameOver;
|
||||
}
|
||||
|
||||
namespace a8
|
||||
{
|
||||
class MutableXObject;
|
||||
}
|
||||
|
||||
class Room;
|
||||
class Human;
|
||||
class Team
|
||||
@ -40,6 +45,7 @@ class Team
|
||||
bool HasPlayer();
|
||||
void FillSMGameOver(cs::SMGameOver& msg);
|
||||
void SendTeamBattleReport(Human* sender);
|
||||
void GenBattleReportData(a8::MutableXObject* params);
|
||||
|
||||
private:
|
||||
int team_id_ = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user