summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-12 20:13:17 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-08-12 20:13:17 +0000
commit436a6910525b26aa26c56b40199f582589cec53c (patch)
treefcc8173778e66f48e8b9a5c38229992cd5f9c10d /src/map/map.c
parente8c985a12b225d3583b6a7aad517fcbed13622ca (diff)
downloadhercules-436a6910525b26aa26c56b40199f582589cec53c.tar.gz
hercules-436a6910525b26aa26c56b40199f582589cec53c.tar.bz2
hercules-436a6910525b26aa26c56b40199f582589cec53c.tar.xz
hercules-436a6910525b26aa26c56b40199f582589cec53c.zip
* 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
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c44
1 files changed, 11 insertions, 33 deletions
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;
}