summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-13 20:24:08 +0000
committerDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-13 20:24:08 +0000
commited39bb7197c749c28f1de75a4219329465b0fa08 (patch)
treef0b59d7408c3725da780acc84f8e00e55311a786 /src/char/char.c
parent6f11fef3afc1a235628ff21aa2f2348abab4a97f (diff)
downloadhercules-ed39bb7197c749c28f1de75a4219329465b0fa08.tar.gz
hercules-ed39bb7197c749c28f1de75a4219329465b0fa08.tar.bz2
hercules-ed39bb7197c749c28f1de75a4219329465b0fa08.tar.xz
hercules-ed39bb7197c749c28f1de75a4219329465b0fa08.zip
Mapcache update, should polish off remaining bugs
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10003 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 54fa75c68..5a29a1344 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -3539,11 +3539,15 @@ int parse_char(int fd) {
ShowWarning("Unable to find map-server for '%s', sending to major city '%s'.\n", mapindex_id2name(cd->last_point.map), mapindex_id2name(j));
cd->last_point.map = j;
}
- { //Send player to map
+ {
+ //Send player to map
+ char map_name[MAP_NAME_LENGTH];
+ snprintf(map_name, MAP_NAME_LENGTH, "%s.gat", mapindex_id2name(cd->last_point.map));
+
WFIFOHEAD(fd, 28);
WFIFOW(fd,0) = 0x71;
WFIFOL(fd,2) = cd->char_id;
- memcpy(WFIFOP(fd,6), mapindex_id2name(cd->last_point.map), MAP_NAME_LENGTH);
+ memcpy(WFIFOP(fd,6), map_name, MAP_NAME_LENGTH);
// Advanced subnet check [LuzZza]
if((subnet_map_ip = lan_subnetcheck((long *)p)))
@@ -4170,15 +4174,13 @@ int char_config_read(const char *cfgName) {
int x, y;
if (sscanf(w2, "%[^,],%d,%d", map, &x, &y) < 3)
continue;
- if (strstr(map, ".gat") != NULL) { // Verify at least if '.gat' is in the map name
- 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.map = 0;
- }
- start_point.x = x;
- start_point.y = y;
+ 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.map = 0;
}
+ start_point.x = x;
+ start_point.y = y;
} else if(strcmpi(w1,"log_char")==0) { //log char or not [devil]
log_char = atoi(w2);
} else if (strcmpi(w1, "start_zeny") == 0) {
@@ -4318,7 +4320,7 @@ int do_init(int argc, char **argv) {
int i;
mapindex_init(); //Needed here for the start-point reading.
- start_point.map = mapindex_name2id("new_zone01.gat");
+ start_point.map = mapindex_name2id("new_zone01");
char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
char_lan_config_read((argc > 3) ? argv[3] : LOGIN_LAN_CONF_NAME);