Files
Client/Server/ManageTool/ChatParser/stdafx.cpp
LGram16 dd97ddec92 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>
2025-11-29 20:17:20 +09:00

76 lines
1.4 KiB
C++

// stdafx.cpp : 표준 포함 파일만 들어 있는 소스 파일입니다.
// ChatParser.pch는 미리 컴파일된 헤더가 됩니다.
// stdafx.obj에는 미리 컴파일된 형식 정보가 포함됩니다.
#include "stdafx.h"
#include "ChatParserSetup.h"
/// \brief 섹션명과 키로 ini 셋업 파일에서 셋팅된 값 얻기
/// \param szSection 얻고자하는 값이 속한 섹션명
/// \param szKey 얻고자 하는 값에 매칭되는 키
const char* GetMyINIString(const char* szSection, const char* szKey)
{
const char* szResult = CChatParserSetup::GetInstance().GetString(szSection, szKey, 0);
if(0 == szResult)
{
CString strErr;
strErr.Format("Setup string load failed! - key: %s", szKey);
AfxMessageBox(strErr, MB_ICONSTOP);
return "???";
}
return szResult;
}
const int GetChatType(const char* szType)
{
int iCount = 17;
char* strFind[] = {
"NORMAL",
"PARTY",
"FRIEND",
"GUILD",
"CLIENT_LOG",
"STALL",
"SHOUT",
"ADMIN_NORMAL_CHAT",
"ADMIN_SHOUT",
"WHISPER",
"TRADE",
"CAMP_SHOP",
"NOTIFY_CHAR_INFO",
"FIND_PARTY",
"ENEMY_CHECK",
"DICE",
"NOTICE"
};
int FindID[] = {
NORMAL,
PARTY,
FRIEND,
GUILD,
CLIENT_LOG,
STALL,
SHOUT,
ADMIN_NORMAL_CHAT,
ADMIN_SHOUT,
WHISPER,
TRADE,
CAMP_SHOP,
NOTIFY_CHAR_INFO,
FIND_PARTY,
ENEMY_CHECK,
DICE,
NOTICE
};
for(int i = 0; i < iCount; ++i)
{
if(strcmp(szType, strFind[i]) == 0)
return FindID[i]+1;
}
return 0;
}