Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…mpiling-error-when-changing-client-date-on-mmoh/ thank iZeal

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
  • Loading branch information
cydh committed Jun 10, 2014
1 parent b44e5e1 commit 869d9be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/char/char.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,9 +1431,9 @@ int char_make_new_char_sql(struct char_session_data* sd, char* name_, int str, i
if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
"`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
"'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
char_db, sd->account_id , slot, esc_name, start_zeny, str, agi, vit, int_, dex, luk,
schema_config.char_db, sd->account_id , slot, esc_name, charserv_config.start_zeny, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) )
mapindex_id2name(charserv_config.start_point.map), charserv_config.start_point.x, charserv_config.start_point.y, mapindex_id2name(charserv_config.start_point.map), charserv_config.start_point.x, charserv_config.start_point.y) )
{
Sql_ShowDebug(sql_handle);
return -2; //No, stop the procedure!
Expand Down Expand Up @@ -2718,12 +2718,12 @@ int char_config_read(const char* cfgName){
charserv_config.guild_exp_rate = atoi(w2);
} else if (strcmpi(w1, "pincode_enabled") == 0) {
charserv_config.pincode_config.pincode_enabled = config_switch(w2);
#if PACKETVER < 20110309
if( pincode_config.pincode_enabled ) {
#if PACKETVER < 20110309
if( charserv_config.pincode_config.pincode_enabled ) {
ShowWarning("pincode_enabled requires PACKETVER 20110309 or higher. Disabling...\n");
pincode_config.pincode_enabled = false;
charserv_config.pincode_config.pincode_enabled = false;
}
#endif
#endif
} else if (strcmpi(w1, "pincode_changetime") == 0) {
charserv_config.pincode_config.pincode_changetime = atoi(w2)*60*60*24;
} else if (strcmpi(w1, "pincode_maxtry") == 0) {
Expand Down
9 changes: 3 additions & 6 deletions src/char/char_clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,16 +819,13 @@ int chclif_parse_createnewchar(int fd, struct char_session_data* sd,int cmd){
if( (charserv_config.char_new)==0 ) //turn character creation on/off [Kevin]
i = -2;
else {
if (cmd == 0x970){
i = char_make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOW(fd,27),RFIFOW(fd,29));
RFIFOSKIP(fd,31);
}
else if(cmd == 0x67){
#if PACKETVER < 20120307
i = char_make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27),RFIFOB(fd,28),RFIFOB(fd,29),RFIFOB(fd,30),RFIFOB(fd,31),RFIFOB(fd,32),RFIFOW(fd,33),RFIFOW(fd,35));
RFIFOSKIP(fd,37);
#else
i = char_make_new_char_sql(sd, (char*)RFIFOP(fd,2),RFIFOB(fd,26),RFIFOW(fd,27),RFIFOW(fd,29));
RFIFOSKIP(fd,31);
#endif
}
}

//'Charname already exists' (-1), 'Char creation denied' (-2) and 'You are underaged' (-3)
Expand Down

0 comments on commit 869d9be

Please sign in to comment.