This commit is contained in:
aozhiwei 2023-11-27 15:27:38 +08:00
parent 6ddf67363f
commit 8eafed4b34
4 changed files with 8 additions and 14 deletions

View File

@ -144,7 +144,7 @@ void App::UnInit()
bool App::HasTask()
{
return RoomMgr::Instance()->RoomNum() > 0;
return RoomMgr::Instance()->HasTask();
}
void App::ProcessGameGateMsg(f8::MsgHdr* hdr)
@ -221,7 +221,6 @@ int App::GetVersion()
{
const char* current_file_name = __FILE__;
if (!version_) {
#if 1
std::string self_path = GetSelfPath();
//self_path = "/data/backups_app/b_game2006_gameserver_ty_z9.1.0.0.1.20231124R2/bin/gameserver2006";
std::vector<std::string> strings;
@ -233,17 +232,6 @@ int App::GetVersion()
a8::ReplaceString(version_str, "R", "0");
version_ = std::make_shared<int>(a8::XValue(version_str).GetInt());
a8::XPrintf("%s %s %s\n", {self_path, *version_, version_str});
#else
std::vector<std::string> strings;
a8::Split(current_file_name, strings, '/');
std::string tag = strings.at(strings.size() - 6);
std::vector<std::string> strings2;
a8::Split(tag, strings2, '.');
std::string version_str = strings2.at(strings2.size() - 1);
a8::ReplaceString(version_str, "R", "0");
version_ = std::make_shared<int>(a8::XValue(version_str).GetInt());
a8::XPrintf("%s %s %s\n", {current_file_name, *version_, version_str});
#endif
}
return *version_;
}

View File

@ -1121,3 +1121,8 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
);
}
}
bool RoomMgr::HasTask()
{
}

View File

@ -88,6 +88,7 @@ class RoomMgr : public a8::Singleton<RoomMgr>
void(std::vector<std::shared_ptr<BattleDataContext>>&)> cb);
int GetMatchMode() { return match_mode_; };
void SetMatchMode(int mode);
bool HasTask();
private:
void InstallReportStateTimer();

2
third_party/f8 vendored

@ -1 +1 @@
Subproject commit 6d385ed941caa9b15083ce1e1c012ef8311467c3
Subproject commit 6fd4da23e3cef2aa0b55ebfa9c60ccf1798a31bc