DragonNest/Server/DNLogServer/DNQueryTest.cpp
2024-12-20 16:56:44 +08:00

47 lines
No EOL
1.9 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


#include "stdafx.h"
#include "DNQueryTest.h"
#include "DNSQLConnection.h"
#include "DNSQLConnectionManager.h"
CDNQueryTest::CDNQueryTest()
{
}
CDNQueryTest::~CDNQueryTest()
{
}
void CDNQueryTest::ProcessQueryTest( const char* pszCmd )
{
std::string strString(pszCmd);
std::vector<std::string> vSplit;
boost::algorithm::split( vSplit, strString, boost::algorithm::is_any_of(", ") );
if( !vSplit.empty() )
{
// P_AddCommonLog
if( stricmp( vSplit[0].c_str(), "P_AddCommonLog" ) == 0 )
{
P_AddCommonLog( vSplit );
}
}
}
void CDNQueryTest::P_AddCommonLog( std::vector<std::string>& vSplit )
{
CDNSQLConnection* pCon= g_SQLConnectionManager.FindServerLogDB(0);
TLogFile log;
log.unLogType = 1;
log.unServerType = 1;
log.unWorldSetID = 1;
log.uiAccountDBID = 3080;
log.biCharDBID = 10000;
log.uiSessionID = 1000;
wcscpy( log.wszBuf, L"testtest" );
pCon->QueryLog( &log );
}