port: ServerStateChecker + module (batch 2 P2)

Verbatim 40250 CServerStateChecker and the ServerStateChecker Python
module replace the stub; PythonBoot owns the instance like
CPythonApplication::m_kServerStateChecker. The fake server gets a state
port that answers CG_STATE_CHECKER the way CInputHandshake and
CInputDB::RespondChannelStatus do; login_flow requests the channel list
after the character list (live: {1: 1, 2: 1}).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-24 00:27:35 +09:00
co-authored by Claude Opus 5.5
parent be5a68ff35
commit ce9f96398e
13 changed files with 362 additions and 32 deletions
@@ -10,6 +10,7 @@
#include "../EterLib/HostCursor.h"
#include "UserInterface/PythonNetworkStream.h"
#include "UserInterface/AccountConnector.h"
#include "UserInterface/ServerStateChecker.h"
#include "UserInterface/PythonPlayer.h"
#include "GameLib/FlyingObjectManager.h"
#include "GameLib/RaceManager.h"
@@ -58,9 +59,11 @@ std::unique_ptr<CTimer> g_timer;
std::unique_ptr<CPythonNetworkStream> g_network_stream;
std::unique_ptr<CAccountConnector> g_account_connector;
// 40250 CPythonApplication::m_pyPlayer, m_FlyingManager and m_kEftMgr: the loading phase clears them
// (CPythonNetworkStream::SetLoadingPhase). PythonPlayer and FlyingObjectManager are platform/pending stand-ins.
// (CPythonNetworkStream::SetLoadingPhase).
std::unique_ptr<CPythonPlayer> g_player;
std::unique_ptr<CFlyingManager> g_flying_manager;
// 40250 CPythonApplication::m_kServerStateChecker: intrologin.py's channel status list.
std::unique_ptr<CServerStateChecker> g_server_state_checker;
std::unique_ptr<CRaceManager> g_race_manager;
std::unique_ptr<CGameEventManager> g_game_event_manager;
std::unique_ptr<CEffectManager> g_effect_manager;
@@ -314,6 +317,7 @@ bool Start(const char* stdlib_path, std::string* error)
g_account_connector = std::make_unique<CAccountConnector>();
g_player = std::make_unique<CPythonPlayer>();
g_flying_manager = std::make_unique<CFlyingManager>();
g_server_state_checker = std::make_unique<CServerStateChecker>();
g_race_manager = std::make_unique<CRaceManager>();
g_game_event_manager = std::make_unique<CGameEventManager>();
g_effect_manager = std::make_unique<CEffectManager>();
@@ -347,6 +351,7 @@ bool run_main_script_body(const char* lpCmdLine, std::string* error)
initnet();
initeffect();
initfly();
initServerStateChecker();
init_2v0_gameplay_stubs();
ClearLogBoxMessage();
@@ -517,6 +522,7 @@ void Stop()
g_effect_manager.reset();
g_game_event_manager.reset();
g_race_manager.reset();
g_server_state_checker.reset();
g_flying_manager.reset();
g_player.reset();
g_account_connector.reset();