summaryrefslogtreecommitdiff
path: root/src/map/atcommand.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/map/atcommand.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/map/atcommand.c')
-rw-r--r--src/map/atcommand.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index f77d04044..2ce3009eb 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1310,7 +1310,7 @@ int atcommand_send(const int fd, struct map_session_data* sd, const char* comman
*/
int atcommand_rura( const int fd, struct map_session_data* sd, const char* command, const char* message)
{
- char map_name[MAP_NAME_LENGTH];
+ char map_name[MAP_NAME_LENGTH_EXT];
unsigned short mapindex;
int x = 0, y = 0;
int m = -1;
@@ -1698,7 +1698,7 @@ int atcommand_whomap3(const int fd, struct map_session_data* sd, const char* com
int i, count, users;
int pl_GM_level, GM_level;
int map_id;
- char map_name[MAP_NAME_LENGTH];
+ char map_name[MAP_NAME_LENGTH_EXT];
memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(map_name, '\0', sizeof(map_name));
@@ -1752,7 +1752,7 @@ int atcommand_whomap2(const int fd, struct map_session_data* sd, const char* com
int i, count, users;
int pl_GM_level, GM_level;
int map_id = 0;
- char map_name[MAP_NAME_LENGTH];
+ char map_name[MAP_NAME_LENGTH_EXT];
nullpo_retr(-1, sd);
@@ -1810,7 +1810,7 @@ int atcommand_whomap(const int fd, struct map_session_data* sd, const char* comm
int i, count, users;
int pl_GM_level, GM_level;
int map_id = 0;
- char map_name[MAP_NAME_LENGTH];
+ char map_name[MAP_NAME_LENGTH_EXT];
struct guild *g;
struct party_data *p;
@@ -3190,10 +3190,10 @@ int atcommand_go(const int fd, struct map_session_data* sd, const char* command,
{
int i;
int town;
- char map_name[MAP_NAME_LENGTH];
+ char map_name[MAP_NAME_LENGTH_EXT];
int m;
- const struct { char map[MAP_NAME_LENGTH]; int x, y; } data[] = {
+ const struct { char map[MAP_NAME_LENGTH_EXT]; int x, y; } data[] = {
{ MAP_PRONTERA, 156, 191 }, // 0=Prontera
{ MAP_MORROC, 156, 93 }, // 1=Morroc
{ MAP_GEFFEN, 119, 59 }, // 2=Geffen
@@ -3250,7 +3250,7 @@ int atcommand_go(const int fd, struct map_session_data* sd, const char* command,
return -1;
} else {
// get possible name of the city
- map_name[MAP_NAME_LENGTH-1] = '\0';
+ map_name[MAP_NAME_LENGTH_EXT-1] = '\0';
for (i = 0; map_name[i]; i++)
map_name[i] = TOLOWER(map_name[i]);
// try to see if it's a name, and not a number (try a lot of possibilities, write errors and abbreviations too)
@@ -3636,7 +3636,7 @@ static int atkillmonster_sub(struct block_list *bl, va_list ap)
void atcommand_killmonster_sub(const int fd, struct map_session_data* sd, const char* message, const int drop)
{
int map_id;
- char map_name[MAP_NAME_LENGTH];
+ char map_name[MAP_NAME_LENGTH_EXT];
if (!sd) return;
@@ -5432,8 +5432,8 @@ int atcommand_mapinfo(const int fd, struct map_session_data* sd, const char* com
}
if (atcmd_player_name[0] == '\0') {
- memcpy(atcmd_player_name, mapindex_id2name(sd->mapindex), MAP_NAME_LENGTH);
- atcmd_player_name[MAP_NAME_LENGTH] = '\0';
+ memcpy(atcmd_player_name, mapindex_id2name(sd->mapindex), MAP_NAME_LENGTH_EXT);
+ atcmd_player_name[MAP_NAME_LENGTH_EXT] = '\0';
m_id = map_mapindex2mapid(sd->mapindex);
} else {
m_id = map_mapname2mapid(atcmd_player_name);