mirror of
https://github.com/tswow/tswow
synced 2026-08-14 20:29:06 -04:00
16 lines
489 B
C++
16 lines
489 B
C++
#pragma once
|
|
|
|
#include "CustomPacketRead.h"
|
|
#include <functional>
|
|
|
|
class ClientNetwork {
|
|
public:
|
|
static int OnCustomPacket(opcode_t opcode, std::function<void(CustomPacketRead*)> callback);
|
|
private:
|
|
static void initialize();
|
|
friend class Main;
|
|
};
|
|
|
|
// do NOT change this without also changing the names in client_header_builder.cpp
|
|
#define ON_CUSTOM_PACKET(__listener_name, opcode, callback) \
|
|
int __listener_name##__Result = ClientNetwork::OnCustomPacket(opcode,callback);
|