Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#ifndef _DBAGENT_SERVER_AUTH_DISPATCH_H_
|
|
#define _DBAGENT_SERVER_AUTH_DISPATCH_H_
|
|
|
|
#include <Network/Dispatch/RylServerDispatch.h>
|
|
#include <Network/Dispatch/SingleDispatchStorage.h>
|
|
|
|
#include <Item/ItemSerialMgr.h>
|
|
|
|
// forward decl.
|
|
struct PktSL;
|
|
struct PktUK;
|
|
struct PktDD;
|
|
|
|
namespace DBAgent
|
|
{
|
|
class CAuthDispatch : public CRylServerDispatch
|
|
{
|
|
public:
|
|
|
|
static CSingleDispatch& GetDispatchTable();
|
|
|
|
enum Const
|
|
{
|
|
MAX_PACKET_DISPATCH_PER_PULSE = 100,
|
|
MAX_STREAM_BUFFER_SIZE = 16000
|
|
};
|
|
|
|
CAuthDispatch(CSession& Session);
|
|
virtual ~CAuthDispatch();
|
|
|
|
virtual void Connected();
|
|
virtual void Disconnected();
|
|
virtual bool DispatchPacket(PktBase* lpPktBase);
|
|
|
|
void IncUserNum() { ++m_nUserNum; }
|
|
void DecUserNum() { --m_nUserNum; }
|
|
|
|
int GetUserNum() const { return (m_nUserNum < 1) ? 1 : m_nUserNum; }
|
|
|
|
private:
|
|
|
|
bool ParseServerLogin(PktSL* lpPktSL);
|
|
bool ParseServerLogout(PktBase* lpPktBase);
|
|
bool ParseUserKill(PktUK* lpPktUK);
|
|
|
|
unsigned long m_dwServerID;
|
|
int m_nUserNum;
|
|
Item::CItemSerialMgr m_AuthItemSerialMgr;
|
|
};
|
|
}
|
|
|
|
#endif |