From 84e22471d2a6d4a008aa96827f41c11aed59fed2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 2 Apr 2024 20:50:34 +0800 Subject: [PATCH] 1 --- server/gameserver/room.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 3ebda868..c2595251 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -49,6 +49,7 @@ #include "roomob.h" #include "ingamevoice.h" #include "jsondatamgr.h" +#include "httpproxy.h" #include "mt/Param.h" #include "mt/Hero.h" @@ -2201,7 +2202,8 @@ void Room::AddObjectLater(RoomEntity* entity) void Room::OnGameOver() { - if (IsAlreadyRoomReportBattle()) { + if (IsAlreadyRoomReportBattle() || + GetCustomBattle()) { TraverseHumanList ( [] (Human* ele_hum) -> bool @@ -2235,6 +2237,18 @@ void Room::OnGameOver() params->SetVal("session_id", player->session_id); params->SetVal("__POST", post_data->ToJsonStr()); GenBattleRoomReportData(post_data.get()); + HttpProxy::Instance()->HttpGet + ( + [room_uuid = GetRoomUuid()] + (bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx) + { + auto room = RoomMgr::Instance()->GetRoomByUuid(room_uuid); + if (room) { + } + }, + url.c_str(), + *params.get() + ); } int param1 = 1; xtimer.SetIntervalEx