From 436a6910525b26aa26c56b40199f582589cec53c Mon Sep 17 00:00:00 2001 From: ultramage Date: Sun, 12 Aug 2007 20:13:17 +0000 Subject: * Replaced some mob_avail.txt entries with a simple example entry * Removed "Crusader quest monsters" from mob_avail (not used anymore) * Updated the mapcache with data for moscovia maps * Fixed one problem in map_delmap() * Fixed a bad message in @disguise git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10988 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 3 ++- src/map/charcommand.c | 3 ++- src/map/map.c | 44 +++++++++++--------------------------------- 3 files changed, 15 insertions(+), 35 deletions(-) (limited to 'src/map') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 80a68792d..5b512a85c 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6110,7 +6110,8 @@ int atcommand_disguise(const int fd, struct map_session_data* sd, const char* co if(pc_isriding(sd)) { - clif_displaymessage(fd, msg_txt(227)); // Character cannot wear disguise while riding a PecoPeco. + //FIXME: wrong message + //clif_displaymessage(fd, msg_txt(227)); // Character cannot wear disguise while riding a PecoPeco. return -1; } diff --git a/src/map/charcommand.c b/src/map/charcommand.c index bfd41f346..cee5f995e 100644 --- a/src/map/charcommand.c +++ b/src/map/charcommand.c @@ -3278,7 +3278,8 @@ int charcommand_disguise(const int fd, struct map_session_data* sd, const char* if(pc_isriding(pl_sd)) { - clif_displaymessage(fd, msg_txt(228)); // Character cannot wear disguise while riding a PecoPeco. + //FIXME: wrong message + //clif_displaymessage(fd, msg_txt(228)); // Character cannot wear disguise while riding a PecoPeco. return -1; } diff --git a/src/map/map.c b/src/map/map.c index 566915a3c..8d3e06e54 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2109,38 +2109,14 @@ int map_check_dir(int s_dir,int t_dir) if(s_dir == t_dir) return 0; switch(s_dir) { - case 0: - if(t_dir == 7 || t_dir == 1 || t_dir == 0) - return 0; - break; - case 1: - if(t_dir == 0 || t_dir == 2 || t_dir == 1) - return 0; - break; - case 2: - if(t_dir == 1 || t_dir == 3 || t_dir == 2) - return 0; - break; - case 3: - if(t_dir == 2 || t_dir == 4 || t_dir == 3) - return 0; - break; - case 4: - if(t_dir == 3 || t_dir == 5 || t_dir == 4) - return 0; - break; - case 5: - if(t_dir == 4 || t_dir == 6 || t_dir == 5) - return 0; - break; - case 6: - if(t_dir == 5 || t_dir == 7 || t_dir == 6) - return 0; - break; - case 7: - if(t_dir == 6 || t_dir == 0 || t_dir == 7) - return 0; - break; + case 0: if(t_dir == 7 || t_dir == 1 || t_dir == 0) return 0; break; + case 1: if(t_dir == 0 || t_dir == 2 || t_dir == 1) return 0; break; + case 2: if(t_dir == 1 || t_dir == 3 || t_dir == 2) return 0; break; + case 3: if(t_dir == 2 || t_dir == 4 || t_dir == 3) return 0; break; + case 4: if(t_dir == 3 || t_dir == 5 || t_dir == 4) return 0; break; + case 5: if(t_dir == 4 || t_dir == 6 || t_dir == 5) return 0; break; + case 6: if(t_dir == 5 || t_dir == 7 || t_dir == 6) return 0; break; + case 7: if(t_dir == 6 || t_dir == 0 || t_dir == 7) return 0; break; } return 1; } @@ -2489,14 +2465,16 @@ static void map_delmapid(int id) int map_delmap(char* mapname) { int i; + char map_name[MAP_NAME_LENGTH]; if (strcmpi(mapname, "all") == 0) { map_num = 0; return 0; } + mapindex_getmapname(mapname, map_name); for(i = 0; i < map_num; i++) { - if (strcmp(map[i].name, mapname) <= 0) { + if (strcmp(map[i].name, map_name) == 0) { map_delmapid(i); return 1; } -- cgit v1.2.3-70-g09d2