mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Query serv reimplement first steps
This commit is contained in:
parent
48412087e8
commit
b6d79e5af2
@ -389,7 +389,7 @@ IF(EQEMU_BUILD_SERVER)
|
|||||||
ADD_SUBDIRECTORY(world)
|
ADD_SUBDIRECTORY(world)
|
||||||
ADD_SUBDIRECTORY(zone)
|
ADD_SUBDIRECTORY(zone)
|
||||||
ADD_SUBDIRECTORY(ucs)
|
ADD_SUBDIRECTORY(ucs)
|
||||||
#ADD_SUBDIRECTORY(queryserv)
|
ADD_SUBDIRECTORY(queryserv)
|
||||||
ADD_SUBDIRECTORY(eqlaunch)
|
ADD_SUBDIRECTORY(eqlaunch)
|
||||||
ENDIF(EQEMU_BUILD_SERVER)
|
ENDIF(EQEMU_BUILD_SERVER)
|
||||||
IF(EQEMU_BUILD_LOGIN)
|
IF(EQEMU_BUILD_LOGIN)
|
||||||
|
|||||||
@ -25,7 +25,6 @@
|
|||||||
#include "../common/platform.h"
|
#include "../common/platform.h"
|
||||||
#include "../common/crash.h"
|
#include "../common/crash.h"
|
||||||
#include "../common/event/event_loop.h"
|
#include "../common/event/event_loop.h"
|
||||||
#include "../common/net/relay_link.h"
|
|
||||||
#include "../common/timer.h"
|
#include "../common/timer.h"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "queryservconfig.h"
|
#include "queryservconfig.h"
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#include "../common/packet_dump.h"
|
#include "../common/packet_dump.h"
|
||||||
#include "../common/packet_functions.h"
|
#include "../common/packet_functions.h"
|
||||||
#include "../common/servertalk.h"
|
#include "../common/servertalk.h"
|
||||||
|
#include "../common/net/packet.h"
|
||||||
|
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "lfguild.h"
|
#include "lfguild.h"
|
||||||
@ -51,7 +52,9 @@ WorldServer::~WorldServer()
|
|||||||
|
|
||||||
void WorldServer::Connect()
|
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_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_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));
|
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)
|
bool WorldServer::SendPacket(ServerPacket *pack)
|
||||||
{
|
{
|
||||||
EQ::Net::ReadOnlyPacket p(pack->pBuffer, pack->size);
|
EQ::Net::ReadOnlyPacket p(pack->pBuffer, pack->size);
|
||||||
m_link->SendPacket(pack->opcode, p);
|
->SendPacket(pack->opcode, p);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
#define WORLDSERVER_H
|
#define WORLDSERVER_H
|
||||||
|
|
||||||
#include "../common/eq_packet_structs.h"
|
#include "../common/eq_packet_structs.h"
|
||||||
#include "../common/net/relay_link.h"
|
#include "../common/net/servertalk_server.h"
|
||||||
|
|
||||||
class WorldServer
|
class WorldServer
|
||||||
{
|
{
|
||||||
@ -35,7 +35,7 @@ class WorldServer
|
|||||||
|
|
||||||
void HandleMessage(uint16 opcode, const EQ::Net::Packet &p);
|
void HandleMessage(uint16 opcode, const EQ::Net::Packet &p);
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<EQ::Net::RelayLink> m_link;
|
std::unique_ptr<EQ::Net::ServertalkServer> m_server;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user