summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-24 17:46:16 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-24 17:46:16 +0000
commitd719a7dcec9a7f99c7c945f3d4effa386b102bab (patch)
treecc06514d11a5d25f2dd741ea1a9b781c512a87f4 /src/map/atcommand.c
parentf753f361a3fabcb9b14746ead47dac7e9a0d8ab7 (diff)
downloadhercules-d719a7dcec9a7f99c7c945f3d4effa386b102bab.tar.gz
hercules-d719a7dcec9a7f99c7c945f3d4effa386b102bab.tar.bz2
hercules-d719a7dcec9a7f99c7c945f3d4effa386b102bab.tar.xz
hercules-d719a7dcec9a7f99c7c945f3d4effa386b102bab.zip
- Cleaned up @grind2
- Updated @monsterbig, @monstersmall to use the event 2 and 4 rather than the max_mob_db code check. - Modified override_mobs_names to work only on the mob spawn files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6252 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index e0b066d66..d09db40b9 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3532,7 +3532,7 @@ int atcommand_monstersmall(
my = sd->bl.y + (rand() % 11 - 5);
else
my = y;
- count += (mob_once_spawn((struct map_session_data*)sd, "this", mx, my, name, mob_id+MAX_MOB_DB, 1, "") != 0) ? 1 : 0;
+ count += (mob_once_spawn((struct map_session_data*)sd, "this", mx, my, name, mob_id, 1, "2") != 0) ? 1 : 0;
}
if (count != 0)
@@ -3609,7 +3609,7 @@ int atcommand_monsterbig(
my = sd->bl.y + (rand() % 11 - 5);
else
my = y;
- count += (mob_once_spawn((struct map_session_data*)sd, "this", mx, my, name, mob_id+2*MAX_MOB_DB, 1, "") != 0) ? 1 : 0;
+ count += (mob_once_spawn((struct map_session_data*)sd, "this", mx, my, name, mob_id, 1, "4") != 0) ? 1 : 0;
}
if (count != 0)
@@ -7526,12 +7526,14 @@ int
atcommand_grind2(const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
- int i, x, y, id;
+ int i;
+ short x, y;
- for (i = 1000; i <2000; i++) {
- x = sd->bl.x + (rand() % 10 - 5);
- y = sd->bl.y + (rand() % 10 - 5);
- id = mob_once_spawn(sd, "this", x, y, "--ja--", i, 1, "");
+ for (i = 1000; i < MAX_MOB_DB; i++) {
+ if (!mobdb_checkid(i))
+ continue;
+ map_search_freecell(&sd->bl, 0, &x, &y, 5, 5, 0);
+ mob_once_spawn(sd, "this", x, y, "--ja--", i, 1, "");
}
return 0;