From ded1f674755335a9cbb5c08e321b4a4c092a0e8d Mon Sep 17 00:00:00 2001 From: DracoRPG Date: Fri, 6 Apr 2007 17:22:40 +0000 Subject: I'm still here! Rewrote fame ranking lists- changed MAP_NAME_LENGTH to 12, now there's MAP_NAME_LENGTH_EXT at 16 for uses where there is / may be the .gat extension, code adjusted accordingly - moved map_normalize_name to mapindex_normalize_name so that everything handling map names uses the same extension-removing function - greatly enhanced the map cache generator, complete documentation on the tool and the map cache format can be found in doc/ - the map cache format changed a bit as a consequence, but of course a new valid one is included (contains latest Nameless Island maps) - fixed a duplicate entry in map index git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10167 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char_sql/char.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/char_sql') diff --git a/src/char_sql/char.c b/src/char_sql/char.c index b0de20e75..a0c780cb9 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -3340,13 +3340,12 @@ int parse_char(int fd) { //Send player to map. uint32 subnet_map_ip; - char map_name[MAP_NAME_LENGTH]; - snprintf(map_name, MAP_NAME_LENGTH, "%s.gat", mapindex_id2name(char_dat.last_point.map)); - + char map_name[MAP_NAME_LENGTH_EXT]; + snprintf(map_name, MAP_NAME_LENGTH_EXT, "%s.gat", mapindex_id2name(char_dat.last_point.map)); WFIFOHEAD(fd,28); WFIFOW(fd,0) = 0x71; WFIFOL(fd,2) = char_dat.char_id; - memcpy(WFIFOP(fd,6), map_name, MAP_NAME_LENGTH); + memcpy(WFIFOP(fd,6), map_name, MAP_NAME_LENGTH_EXT); // Advanced subnet check [LuzZza] subnet_map_ip = lan_subnetcheck(ipl); @@ -4024,17 +4023,15 @@ int char_config_read(const char *cfgName) { } else if (strcmpi(w1, "save_log") == 0) { save_log = config_switch(w2); } else if (strcmpi(w1, "start_point") == 0) { - char map[MAP_NAME_LENGTH]; + char map[MAP_NAME_LENGTH_EXT]; int x, y; if (sscanf(w2, "%16[^,],%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.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.x = x; + start_point.y = y; } else if (strcmpi(w1, "start_zeny") == 0) { start_zeny = atoi(w2); if (start_zeny < 0) -- cgit v1.2.3-70-g09d2