summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
authorDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-06 17:22:40 +0000
committerDracoRPG <DracoRPG@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-06 17:22:40 +0000
commitded1f674755335a9cbb5c08e321b4a4c092a0e8d (patch)
tree4ff5231731935b41f9ef1fdccf9b14ef5b4e85b3 /src/char_sql/char.c
parent2d75543b172d4cf141278bbd224e2353f19b5c86 (diff)
downloadhercules-ded1f674755335a9cbb5c08e321b4a4c092a0e8d.tar.gz
hercules-ded1f674755335a9cbb5c08e321b4a4c092a0e8d.tar.bz2
hercules-ded1f674755335a9cbb5c08e321b4a4c092a0e8d.tar.xz
hercules-ded1f674755335a9cbb5c08e321b4a4c092a0e8d.zip
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
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c21
1 files changed, 9 insertions, 12 deletions
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)