This commit is contained in:
aozhiwei 2024-01-25 13:55:04 +08:00
parent 598fe9b491
commit 7fe296df2c
2 changed files with 15 additions and 1 deletions

View File

@ -3,6 +3,8 @@
#include <math.h> #include <math.h>
#include <float.h> #include <float.h>
#include <a8/openssl.h>
#include <a8/mutable_xobject.h> #include <a8/mutable_xobject.h>
#include <f8/udplog.h> #include <f8/udplog.h>
@ -965,6 +967,18 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
} else { } else {
msg.mutable_settlement_new()->set_custom_battle(0); msg.mutable_settlement_new()->set_custom_battle(0);
} }
{
auto data = a8::MutableXObject::CreateObject();
data->SetVal("room_uuid", a8::XValue(room->GetRoomUuid()).GetString());
data->SetVal("room_mode", room->GetReportRoomMode());
data->SetVal("team_id", GetTeam()->GetTeamId());
data->SetVal("map_id", room->GetMapMeta()->map_id());
data->SetVal("battle_uuid", a8::XValue(battle_uuid).GetString());
std::string custom_data = a8::openssl::md5
(data->ToJsonStr() + "520d8eAbB(8cf1^#$^&!@d833a42c820432PDAFE^^)") + "|" +
data->ToJsonStr();
msg.mutable_settlement_new()->set_box_payload(custom_data);
}
if (GetTeam()->already_report_battle) { if (GetTeam()->already_report_battle) {
msg.mutable_settlement_new()->set_settlement_status(1); msg.mutable_settlement_new()->set_settlement_status(1);
auto p = msg.mutable_settlement_new(); auto p = msg.mutable_settlement_new();

View File

@ -1297,7 +1297,7 @@ message MFSettlementNew
optional int32 version = 1; // optional int32 version = 1; //
optional int32 team_id = 2; //id optional int32 team_id = 2; //id
optional string room_uuid = 3; //id optional string room_uuid = 3; //id
optional int32 room_mode = 4; //0:pvp 1: pve optional int32 room_mode = 4; //0:pvp 1: pve 2: moba
optional int32 team_mode = 6; //0: 1:() optional int32 team_mode = 6; //0: 1:()
optional int32 game_over = 7; // optional int32 game_over = 7; //
optional int32 victory = 8; //(pvp pve) optional int32 victory = 8; //(pvp pve)