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>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#include "stdafx.h"
|
||||
#include "FieldServerClientDispatch.h"
|
||||
#include <Network/Packet/PacketCommand.h>
|
||||
#include <Network/Dispatch/GameClient/ParseCharLoginOut.h>
|
||||
|
||||
|
||||
class CFieldGameClientDispatchTable : public CGameClientDispatchTable
|
||||
{
|
||||
public:
|
||||
|
||||
static CFieldGameClientDispatchTable& GetInstance();
|
||||
|
||||
private:
|
||||
|
||||
CFieldGameClientDispatchTable();
|
||||
};
|
||||
|
||||
|
||||
CFieldGameClientDispatchTable& CFieldGameClientDispatchTable::GetInstance()
|
||||
{
|
||||
static CFieldGameClientDispatchTable fieldGameClientDispatchTable;
|
||||
return fieldGameClientDispatchTable;
|
||||
}
|
||||
|
||||
|
||||
CFieldGameClientDispatchTable::CFieldGameClientDispatchTable()
|
||||
{
|
||||
using namespace GameClientParsePacket;
|
||||
|
||||
AddDispatch(CmdCharLogin, ParseCharLogin); // ij<><C4B3><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD>
|
||||
AddDispatch(CmdCharLogout, ParseCharLogout); // ij<><C4B3><EFBFBD><EFBFBD> <20>αƿ<D7BE>
|
||||
AddDispatch(CmdCharMoveZone, ParseCharMoveZone); // ij<><C4B3><EFBFBD><EFBFBD> <20><> <20>̵<EFBFBD>
|
||||
AddDispatch(CmdServerZone, ParseServerZone); // ij<><C4B3><EFBFBD><EFBFBD> <20><> <20>̵<EFBFBD>
|
||||
AddDispatch(CmdCSAuth, ParseCSAuth); // <20><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD> (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
}
|
||||
|
||||
|
||||
CFieldGameClientDispatch::CFieldGameClientDispatch(CSession& Session)
|
||||
: CGameClientDispatch(Session, CFieldGameClientDispatchTable::GetInstance())
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef _FIELD_SERVER_CLIENT_DISPATCH_H_
|
||||
#define _FIELD_SERVER_CLIENT_DISPATCH_H_
|
||||
|
||||
#include <Network/Dispatch/GameClient/GameClientDispatch.h>
|
||||
|
||||
|
||||
class CFieldGameClientDispatch : public CGameClientDispatch
|
||||
{
|
||||
public:
|
||||
|
||||
CFieldGameClientDispatch(CSession& Session);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
#include "stdafx.h"
|
||||
#include "SendGameServerPacket.h"
|
||||
|
||||
#include <Network/Stream/SendStream.h>
|
||||
#include <Network/Winsock/SocketFactory.h>
|
||||
#include <Network/Packet/PacketCommand.h>
|
||||
#include <Network/Packet/PacketStruct/ServerPacket.h>
|
||||
#include <Network/Packet/PacketStruct/AddressPacket.h>
|
||||
|
||||
/*
|
||||
bool SendSysServerLogin(CSendStream& SendStream, unsigned long dwServerID_In);
|
||||
|
||||
bool GameServerSendPacket::SendSysServerLogin(CSendStream& SendStream, unsigned long dwServerID_In)
|
||||
{
|
||||
|
||||
char* lpBuffer = SendStream.GetBuffer(sizeof(PktSL));
|
||||
if(NULL != lpBuffer)
|
||||
{
|
||||
PktSL* lpPktSL = reinterpret_cast<PktSL*>(lpBuffer);
|
||||
|
||||
const int MAX_ADDRESS = 128;
|
||||
char szAddress[MAX_ADDRESS];
|
||||
|
||||
CTCPFactory tcpFactory;
|
||||
tcpFactory.GetNetworkInfo(szAddress, MAX_ADDRESS);
|
||||
|
||||
lpPktSL->m_Address.S_un.S_addr = inet_addr(szAddress);
|
||||
lpPktSL->m_dwServerID = dwServerID_In;
|
||||
|
||||
return SendStream.WrapHeader(sizeof(PktSL), CmdSysServerLogin, 0, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
bool GameServerSendPacket::SendUpdateAddressAck(CSendStream& SendStream, unsigned long dwCID,
|
||||
const SOCKADDR_IN& PublicAddr, const SOCKADDR_IN& PrivateAddr)
|
||||
{
|
||||
char* lpBuffer = SendStream.GetBuffer(sizeof(PktUAAck));
|
||||
if(NULL != lpBuffer)
|
||||
{
|
||||
PktUAAck* lpPktUAAck = reinterpret_cast<PktUAAck*>(lpBuffer);
|
||||
|
||||
lpPktUAAck->m_dwCharID = dwCID;
|
||||
lpPktUAAck->m_PublicAddress = PublicAddr;
|
||||
lpPktUAAck->m_PrivateAddress = PrivateAddr;
|
||||
|
||||
return SendStream.WrapCrypt(sizeof(PktUAAck), CmdCharUpdateAddress, 0, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef _SEND_GAME_SERVER_PACKET_H_
|
||||
#define _SEND_GAME_SERVER_PACKET_H_
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
class CSendStream;
|
||||
|
||||
namespace GameServerSendPacket
|
||||
{
|
||||
|
||||
bool SendUpdateAddressAck(CSendStream& SendStream, unsigned long dwCID,
|
||||
const SOCKADDR_IN& PublicAddr, const SOCKADDR_IN& PrivateAddr);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user