summaryrefslogtreecommitdiff
path: root/src/map
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
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')
-rw-r--r--src/map/atcommand.c3
-rw-r--r--src/map/charcommand.c3
-rw-r--r--src/map/map.c44
3 files changed, 15 insertions, 35 deletions
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;
}