Ir para conteúdo
Faça parte da equipe! (2024) ×

dolduck

Membro
  • Total de Posts

    7
  • Registro em

  • Última visita

  • WCoins

    4

Titulo do usuário

  • TItulo de usuário
    dolduck
  • 993081600

Últimos Visitantes

O bloco dos últimos visitantes está desativado e não está sendo visualizado por outros usuários.

dolduck's Achievements

Novato

Novato (1/15)

  • Açúcar ou adoçante? Rara
  • Legal! Rara
  • Um é pouco!
  • Agora que já nos conhecemos... Rara
  • É para a viagem? Rara

Emblemas Recentes

11

Reputação

  1. Field monsters are slow to move. Is there a way to improve movement?
  2. This was resolved by further optimizing the server source and modifying the client.
  3. Senior, you are great. I'm getting a lot of help in studying and developing.
  4. Among Sunday's sources && sServer.BonusEXP != 0 << Clear and try again If the problem still persists. Check all the parts of your code that change the value of sServer.BonusEXP
  5. #include <cwchar> //std::mbtowc 함수 사용 #define ISALPHA(x) (((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z')) // 영문 범위 #define ISDIGIT(x) ((x) >= '0' && (x) <= '9') // 숫자 범위 #define ISHANGUL(x) (((x)>='ㄱ' && (x) <= 'ㅎ') || ((x) >= '가' && (x) <= '힣')) // 한글 범위 #define ISHANJA(x) ((x)>=0x4E00 &&(x)<=0x9FFF) // 한자 유니코드 범위 bool BASE_CheckValidString(char *name) { int l = strlen(name); if (l < 4 || l >= NAME_LENGTH) return FALSE; // 문자열의 각 문자를 확인합니다. for (int j = 0; j < l;) { wchar_t wc; int len = mbtowc(&wc, &name[j], MB_CUR_MAX); if (len < 1) return FALSE; //유요하지 않은 멀티바이트 문자 /* char x = name[j]; // 문자가 음수이면 다음 문자로 넘어갑니다. if (x < 0) { j++; continue; } */ // 문자가 알파벳, 숫자, 한글, 한자, '-' 또는 '_'인지 확인합니다. 맞으면 계속 진행합니다. if (ISALPHA(wc) || ISDIGIT(wc) || ISHANGUL(wc) || ISHANJA(wc) || wc == '-' || wc == '_') // continue; { j += len; continue; } //위의 조건에 해당하지 않는 문자가 있으면 false를 반환합니다. return false; } // 모든 조건을 통과하면 true를 반환합니다. return true; }
  6. A maioria dos erros se deve a diretivas #include incorretas.
  7. Respected seniors, I live in Korea and am studying using the w2pp code project for content development purposes. As the title says, you cannot create a character with a Korean nickname. In basedef.cpp and Cfiledb.cpp among w2pp code basedef.cpp /*char KorFirst[36] = {0,};//"ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎ";*/ unsigned char KorFirst[58] = "ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎ"; // 가:0 까:171 나:291 다:432 따: 라:646 마:773 바:902 빠:1031 사:1104 싸:1237 아:1353 자:1561 짜:1696 차:1770 카:1890 타:1997 파:2103 하:2208 끝:2350 int KorIndex[19] = {171, 291, 432, 560, 646, 773, 902, 1031, 1104, 1237, 1353, 1561, 1696, 1770, 1890, 1997, 2103, 2208, 2350}; void BASE_GetFirstKey(char* source, char* dest) { if ((source[0] >= 'A' && source[0] <= 'Z') || (source[0] >= 'a' && source[0] <= 'z')) { dest[0] = source[0]; dest[1] = 0; return; } else if (source[0] < 0) { unsigned char * unsource = (unsigned char *)source; int Point = (unsource[0] - 0xB0) * 94 + unsource[1] - 0xA1; if (Point < 0 || Point >= 2350) { strcpy(dest, "etc"); return; } int a; for (a = 0; a < 18; a++) { if (Point < KorIndex[a]) break; } if (a >= 0 && a <= 17) { dest[0] = KorFirst[a * 2]; dest[1] = KorFirst[a * 2 + 1]; dest[2] = 0; } else { strcpy(dest, "etc"); return; } } else strcpy(dest, "etc"); return; } void BASE_GetKorFirst(int temp, int *a) { int word1; int temp1; word1 = (temp >> 10) & 31; word1 = word1-1; temp1 = word1; *a = temp1; } CFileDB.cpp int CFileDB::CreateCharacter(char *ac, char *ch) { char check[ACCOUNTNAME_LENGTH]; strncpy(check, ac, ACCOUNTNAME_LENGTH); _strupr(check); if (check[0] == 'C' && check[1] == 'O' && check[2] == 'M' && check[3] >= '0' && check[3] <= '9' && check[4] == 0) return FALSE; if (check[0] == 'L' && check[1] == 'P' && check[2] == 'T' && check[3] >= '0' && check[3] <= '9' && check[4] == 0) return FALSE; strncpy(check, ch, NAME_LENGTH); _strupr(check); if (check[0] == 'C' && check[1] == 'O' && check[2] == 'M' && check[3] >= '0' && check[3] <= '9' && check[4] == 0) return FALSE; if (check[0] == 'L' && check[1] == 'P' && check[2] == 'T' && check[3] >= '0' && check[3] <= '9' && check[4] == 0) return FALSE; char First[128]; char temp[128]; BASE_GetFirstKey(check, First); sprintf(temp, "./char/%s/%s", First, check); FILE* fp = NULL; fp = fopen(temp, "r"); if (fp != NULL) { fclose(fp); Log("err createchar EEXIST", ch, 0); return FALSE; } int Handle = _open(temp, O_RDWR | O_CREAT | O_BINARY, _S_IREAD | _S_IWRITE); if(Handle == -1) { if (errno == EEXIST) Log("err createchar EEXIST", ch, 0); // _O_EXCL 일때 이미 파일이 있는경우 if (errno == EACCES) Log("err createchar EACCES", ch, 0); // readonly를 쓰려고 한경우, 쉐어모드가 불가인경우, 디렉토리가 invalid if (errno == EINVAL) Log("err createchar EINVAL", ch, 0); // invalid oflag or pmode argument if (errno == EMFILE) Log("err createchar EMFILE", ch, 0); // 파일 핸들이 없다. if (errno == ENOENT) Log("err createchar ENOENT", ch, 0); // File or Path not found else Log("err createchar UNKNOWN", ch, 0); return FALSE; } _write(Handle, ac, ACCOUNTNAME_LENGTH); _close(Handle); return TRUE; } Am I missing something or do I need to take any additional steps to make my character's nickname in Korean?
×
×
  • Criar Novo...

Informação Importante

Nós fazemos uso de cookies no seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies , caso contrário, vamos supor que você está bem para continuar.