diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ab8d5f05..cca8bd075 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -389,7 +389,7 @@ IF(EQEMU_BUILD_SERVER) ADD_SUBDIRECTORY(world) ADD_SUBDIRECTORY(zone) ADD_SUBDIRECTORY(ucs) - #ADD_SUBDIRECTORY(queryserv) + ADD_SUBDIRECTORY(queryserv) ADD_SUBDIRECTORY(eqlaunch) ENDIF(EQEMU_BUILD_SERVER) IF(EQEMU_BUILD_LOGIN) diff --git a/queryserv/queryserv.cpp b/queryserv/queryserv.cpp index 2384b2f96..4bf790a62 100644 --- a/queryserv/queryserv.cpp +++ b/queryserv/queryserv.cpp @@ -25,7 +25,6 @@ #include "../common/platform.h" #include "../common/crash.h" #include "../common/event/event_loop.h" -#include "../common/net/relay_link.h" #include "../common/timer.h" #include "database.h" #include "queryservconfig.h" diff --git a/queryserv/worldserver.cpp b/queryserv/worldserver.cpp index 893f56297..615f88d1a 100644 --- a/queryserv/worldserver.cpp +++ b/queryserv/worldserver.cpp @@ -23,6 +23,7 @@ #include "../common/packet_dump.h" #include "../common/packet_functions.h" #include "../common/servertalk.h" +#include "../common/net/packet.h" #include "database.h" #include "lfguild.h" @@ -51,7 +52,9 @@ WorldServer::~WorldServer() void WorldServer::Connect() { - m_link.reset(new EQ::Net::RelayLink(Config->WorldIP, Config->WorldTCPPort, "QS", Config->SharedKey)); + m_server.reset(new EQ::Net::ServertalkServer()); + //Config->WorldIP, Config->WorldTCPPort, "QS", Config->SharedKey + m_link->OnMessageType(ServerOP_Speech, std::bind(&WorldServer::HandleMessage, this, ServerOP_Speech, std::placeholders::_1)); m_link->OnMessageType(ServerOP_QSPlayerLogTrades, std::bind(&WorldServer::HandleMessage, this, ServerOP_QSPlayerLogTrades, std::placeholders::_1)); m_link->OnMessageType(ServerOP_QSPlayerLogHandins, std::bind(&WorldServer::HandleMessage, this, ServerOP_QSPlayerLogHandins, std::placeholders::_1)); @@ -66,7 +69,7 @@ void WorldServer::Connect() bool WorldServer::SendPacket(ServerPacket *pack) { EQ::Net::ReadOnlyPacket p(pack->pBuffer, pack->size); - m_link->SendPacket(pack->opcode, p); + ->SendPacket(pack->opcode, p); return true; } diff --git a/queryserv/worldserver.h b/queryserv/worldserver.h index 594f1dac6..8e9d5acc7 100644 --- a/queryserv/worldserver.h +++ b/queryserv/worldserver.h @@ -19,7 +19,7 @@ #define WORLDSERVER_H #include "../common/eq_packet_structs.h" -#include "../common/net/relay_link.h" +#include "../common/net/servertalk_server.h" class WorldServer { @@ -35,7 +35,7 @@ class WorldServer void HandleMessage(uint16 opcode, const EQ::Net::Packet &p); private: - std::unique_ptr m_link; + std::unique_ptr m_server; }; #endif