Módulo: Infrastructure

Módulo: FirelandsInfrastructure (src/infrastructure)

Infrastructure conecta el emulador con el mundo exterior: MariaDB, TCP Boost.Asio, REST opcional, realm-link, scripting Lua y stubs de colisión.

Todo I/O de sockets usa coroutines C++20 (co_await, boost::asio::use_awaitable). Helpers compartidos: AsioAwaitables.h.

Persistencia (infrastructure/persistence/)

ComponenteRol
DatabaseMigratorEjecuta sql/bundled/sql/init/sql/migrations/; rastrea schema_migrations
MySqlAccountRepositoryIAccountRepository (auth DB)
MySqlRealmRepositoryIRealmRepository
MySqlCharacterRepositoryICharacterRepository
MySqlPlayerCreateInfoRepositoryPlantillas world DB
MySqlGmTicketRepositoryTickets GM
MySqlGossipRepository, MySqlNpcTextRepository, MySqlQuestGossipRepositoryPorts de gossip
MySqlCreatureSpawnRepositorySpawns de criaturas
MemoryWebSessionRepositorySesiones REST en memoria
InMemoryThreatManager, MySqlThreatManager, MySqlSpellProcessorPorts de combate

Red (infrastructure/network/)

ComponenteRol
AsyncNetworkServerBucle accept con coroutines; Update() hace poll de io_context
AuthSessionBucles read/write de clientes auth
WorldSessionCliente world; handlers bajo worldsession/*.cpp
RestAuthServerLogin REST en Network.RestPort
RealmLinkSession / RealmLinkOutboundAuth ↔ world métricas en vivo

Scripting y adaptadores de mundo

ComponenteRol
LuaGameScriptHostLua 5.4 bajo Scripting.ScriptsDirectory
SpellEntryDbcStore, SpellCastTablesDbcDatos de hechizos DBC del cliente
MapCollisionQueriesStubPlaceholder hasta integración completa de vmap

Notas CMake

FirelandsInfrastructure enlaza FirelandsApplication, MariaDB C++, Boost thread, Lua, zlib. LuaGameScriptHost.cpp omite PCH por compatibilidad de toolchain.

Relacionado