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:
130
GameTools/NeoRylClient/AkhanChrCreate.h
Normal file
130
GameTools/NeoRylClient/AkhanChrCreate.h
Normal file
@@ -0,0 +1,130 @@
|
||||
// AkhanChrCreate.h: interface for the CAkhanChrCreate class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_AKHANCHRCREATE_H__8BA5391E_7C4E_4470_B081_868014DD3261__INCLUDED_)
|
||||
#define AFX_AKHANCHRCREATE_H__8BA5391E_7C4E_4470_B081_868014DD3261__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "GUIWindow.h"
|
||||
|
||||
static const unsigned short ALLOW_HAN_NUM = 39;
|
||||
static unsigned short AllowHans[ALLOW_HAN_NUM] =
|
||||
{
|
||||
'<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>',
|
||||
'<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>',
|
||||
'<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>',
|
||||
'<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>',
|
||||
'<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>',
|
||||
'<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>',
|
||||
'¨', '<EFBFBD><EFBFBD>', '<EFBFBD><EFBFBD>', 'ǧ', 'Ǩ',
|
||||
'ǵ', '<EFBFBD><EFBFBD>', 'ȧ', '<EFBFBD><EFBFBD>'
|
||||
};
|
||||
|
||||
static const unsigned short ALLOW_LETTER_NUM = 2;
|
||||
static char AllowLetters[ALLOW_LETTER_NUM] =
|
||||
{
|
||||
'-', '_'
|
||||
};
|
||||
|
||||
class CAkhanChrCreate : public CGUIWindow
|
||||
{
|
||||
unsigned short m_wClass;
|
||||
unsigned long m_dwStr;
|
||||
unsigned long m_dwDex;
|
||||
unsigned long m_dwCon;
|
||||
unsigned long m_dwInt;
|
||||
unsigned long m_dwWis;
|
||||
unsigned long m_dwIP;
|
||||
char m_strName[16];
|
||||
unsigned long m_dwEndTimer;
|
||||
unsigned long m_dwSex;
|
||||
unsigned long m_dwHair;
|
||||
unsigned long m_dwFace;
|
||||
|
||||
inline bool CheckCharCreateName(char *Name_In)
|
||||
{
|
||||
const unsigned short MIN_CHAR_NAME = 4;
|
||||
const unsigned short MAX_CHAR_NAME = 15;
|
||||
|
||||
if(Name_In == NULL)
|
||||
return false;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
size_t Len = strlen(Name_In);
|
||||
if(Len < MIN_CHAR_NAME || Len > MAX_CHAR_NAME)
|
||||
return false;
|
||||
|
||||
LPBYTE CheckName = (LPBYTE)Name_In;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>˻<EFBFBD>
|
||||
int ACount = 0;
|
||||
for(unsigned short LCount = 0; LCount < Len; LCount++)
|
||||
{
|
||||
if((CheckName[LCount] & 0x80) == 0x80)
|
||||
{
|
||||
// 2Byte <20><><EFBFBD><EFBFBD> üũ
|
||||
if(CheckName[LCount + 1] == NULL)
|
||||
return false;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> üũ (<28>ѱ<EFBFBD>)
|
||||
if(CheckName[LCount] < 0xB0 || CheckName[LCount] > 0xC9)
|
||||
return false;
|
||||
|
||||
if(CheckName[LCount + 1] < 0xA1 || CheckName[LCount + 1] > 0xFE)
|
||||
return false;
|
||||
|
||||
// <20>ѱ<EFBFBD> <20>κ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
for(ACount = 0; ACount < ALLOW_HAN_NUM; ACount++)
|
||||
{
|
||||
if(MAKEWORD(CheckName[LCount + 1], CheckName[LCount]) == AllowHans[ACount])
|
||||
break;
|
||||
}
|
||||
|
||||
if(ACount != ALLOW_HAN_NUM)
|
||||
return false;
|
||||
|
||||
LCount += 1;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if((CheckName[LCount] >= 'A' && CheckName[LCount] <= 'Z') || (CheckName[LCount] >= 'a' && CheckName[LCount] <= 'z'))
|
||||
continue;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if(CheckName[LCount] >= '0' && CheckName[LCount] <= '9')
|
||||
continue;
|
||||
|
||||
// Ư<><C6AF> <20><>ȣ <20>κ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
for(ACount = 0; ACount < ALLOW_LETTER_NUM; ACount++)
|
||||
{
|
||||
if(CheckName[LCount] == AllowLetters[ACount])
|
||||
break;
|
||||
}
|
||||
|
||||
if(ACount == ALLOW_LETTER_NUM)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
void CreateCancel(void);
|
||||
CAkhanChrCreate();
|
||||
~CAkhanChrCreate();
|
||||
|
||||
BOOL Init(unsigned short x, unsigned short y);
|
||||
void InitValue(void);
|
||||
BOOL Update(BOOL &bClick, BOOL &bEdge);
|
||||
void ShowWindow(BOOL bShow) { }
|
||||
void Render(LPDIRECT3DDEVICE8 lpD3DDevice);
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_AKHANCHRCREATE_H__8BA5391E_7C4E_4470_B081_868014DD3261__INCLUDED_)
|
||||
Reference in New Issue
Block a user