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:
164
Server/RylServerProject/RylUIDServer/Billing_Gammania.cpp
Normal file
164
Server/RylServerProject/RylUIDServer/Billing_Gammania.cpp
Normal file
@@ -0,0 +1,164 @@
|
||||
#include "stdafx.h"
|
||||
#include "UserIDTable.h"
|
||||
#include "UIDAgentDispatch.h"
|
||||
#include "SendAgentPacket.h"
|
||||
|
||||
#include <Log/ServerLog.h>
|
||||
#include <Network/Packet/PacketStruct/ServerPacket.h>
|
||||
#include <Utility/Setup/ServerSetup.h>
|
||||
#include <DB/DBComponent.h>
|
||||
#include <DB/BillingDBComponent.h>
|
||||
|
||||
#include <Utility/Debug/PerformanceCheck.h>
|
||||
|
||||
#include "RylUIDServer.h"
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ͼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD> Ÿ<><C5B8> (2005-09-20 zun!)
|
||||
bool CUIDAgentDispatch::ProcessBillingGammania(PktUUT* lpPktUUT)
|
||||
{
|
||||
unsigned char Cmd = lpPktUUT->m_cCmd;
|
||||
unsigned long ServerID = lpPktUUT->m_dwServerID;
|
||||
unsigned long SessionID = lpPktUUT->m_dwSessionID;
|
||||
unsigned long UserID = lpPktUUT->m_dwUserID;
|
||||
unsigned long CharID = lpPktUUT->m_dwCharID;
|
||||
char *AccountName = lpPktUUT->m_strAccount;
|
||||
// edith 2005.1.22 <20><><EFBFBD><EFBFBD><EFBFBD>Ͼƴ<CFBE> <20><><EFBFBD>Ӿȿ<D3BE><C8BF><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD>⼭ <20>ؾ<EFBFBD><D8BE>Ѵ<EFBFBD>.
|
||||
char *Password = lpPktUUT->m_strPassword;
|
||||
IN_ADDR& IPAddress = lpPktUUT->m_IPAddress;
|
||||
|
||||
LPUIDINFO pInfo = CRylUIDServer::GetInstance().FindAuth(AccountName);
|
||||
if(pInfo == NULL)
|
||||
{
|
||||
UIDINFO stTemp;
|
||||
stTemp.Cmd = Cmd;
|
||||
stTemp.ServerID = ServerID;
|
||||
stTemp.SessionID = SessionID;
|
||||
stTemp.Group = GetGroup();
|
||||
stTemp.UserID = UserID;
|
||||
stTemp.CharID = CharID;
|
||||
stTemp.Address = IPAddress;
|
||||
strcpy(stTemp.AccountName, AccountName);
|
||||
strcpy(stTemp.Password, Password);
|
||||
pInfo = CRylUIDServer::GetInstance().AddAuth(stTemp);
|
||||
}
|
||||
|
||||
// Ŀ<>ǵ<EFBFBD><C7B5><EFBFBD> <20>н<EFBFBD><D0BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ź<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
pInfo->Cmd = Cmd;
|
||||
|
||||
if(strlen(Password) > 0 && strncmp(pInfo->Password, Password, PktUUT::MaxPasswordLen) != 0)
|
||||
{
|
||||
strncpy(pInfo->Password, Password, PktUUT::MaxPasswordLen);
|
||||
}
|
||||
|
||||
switch(Cmd)
|
||||
{
|
||||
case PktUUT::UpdateUIDTableUserLogin:
|
||||
{
|
||||
CPerformanceInstrument userLogin("UserLogin");
|
||||
CAutoInstrument autoInstrument(userLogin);
|
||||
|
||||
const char* szAddress = inet_ntoa(pInfo->Address);
|
||||
|
||||
// edith 2008.01.22 <20><><EFBFBD><EFBFBD><EFBFBD>Ͼ<EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>κ<EFBFBD>
|
||||
char strBuff[512];
|
||||
|
||||
sprintf(strBuff, "%s'%s'%s'%s'1'I'0'%s'%s;%d;'\r\n",
|
||||
CServerSetup::GetInstance().GetGammaniaCode()
|
||||
, CServerSetup::GetInstance().GetGammaniaRegin()
|
||||
, pInfo->AccountName
|
||||
, pInfo->Password
|
||||
, szAddress
|
||||
, pInfo->AccountName
|
||||
, Cmd);
|
||||
|
||||
CRylUIDServer::GetInstance().SendPost(0, strBuff);
|
||||
}
|
||||
break;
|
||||
|
||||
case PktUUT::UpdateUIDTableUserLogout:
|
||||
case PktUUT::UpdateUIDTableCharLogout:
|
||||
{
|
||||
CPerformanceInstrument logout("Logout");
|
||||
CAutoInstrument autoInstrument(logout);
|
||||
|
||||
const char* szAddress = inet_ntoa(pInfo->Address);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ͼ<EFBFBD> <20>αƿ<D7BE> ó<><C3B3>
|
||||
char strBuff[512];
|
||||
|
||||
sprintf(strBuff, "%s'%s'%s'R'''%s'%s;'\r\n",
|
||||
CServerSetup::GetInstance().GetGammaniaCode()
|
||||
, CServerSetup::GetInstance().GetGammaniaRegin()
|
||||
, pInfo->AccountName
|
||||
, szAddress
|
||||
, pInfo->AccountName );
|
||||
|
||||
CRylUIDServer::GetInstance().SendPost(1, strBuff);
|
||||
}
|
||||
break;
|
||||
|
||||
case PktUUT::UpdateUIDTableCharLogin:
|
||||
{
|
||||
CPerformanceInstrument charLogin("CharLogin");
|
||||
CAutoInstrument autoInstrument(charLogin);
|
||||
|
||||
const char* szAddress = inet_ntoa(pInfo->Address);
|
||||
|
||||
// edith 2008.01.22 <20><><EFBFBD><EFBFBD><EFBFBD>Ͼ<EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>κ<EFBFBD>
|
||||
char strBuff[512];
|
||||
|
||||
sprintf(strBuff, "%s'%s'%s'%s'1'I'0'%s'%s;%d;'\r\n",
|
||||
CServerSetup::GetInstance().GetGammaniaCode()
|
||||
, CServerSetup::GetInstance().GetGammaniaRegin()
|
||||
, pInfo->AccountName
|
||||
, pInfo->Password
|
||||
, szAddress
|
||||
, pInfo->AccountName
|
||||
, Cmd);
|
||||
|
||||
CRylUIDServer::GetInstance().SendPost(0, strBuff);
|
||||
}
|
||||
break;
|
||||
|
||||
case PktUUT::UpdateUIDTableUserMove:
|
||||
case PktUUT::UpdateUIDTableCharMove:
|
||||
{
|
||||
CPerformanceInstrument move("ZoneMove");
|
||||
CAutoInstrument autoInstrument(move);
|
||||
|
||||
const char* szAddress = inet_ntoa(pInfo->Address);
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ͼ<EFBFBD> <20>αƿ<D7BE> ó<><C3B3>
|
||||
char strBuff[512];
|
||||
|
||||
sprintf(strBuff, "%s'%s'%s'R'''%s'%s;'\r\n",
|
||||
CServerSetup::GetInstance().GetGammaniaCode()
|
||||
, CServerSetup::GetInstance().GetGammaniaRegin()
|
||||
, pInfo->AccountName
|
||||
, szAddress
|
||||
, pInfo->AccountName );
|
||||
|
||||
CRylUIDServer::GetInstance().SendPost(1, strBuff);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CUIDAgentDispatch::ProcessDisconnectGammania()
|
||||
{
|
||||
/*
|
||||
unsigned long dwResult = 0;
|
||||
if (false == DBComponent::BillingDB::USPServer_End(CDBSingleObject::GetInstance(), m_Group, &dwResult))
|
||||
{
|
||||
SERLOG3(g_Log, "%d <20><EFBFBD> <20>αƿ<D7BE> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:0x%08x DB<44><42><EFBFBD><EFBFBD> <20>α<EFBFBD>:%s",
|
||||
m_Group, dwResult, CDBSingleObject::GetInstance().GetErrorString());
|
||||
}
|
||||
else
|
||||
{
|
||||
SERLOG1(g_Log, "%d <20><EFBFBD> USEServer_End ȣ<><C8A3> <20><><EFBFBD><EFBFBD>", m_Group);
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user