修复
This commit is contained in:
parent
c8f1e4346f
commit
fb39a1c5d5
11 changed files with 158 additions and 51 deletions
|
|
@ -372,7 +372,7 @@ bool LoadConfig(int argc, TCHAR * argv[])
|
|||
if (wszProbeStr[0] != '\0')
|
||||
WideCharToMultiByte(CP_ACP, 0, wszProbeStr, (int)wcslen(wszProbeStr), g_Config.szProbeIP, sizeof(g_Config.szProbeIP), NULL, NULL);
|
||||
|
||||
// ResourcePath 등록해준다.
|
||||
// ResourcePath 등록해준다.
|
||||
WCHAR wszPath[_MAX_PATH] = { 0, };
|
||||
char szPath[_MAX_PATH] = { 0, };
|
||||
g_IniFile.GetValue( L"Resource", L"Path", wszPath );
|
||||
|
|
@ -427,6 +427,11 @@ bool LoadConfig(int argc, TCHAR * argv[])
|
|||
#endif
|
||||
}
|
||||
|
||||
g_IniFile.GetValue(L"ServerManagerEx", L"sid", &g_Config.nManagedID);
|
||||
g_IniFile.GetValue(L"ServerManagerEx", L"ip", wszBuf);
|
||||
WideCharToMultiByte(CP_ACP, NULL, wszBuf, -1, g_Config.ServiceInfo.szIP, sizeof(g_Config.ServiceInfo.szIP), NULL, NULL);
|
||||
g_IniFile.GetValue(L"ServerManagerEx", L"port", &g_Config.ServiceInfo.nPort);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -438,14 +443,14 @@ bool LoadNpcQuest()
|
|||
#endif // #if defined (_WORK) && defined (PRE_ADD_SERVER_LOAD_SHORTENING)
|
||||
|
||||
g_pNpcQuestScriptManager->CreateLuaState(g_pGameServerManager->GetThreadCount());
|
||||
// 각 쓰레드별로 npc 대화 & 퀘스트 관련 스크립트들을 전부 로딩 한다.
|
||||
// 각 쓰레드별로 npc 대화 & 퀘스트 관련 스크립트들을 전부 로딩 한다.
|
||||
for ( int i = 0 ; i < g_pGameServerManager->GetThreadCount(); i++ )
|
||||
{
|
||||
lua_State* pLuaState = g_pNpcQuestScriptManager->OpenStateByIndex(i);
|
||||
DefAllAPIFunc(pLuaState);
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
// 스크립트 공통 파일 먼저 로드
|
||||
// 스크립트 공통 파일 먼저 로드
|
||||
std::vector<CFileNameString> CommonFileList;
|
||||
g_Log.Log(LogType::_FILELOG, L"QuestNPC_Common...Folder : %S\n", CEtResourceMng::GetInstance().GetFullPath( "QuestNPC_Common" ).c_str());
|
||||
CEtResourceMng::GetInstance().FindFileListAll_IgnoreExistFile( "QuestNPC_Common", "*.lua", CommonFileList );
|
||||
|
|
@ -738,10 +743,10 @@ bool InitApp(int argc, TCHAR * argv[])
|
|||
g_pLogConnection->SetIp(g_Config.LogInfo.szIP);
|
||||
g_pLogConnection->SetPort(g_Config.LogInfo.nPort);
|
||||
|
||||
// 혹시나 해서.. 쓰레드 일단 다 생성되고.
|
||||
// 혹시나 해서.. 쓰레드 일단 다 생성되고.
|
||||
Sleep(1000);
|
||||
|
||||
if ((g_Config.nManagedID > 0) && g_Config.bUseCmd)
|
||||
if (g_Config.nManagedID > 0)
|
||||
{
|
||||
g_pServiceConnection = new CDNServiceConnection(g_Config.nManagedID);
|
||||
if (!g_pServiceConnection) return false;
|
||||
|
|
@ -764,7 +769,7 @@ bool InitApp(int argc, TCHAR * argv[])
|
|||
#endif
|
||||
|
||||
#if defined(_GPK)
|
||||
// Shanda 보안
|
||||
// Shanda 보안
|
||||
g_Config.pDynCode = GPKCreateSvrDynCode();
|
||||
if (!g_Config.pDynCode){
|
||||
g_Log.Log(LogType::_FILELOG, L"SvrDynCode NULL!!!\r\n");
|
||||
|
|
@ -801,7 +806,7 @@ bool InitApp(int argc, TCHAR * argv[])
|
|||
return false;
|
||||
}
|
||||
|
||||
bool bChAuthRet = g_Config.pDynCode->LoadAuthFile("AuthData.dat"); // CSAuth관련된 애
|
||||
bool bChAuthRet = g_Config.pDynCode->LoadAuthFile("AuthData.dat"); // CSAuth관련된 애
|
||||
if (bChAuthRet == false)
|
||||
{
|
||||
g_Log.Log(LogType::_FILELOG, L"LoadAuthFile [AuthData.dat] failed!!!\r\n");
|
||||
|
|
@ -829,8 +834,8 @@ void ClearApp()
|
|||
SAFE_DELETE(g_pActozShield);
|
||||
#endif // #if defined(_KRAZ)
|
||||
|
||||
// 2008.01.20 김밥
|
||||
// Connection 과 ReconnectThread 간에 동기화 이슈로 ReconnectThread 먼저 종료
|
||||
// 2008.01.20 김밥
|
||||
// Connection 과 ReconnectThread 간에 동기화 이슈로 ReconnectThread 먼저 종료
|
||||
if( g_pIocpManager )
|
||||
{
|
||||
g_pIocpManager->CloseAcceptors();
|
||||
|
|
@ -976,12 +981,12 @@ int _tmain(int argc, TCHAR* argv[])
|
|||
setlocale(LC_ALL, "Korean");
|
||||
#endif
|
||||
|
||||
// 예외 처리자 준비
|
||||
// 예외 처리자 준비
|
||||
//#if !defined(_FINAL_BUILD)
|
||||
//unhandledexception 인경우에는 항상 풀메모리덤프
|
||||
DWORD dwRetVal = CExceptionReport::GetInstancePtr()->Open(_T(".\\"), TRUE, TRUE, MiniDumpWithFullMemory); // Release 모드 컴파일 시 C4744 경고가 발생하여 Singleton 구현 변경, CExceptionReport::GetInstancePtr() 을 inline 화 하지 않음 (참고 : http://msdn.microsoft.com/ko-kr/library/a7za416f.aspx)
|
||||
//unhandledexception 인경우에는 항상 풀메모리덤프
|
||||
DWORD dwRetVal = CExceptionReport::GetInstancePtr()->Open(_T(".\\"), TRUE, TRUE, MiniDumpWithFullMemory); // Release 모드 컴파일 시 C4744 경고가 발생하여 Singleton 구현 변경, CExceptionReport::GetInstancePtr() 을 inline 화 하지 않음 (참고 : http://msdn.microsoft.com/ko-kr/library/a7za416f.aspx)
|
||||
//#else // _FINAL_BUILD
|
||||
// DWORD dwRetVal = CExceptionReport::GetInstancePtr()->Open(_T(".\\"), TRUE, TRUE); // Release 모드 컴파일 시 C4744 경고가 발생하여 Singleton 구현 변경, CExceptionReport::GetInstancePtr() 을 inline 화 하지 않음 (참고 : http://msdn.microsoft.com/ko-kr/library/a7za416f.aspx)
|
||||
// DWORD dwRetVal = CExceptionReport::GetInstancePtr()->Open(_T(".\\"), TRUE, TRUE); // Release 모드 컴파일 시 C4744 경고가 발생하여 Singleton 구현 변경, CExceptionReport::GetInstancePtr() 을 inline 화 하지 않음 (참고 : http://msdn.microsoft.com/ko-kr/library/a7za416f.aspx)
|
||||
//#endif // _FINAL_BUILD
|
||||
if (NOERROR != dwRetVal) {
|
||||
DWORD dwErrNo = ::GetLastError();
|
||||
|
|
@ -1021,7 +1026,7 @@ int _tmain(int argc, TCHAR* argv[])
|
|||
g_pIocpManager->VerifyAccept(ACCEPTOPEN_VERIFY_TYPE_APPINITCOMPLETE);
|
||||
g_Config.bAllLoaded = true;
|
||||
|
||||
wprintf(L"exit 명령을 치면 종료\r\n");
|
||||
wprintf(L"exit 명령을 치면 종료\r\n");
|
||||
|
||||
//SetConsoleTitleA(FormatA("GameServer Rev.%s", revDNGameServer).c_str()); //rlkt_revision
|
||||
|
||||
|
|
@ -1118,7 +1123,7 @@ int _tmain(int argc, TCHAR* argv[])
|
|||
{
|
||||
if (g_pDataManager->AllLoad() == false)
|
||||
{
|
||||
_DANGER_POINT_MSG(L"reloadext 실패!");
|
||||
_DANGER_POINT_MSG(L"reloadext 실패!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue