1
This commit is contained in:
parent
ed389d54e6
commit
a84dd83bf9
@ -2211,7 +2211,30 @@ void Room::OnGameOver()
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
|
||||
Player* player = nullptr;
|
||||
TraversePlayerList
|
||||
(
|
||||
[&player] (Player* hum) -> bool
|
||||
{
|
||||
player = hum;
|
||||
return true;
|
||||
});
|
||||
if (!player) {
|
||||
return;
|
||||
}
|
||||
std::string url;
|
||||
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "c=Battle&a=roomReport";
|
||||
} else {
|
||||
url += "?c=Battle&a=roomReport";
|
||||
}
|
||||
std::shared_ptr<a8::MutableXObject> params = a8::MutableXObject::CreateObject();
|
||||
std::shared_ptr<a8::MutableXObject> post_data = a8::MutableXObject::CreateObject();
|
||||
params->SetVal("account_id", player->account_id);
|
||||
params->SetVal("session_id", player->session_id);
|
||||
params->SetVal("__POST", post_data->ToJsonStr());
|
||||
GenBattleRoomReportData(post_data.get());
|
||||
}
|
||||
int param1 = 1;
|
||||
xtimer.SetIntervalEx
|
||||
@ -3888,29 +3911,6 @@ int Room::GetReportMapMode()
|
||||
|
||||
void Room::GenBattleRoomReportData(a8::MutableXObject* params)
|
||||
{
|
||||
Player* player = nullptr;
|
||||
TraversePlayerList
|
||||
(
|
||||
[&player] (Player* hum) -> bool
|
||||
{
|
||||
player = hum;
|
||||
return true;
|
||||
});
|
||||
if (!player) {
|
||||
return;
|
||||
}
|
||||
std::string url;
|
||||
JsonDataMgr::Instance()->GetApiUrl(url);
|
||||
if (url.find('?') != std::string::npos) {
|
||||
url += "c=Battle&a=roomReport";
|
||||
} else {
|
||||
url += "?c=Battle&a=roomReport";
|
||||
}
|
||||
std::shared_ptr<a8::MutableXObject> post_data = a8::MutableXObject::CreateObject();
|
||||
params->SetVal("account_id", player->account_id);
|
||||
params->SetVal("session_id", player->session_id);
|
||||
params->SetVal("__POST", post_data->ToJsonStr());
|
||||
|
||||
params->SetVal("version", 2023030201);
|
||||
params->SetVal("room_uuid", a8::XValue(GetRoomUuid()));
|
||||
params->SetVal("room_mode", GetReportRoomMode());
|
||||
|
@ -386,6 +386,7 @@ private:
|
||||
std::string map_tpl_name_;
|
||||
RoomType_e room_type_ = RoomType_NewBrid;
|
||||
bool already_room_report_battle_ = false;
|
||||
bool sending_room_report_battle_ = false;
|
||||
|
||||
GasData gas_data_;
|
||||
long long frameno_ = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user