Start refactoring the core to C++ (#7303)

This commit is contained in:
Lemongrass3110
2022-12-20 23:37:31 +01:00
committed by GitHub
parent ef4d52fd7b
commit 2c4ee64b59
31 changed files with 545 additions and 426 deletions

View File

@@ -674,7 +674,7 @@ int chclif_parse_maplogin(int fd){
l_user[23] = '\0';
l_pass[23] = '\0';
ARR_FIND( 0, ARRAYLENGTH(map_server), i, map_server[i].fd <= 0 );
if( runflag != CHARSERVER_ST_RUNNING ||
if( !global_core->is_running() ||
i == ARRAYLENGTH(map_server) ||
strcmp(l_user, charserv_config.userid) != 0 ||
strcmp(l_pass, charserv_config.passwd) != 0 )
@@ -735,7 +735,7 @@ int chclif_parse_reqtoconnect(int fd, struct char_session_data* sd,uint32 ipl){
WFIFOL(fd,0) = account_id;
WFIFOSET(fd,4);
if( runflag != CHARSERVER_ST_RUNNING ) {
if( !global_core->is_running() ){
chclif_reject(fd, 0); // rejected from server
return 1;
}