diff options
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/HPMchar.h | 1 | ||||
-rw-r--r-- | src/char/char.c | 59 | ||||
-rw-r--r-- | src/char/int_quest.h | 1 | ||||
-rw-r--r-- | src/char/inter.c | 2 |
4 files changed, 43 insertions, 20 deletions
diff --git a/src/char/HPMchar.h b/src/char/HPMchar.h index 594bb7f00..e3e000ef3 100644 --- a/src/char/HPMchar.h +++ b/src/char/HPMchar.h @@ -22,4 +22,3 @@ void HPM_char_do_final(void); void HPM_char_do_init(void); #endif /* CHAR_HPMCHAR_H */ - 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); diff --git a/src/char/int_quest.h b/src/char/int_quest.h index c2393d103..442995826 100644 --- a/src/char/int_quest.h +++ b/src/char/int_quest.h @@ -20,4 +20,3 @@ void inter_quest_defaults(void); HPShared struct inter_quest_interface *inter_quest; #endif /* CHAR_INT_QUEST_H */ - diff --git a/src/char/inter.c b/src/char/inter.c index 548b24ee8..65048a9f9 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -953,7 +953,7 @@ int mapif_wis_message(struct WisData *wd) wd->len = 0; if (wd->len >= sizeof(wd->msg) - 1) wd->len = sizeof(wd->msg) - 1; - + WBUFW(buf, 0) = 0x3801; WBUFW(buf, 2) = 56 +wd->len; WBUFL(buf, 4) = wd->id; |