Files
Leviathan/Server/GameServer/Game/Db/DB_DeleteQuestCoolTime.cpp
T
2026-06-01 12:46:52 +02:00

43 lines
1.1 KiB
C++

#include <network/IConnection.h>
#include "DB_Commands.h"
#include "StructPlayer.h"
bool DB_DeleteQuestCoolTime::onProcess( DBConnection & db )
{
_CommandPtr cmd;
if( db.CreateCommand( cmd ) == false ) throw XException( "DB_DeleteQuestCoolTime : CreateInstance(command) error" );
cmd->CommandType = adCmdStoredProc;
cmd->CommandText = _bstr_t( "dbo.smp_delete_quest_cool_time" );
// Store the name of current stored-procedure for debugging
szStoredProcedureName = "dbo.smp_delete_quest_cool_time";
cmd->Parameters->Append( cmd->CreateParameter( "IN_OWNER_ID", adInteger, adParamInput, 4, m_nOwnerID ) );
cmd->Parameters->Append( cmd->CreateParameter( "IN_CODE", adInteger, adParamInput, 4, m_nCode ) );
cmd->Execute(NULL, NULL,adCmdStoredProc);
m_pPlayer->onEndQuery();
return true;
}
void DB_DeleteQuestCoolTime::onFail( const _com_error & exception )
{
m_pPlayer->onEndQuery();
IStreamSocketConnection * pConn = m_pPlayer->pConnection;
if( pConn && pConn->IsConnected() )
{
SendDisconnectDesc( pConn, TS_SC_DISCONNECT_DESC::DISCONNECT_TYPE_DB_ERROR );
pConn->Close();
}
else
{
m_pPlayer->LogoutNowWithAccount( 9 );
}
}