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:
57
CryptoSource/SQLExecute/DBComponent.cpp
Normal file
57
CryptoSource/SQLExecute/DBComponent.cpp
Normal file
@@ -0,0 +1,57 @@
|
||||
#include "Global.h"
|
||||
#include "DBcomponent.h"
|
||||
#include "Nave/NFStringUtil.h"
|
||||
|
||||
namespace DBComponent
|
||||
{
|
||||
bool Test(NaveServer::NFDBComponent& DBComponent)
|
||||
{
|
||||
/*
|
||||
char szQuery[NaveServer::NFDBComponent::QUERY_BUFFER_LEN];
|
||||
|
||||
if (_snprintf(szQuery, NaveServer::NFDBComponentQUERY_BUFFER_LEN - 1, "InsertUser %d, %d",
|
||||
UserID_In, cOldServerGroupID))
|
||||
{
|
||||
if (DBComponent.ExecuteQuery(szQuery))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CheckAuthCode(NaveServer::NFDBComponent& DBComponent, const char* pCode, const char* pIP)
|
||||
{
|
||||
WCHAR szQuery[NaveServer::NFDBComponent::QUERY_BUFFER_LEN];
|
||||
|
||||
if (_snwprintf(szQuery, NaveServer::NFDBComponent::QUERY_BUFFER_LEN - 1,
|
||||
L"AuthCode '%s', '%s'", Nave::ToUnicode(pCode).c_str(), Nave::ToUnicode(pIP).c_str()))
|
||||
{
|
||||
if (DBComponent.ExecuteQuery(szQuery))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AddItemLog(NaveServer::NFDBComponent& DBComponent, unsigned long CreateID, unsigned long UID, unsigned long CID, unsigned short ItemPrototypeID, unsigned short Amount)
|
||||
{
|
||||
WCHAR szQuery[NaveServer::NFDBComponent::QUERY_BUFFER_LEN];
|
||||
|
||||
if (_snwprintf(szQuery, NaveServer::NFDBComponent::QUERY_BUFFER_LEN - 1,
|
||||
L"INSERT INTO [ItemLog] (CreateID, UID, CID, ItemPrototypeID, Amount) VALUES (%d, %d, %d, %d, %d)",
|
||||
CreateID, UID, CID, ItemPrototypeID, Amount))
|
||||
{
|
||||
if (DBComponent.ExecuteQuery(szQuery))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user