DragonNest/Client/DnLauncher2/DnFirstPatchInfo.cpp

54 lines
1.3 KiB
C++
Raw Permalink Normal View History

#include "StdAfx.h"
#include "DnFirstPatchInfo.h"
#include "DnPatchInfo.h"
#include "EtFileSystem.h"
#include "DnPatchThread.h"
extern CDnFistPatchDownloadThread * g_pFirstPatchDownloadThread;
DnFirstPatchInfo::DnFirstPatchInfo(void) :
m_bIsChangedLauncherFile(false),
m_nLocalModuleVersion(0),
m_nServerModuleVersion(0),
m_nFirstPatchStatus(EM_FIRSTPATCH_OK),
m_nIsFirstPatchProcess(EM_FIRSTPATCH_NOT)
{
m_vecCopyList.clear();
m_vecDeleteList.clear();
}
DnFirstPatchInfo::~DnFirstPatchInfo(void)
{
if(g_pFirstPatchDownloadThread)
{
g_pFirstPatchDownloadThread->TerminateThread();
g_pFirstPatchDownloadThread->WaitForTerminate();
SAFE_DELETE(g_pFirstPatchDownloadThread);
}
}
DnFirstPatchInfo& DnFirstPatchInfo::GetInstance()
{
static DnFirstPatchInfo global;
return global;
}
int DnFirstPatchInfo::SetPatchInfo()
{
LogWnd::TraceLog(_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>."));
// [!] txt<78>Ľ̿<C4BD> <20><><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
if( g_pFirstPatchDownloadThread == NULL )
{
g_pFirstPatchDownloadThread = new CDnFistPatchDownloadThread();
if(g_pFirstPatchDownloadThread)
{
return g_pFirstPatchDownloadThread->Start();
}
}
LogWnd::TraceLog(_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ <20><><EFBFBD><EFBFBD>."), FIRSTPATCHLIST_NAME);
LogWnd::Log( LogLevel::Error, _T("g_pFirstPatchDownloadThread Create Failed") );
return false;
}