mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
UCS basically works now, really needs to be rewritten.
This commit is contained in:
@@ -79,6 +79,7 @@ SET(common_sources
|
||||
net/daybreak_connection.cpp
|
||||
net/eqstream.cpp
|
||||
net/packet.cpp
|
||||
patch/chat.cpp
|
||||
patch/login_sod.cpp
|
||||
patch/login_titanium.cpp
|
||||
patch/patch.cpp
|
||||
@@ -226,6 +227,7 @@ SET(common_headers
|
||||
net/endian.h
|
||||
net/eqstream.h
|
||||
net/packet.h
|
||||
patch/chat.h
|
||||
patch/login_sod.h
|
||||
patch/login_titanium.h
|
||||
patch/patch.h
|
||||
@@ -303,6 +305,8 @@ SOURCE_GROUP(Net FILES
|
||||
)
|
||||
|
||||
SOURCE_GROUP(Patch FILES
|
||||
patch/chat.cpp
|
||||
patch/chat.h
|
||||
patch/login_sod.cpp
|
||||
patch/login_sod.h
|
||||
patch/login_titanium.cpp
|
||||
|
||||
@@ -84,7 +84,7 @@ EQ::Net::EQStream::~EQStream()
|
||||
{
|
||||
}
|
||||
|
||||
void EQ::Net::EQStream::QueuePacket(EmuOpcode type, Packet &p)
|
||||
void EQ::Net::EQStream::QueuePacket(EmuOpcode type, const Packet &p)
|
||||
{
|
||||
if (m_patch) {
|
||||
EQ::Net::WritablePacket trans;
|
||||
@@ -101,14 +101,14 @@ void EQ::Net::EQStream::Close()
|
||||
{
|
||||
}
|
||||
|
||||
void EQ::Net::EQStream::QueuePacket(EQApplicationPacket *p)
|
||||
void EQ::Net::EQStream::QueuePacket(const EQApplicationPacket *p)
|
||||
{
|
||||
EQ::Net::ReadOnlyPacket out(p->pBuffer, p->size);
|
||||
QueuePacket(p->GetOpcode(), out);
|
||||
|
||||
}
|
||||
|
||||
void EQ::Net::EQStream::FastQueuePacket(EQApplicationPacket **p)
|
||||
void EQ::Net::EQStream::FastQueuePacket(const EQApplicationPacket **p)
|
||||
{
|
||||
QueuePacket(*p);
|
||||
delete *p;
|
||||
|
||||
+19
-5
@@ -12,11 +12,25 @@ namespace EQ
|
||||
struct EQStreamManagerOptions
|
||||
{
|
||||
EQStreamManagerOptions() {
|
||||
compressed = false;
|
||||
|
||||
}
|
||||
|
||||
EQStreamManagerOptions(bool encoded, bool compressed) {
|
||||
if (encoded) {
|
||||
daybreak_options.encode_passes[0] = EncodeXOR;
|
||||
|
||||
if (compressed) {
|
||||
daybreak_options.encode_passes[1] = EncodeCompression;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (compressed) {
|
||||
daybreak_options.encode_passes[0] = EncodeCompression;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DaybreakConnectionManagerOptions daybreak_options;
|
||||
bool compressed;
|
||||
};
|
||||
|
||||
class EQStream;
|
||||
@@ -55,13 +69,13 @@ namespace EQ
|
||||
const std::string& RemoteEndpoint() const { return m_connection->RemoteEndpoint(); }
|
||||
int RemotePort() const { return m_connection->RemotePort(); }
|
||||
|
||||
void QueuePacket(EmuOpcode type, Packet &p);
|
||||
void QueuePacket(EmuOpcode type, const Packet &p);
|
||||
const DaybreakConnectionStats& GetStats() const { return m_connection->GetStats(); }
|
||||
void ResetStats();
|
||||
size_t GetRollingPing() const { return m_connection->GetRollingPing(); }
|
||||
void Close();
|
||||
void QueuePacket(EQApplicationPacket *p);
|
||||
void FastQueuePacket(EQApplicationPacket **p);
|
||||
void QueuePacket(const EQApplicationPacket *p);
|
||||
void FastQueuePacket(const EQApplicationPacket **p);
|
||||
|
||||
void RegisterPatch(EQ::Patches::BasePatch *p) { m_patch = p; }
|
||||
EQ::Patches::BasePatch *GetRegisteredPatch() { return m_patch; }
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "chat.h"
|
||||
|
||||
EQ::Patches::ChatPatch::ChatPatch()
|
||||
{
|
||||
m_opcode_manager.reset(new RegularOpcodeManager());
|
||||
if (!m_opcode_manager->LoadOpcodes("mail_opcodes.conf")) {
|
||||
m_opcode_manager.release();
|
||||
}
|
||||
|
||||
m_signature.match_message_opcode = 0x0;
|
||||
m_signature.match_message_size = 0;
|
||||
m_message_size = 1;
|
||||
}
|
||||
|
||||
EQ::Patches::ChatPatch::~ChatPatch()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <patch/patch.h>
|
||||
|
||||
namespace EQ
|
||||
{
|
||||
namespace Patches
|
||||
{
|
||||
class ChatPatch : public BasePatch
|
||||
{
|
||||
public:
|
||||
ChatPatch();
|
||||
virtual ~ChatPatch();
|
||||
virtual std::string GetName() const { return "Chat"; }
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
EQ::Patches::LoginTitaniumPatch::LoginTitaniumPatch()
|
||||
{
|
||||
m_opcode_manager.reset(new RegularOpcodeManager());
|
||||
if (!m_opcode_manager->LoadOpcodes("login_opcodes_titanium.conf")) {
|
||||
if (!m_opcode_manager->LoadOpcodes("login_opcodes.conf")) {
|
||||
m_opcode_manager.release();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ EQ::Patches::IdentityMatchStatus EQ::Patches::BasePatch::TryIdentityMatch(const
|
||||
return IdentityMatchFailure;
|
||||
}
|
||||
|
||||
if (m_signature.match_message_opcode != raw_opcode) {
|
||||
if (m_signature.match_message_opcode != 0 && m_signature.match_message_opcode != raw_opcode) {
|
||||
return IdentityMatchFailure;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user