From 929ac35fb4e18b5c71ad267d692a5c7da28cd7fa Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 8 Feb 2006 00:39:47 +0000 Subject: - Fixed Char-SQL server setting up the save/last point to the novice grounds when either x, y or the map is 0. - Commented the char server setting up Prontera as default point when there's none (this bug should not exist) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5218 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/char/char.c | 3 ++- src/char_sql/char.c | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 94da347ff..be54eec80 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS 2006/02/07 + * Fixed char server changing the save/last point to new grounds in certain + situations. [Skotlex] * Fixed SG_STAR_ANGER not getting it's damage bonus at all. [Skotlex] 2006/02/06 * Added a custom exp table that goes up to level 1000 (db/exp2.txt). [Skotlex] diff --git a/src/char/char.c b/src/char/char.c index acb7779d7..3cc5fc69b 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -352,13 +352,14 @@ int mmo_char_tostr(char *str, struct mmo_charstatus *p, struct global_reg *reg, int i,j; char *str_p = str; + /* We shouldn't need this anymore... [Skotlex] // on multi-map server, sometimes it's posssible that last_point become void. (reason???) We check that to not lost character at restart. if (!p->last_point.map) { p->last_point.map = mapindex_name2id(MAP_PRONTERA); p->last_point.x = 273; p->last_point.y = 354; } - + */ str_p += sprintf(str_p, "%d\t%d,%d\t%s\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d" "\t%s,%d,%d\t%s,%d,%d,%d,%d,%d,%d,%d\t", diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 9029ba773..b8c467fb3 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -955,13 +955,13 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus *p){ strcat (t_msg, " status2"); } else ShowError("Char load failed (%d - table %s)\n", char_id, char_db); //Error?! ERRRRRR WHAT THAT SAY!? - +/* We shouldn't need this at all! [Skotlex] if (p->last_point.x == 0 || p->last_point.y == 0 || p->last_point.map == 0) memcpy(&p->last_point, &start_point, sizeof(start_point)); if (p->save_point.x == 0 || p->save_point.y == 0 || p->save_point.map == 0) memcpy(&p->save_point, &start_point, sizeof(start_point)); - +*/ //read memo data //`memo` (`memo_id`,`char_id`,`map`,`x`,`y`) sprintf(tmp_sql, "SELECT `map`,`x`,`y` FROM `%s` WHERE `char_id`='%d' ORDER by `memo_id`",memo_db, char_id); // TBR -- cgit v1.2.3-70-g09d2