Files
Client/Server/AdminTool/AdminToolServer/RYL_AgentServerDispatch.h
LGram16 dd97ddec92 Restructure repository to include all source folders
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>
2025-11-29 20:17:20 +09:00

80 lines
2.7 KiB
C++

#ifndef _RYL_AGENTSERVER_DISPATCH_H_
#define _RYL_AGENTSERVER_DISPATCH_H_
#include "RYL_ServerRequestKeeper.h"
#include < Character/ModifyCharacter.h >
#include < Network/Dispatch/RylServerDispatch.h >
#include < Network/Dispatch/MultiDispatchStorage.h >
#include < Stream/Buffer/BufferFactory.h >
#include < Network/AgentServerParseData/RYL_AgentServerParseData.h >
namespace PktAgentServer
{
struct PktAdminToolSetData;
};
struct PktBase;
class CBuffer;
/*!
\class CRylAgentServerDispatch
중계 서버로부터 받은 패킷 처리
*/
class CRylAgentServerDispatch : public CRylServerDispatch
{
public:
CRylAgentServerDispatch(CSession& Session)
: CRylServerDispatch(Session, 10){ ;}
// 현재 연결이 유지되어있는 서버테이블
static CMultiDispatch& GetDispatchTable();
virtual void Connected(void); // 접속 이벤트
virtual void Disconnected(void); // 접속 끊김 이벤트
virtual void Destroy(void); // 파괴 이벤트
void SetDispatchInfo(long dwServerGroup, char* ServerName); // 서버의 이름 및ID를 입력함
CServerRequestKeeper& GetRequestKeeper() { return m_AgentRequestKeeper; } // 해당 서버Dispatch의 RequestKeeper을 가져옴
const char* GetName() { return m_szServerName; } // 서버이름을 가져옴
bool Send(CBuffer* lpBuffer);
bool CmdSysServerLogin(PktBase* lpPktBase); // 서버로그인
bool CmdAdminToolGetData(PktBase* lpPktBase); // 캐릭터 데이터 가져오기
bool CmdAdminToolSetData(PktBase* lpPktBase); // 캐릭터 데이터 저장하기
bool ServerLogin(unsigned long dwServerGroup); // 서버 로그인 패킷을 전송
CModifyCharacterMgr& GetModifyCharacterMgr() { return m_ModifyCharMgr; } // 해당 서버에 에디팅중인 캐릭터 목록을 가져온다.
bool UpdateCharacter(CModifyCharacter* lpChar, unsigned __int64 dwSerial, unsigned long dwUID, unsigned long dwCID, unsigned long dwRequestKey);
void SetPaseSession(); // 서버의 Session을 캐릭터정보 Parser에 넘겨준다
ItemData::CDepositLock& GetDepositLock() { return m_DepositLock; } // 창고 장금 목록을 가져온다.
bool ItemQtyControlAck(PktBase* lpPktBase);
bool GuildPositionAck(PktBase* lpPktBase);
bool ConnectedAgentListAck(void);
private:
long m_dwServerGroup; ///< 연결중인 서버그룹 인덱스
unsigned long m_dwServerID; ///< 연결중인 서버 ID
char m_szServerName[256]; ///< 연결중인 서버그룹명
CServerRequestKeeper m_AgentRequestKeeper;
CModifyCharacterMgr m_ModifyCharMgr;
CAgentServerParseData m_ParseData;
ItemData::CDepositLock m_DepositLock;
CDefaultBufferFactory m_DefultBufferFactory;
bool DispatchPacket(PktBase* lpPktBase);
bool SEND_CLIENT_DATA(PktBase* lpPktBase, CServerRequestKeeper::RequestInfo& Info, unsigned char cType);
bool PARSE_FINISH_GET_DATA(unsigned long dwRequestKey);
bool SyncDeposit(unsigned long dwUID, unsigned long dwCId, CServerRequestKeeper::RequestInfo& Info);
};
#endif