diff options
Diffstat (limited to 'src/char/char.c')
-rw-r--r-- | src/char/char.c | 59 |
1 files changed, 42 insertions, 17 deletions
diff --git a/src/char/char.c b/src/char/char.c index 819cd2ef8..3cc8853a4 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -140,7 +140,11 @@ struct fame_list chemist_fame_list[MAX_FAME_LIST]; struct fame_list taekwon_fame_list[MAX_FAME_LIST]; // Initial position (it's possible to set it in conf file) -struct point start_point = { 0, 53, 111 }; +#ifdef RENEWAL + struct point start_point = { 0, 97, 90 }; +#else + struct point start_point = { 0, 53, 111 }; +#endif unsigned short skillid2idx[MAX_SKILL_ID]; @@ -2410,7 +2414,7 @@ void char_changesex(int account_id, int sex) * Performs the necessary operations when changing a character's sex, such as * correcting the job class and unequipping items, and propagating the * information to the guild data. - * + * * @param sex The new sex (SEX_MALE or SEX_FEMALE). * @param acc The character's account ID. * @param char_id The character ID. @@ -2479,7 +2483,7 @@ int char_parse_fromlogin_changesex_reply(int fd) SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &char_id, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &class_, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &guild_id, 0, NULL, NULL); - + for (i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i) { char_change_sex_sub(sex, acc, char_id, class_, guild_id); } @@ -3451,7 +3455,7 @@ void char_ask_name_ack(int fd, int acc, const char* name, int type, int result) * Changes a character's sex. * The information is updated on database, and the character is kicked if it * currently is online. - * + * * @param char_id The character's ID. * @param sex The new sex. * @retval 0 in case of success. @@ -3475,7 +3479,7 @@ int char_changecharsex(int char_id, int sex) SQL->GetData(inter->sql_handle, 1, &data, NULL); class_ = atoi(data); SQL->GetData(inter->sql_handle, 2, &data, NULL); guild_id = atoi(data); SQL->FreeResult(inter->sql_handle); - + if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `sex` = '%c' WHERE `char_id` = '%d'", char_db, sex == SEX_MALE ? 'M' : 'F', char_id)) { Sql_ShowDebug(inter->sql_handle); return 1; @@ -5639,17 +5643,33 @@ int char_config_read(const char* cfgName) autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; } else if (strcmpi(w1, "save_log") == 0) { save_log = config_switch(w2); - } else if (strcmpi(w1, "start_point") == 0) { - char map[MAP_NAME_LENGTH_EXT]; - int x, y; - if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) - continue; - start_point.map = mapindex->name2id(map); - if (!start_point.map) - ShowError("Specified start_point %s not found in map-index cache.\n", map); - start_point.x = x; - start_point.y = y; - } else if (strcmpi(w1, "start_items") == 0) { + } + #ifdef RENEWAL + else if (strcmpi(w1, "start_point") == 0) { + char map[MAP_NAME_LENGTH_EXT]; + int x, y; + if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) + continue; + start_point.map = mapindex->name2id(map); + if (!start_point.map) + ShowError("Specified start_point %s not found in map-index cache.\n", map); + start_point.x = x; + start_point.y = y; + } + #else + else if (strcmpi(w1, "start_point_pre") == 0) { + char map[MAP_NAME_LENGTH_EXT]; + int x, y; + if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) + continue; + start_point.map = mapindex->name2id(map); + if (!start_point.map) + ShowError("Specified start_point_pre %s not found in map-index cache.\n", map); + start_point.x = x; + start_point.y = y; + } + #endif + else if (strcmpi(w1, "start_items") == 0) { int i; char *split; @@ -5876,7 +5896,12 @@ int do_init(int argc, char **argv) { //Read map indexes mapindex->init(); - start_point.map = mapindex->name2id("new_zone01"); + + #ifdef RENEWAL + start_point.map = mapindex->name2id("iz_int"); + #else + start_point.map = mapindex->name2id("new_1-1"); + #endif cmdline->exec(argc, argv, CMDLINE_OPT_NORMAL); chr->config_read(chr->CHAR_CONF_NAME); |