This commit is contained in:
aozhiwei 2023-09-20 13:23:09 +08:00
parent a3b084a924
commit 001d2599e2

View File

@ -879,8 +879,12 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
cb(1, "custom battle data error", nullptr); cb(1, "custom battle data error", nullptr);
return; return;
} }
std::string room_uuid = data->Get("team_uuid", "").GetString();
int start_time = data->Get("start_time", "").GetInt(); int start_time = data->Get("start_time", "").GetInt();
if (Global::g_nowtime - start_time > 40) {
cb(2, "custom battle is started", nullptr);
return;
}
std::string room_uuid = data->Get("team_uuid", "").GetString();
if (room_uuid.empty()) { if (room_uuid.empty()) {
cb(1, "custom battle data error", nullptr); cb(1, "custom battle data error", nullptr);
return; return;