summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authormomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-10 19:44:12 +0000
committermomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-10 19:44:12 +0000
commit5d9d3adf3fd4795bf2483ec8549ddc30e01629db (patch)
treeb31963fe134a1e8a5cc694123b80bde0aab03418 /src/map/atcommand.c
parent1fc55f1687f9d99ac7270b28082a5f0727640469 (diff)
downloadhercules-5d9d3adf3fd4795bf2483ec8549ddc30e01629db.tar.gz
hercules-5d9d3adf3fd4795bf2483ec8549ddc30e01629db.tar.bz2
hercules-5d9d3adf3fd4795bf2483ec8549ddc30e01629db.tar.xz
hercules-5d9d3adf3fd4795bf2483ec8549ddc30e01629db.zip
- Modified *monster and *areamonster script commands to allow size and ai parameters.
-- Event parameter now no longer works as size & ai replacement. -- If not defined, it'll assume the default size (0 = medium) and default ai (0 = none). - Changed all hardcoded AI states to recently created enum. Please test, if you find any bugs, report on our Bug Tracker. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16904 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index ab7e41c3f..2f54b110e 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2077,6 +2077,7 @@ ACMD_FUNC(monster)
int count;
int i, k, range;
short mx, my;
+ unsigned int size;
nullpo_retr(-1, sd);
memset(name, '\0', sizeof(name));
@@ -2128,9 +2129,11 @@ ACMD_FUNC(monster)
number = battle_config.atc_spawn_quantity_limit;
if (strcmp(command+1, "monstersmall") == 0)
- strcpy(eventname, "2");
+ size = SZ_MEDIUM; // This is just gorgeous [mkbu95]
else if (strcmp(command+1, "monsterbig") == 0)
- strcpy(eventname, "4");
+ size = SZ_BIG;
+ else
+ size = SZ_SMALL;
if (battle_config.etc_log)
ShowInfo("%s monster='%s' name='%s' id=%d count=%d (%d,%d)\n", command, monster, name, mob_id, number, sd->bl.x, sd->bl.y);
@@ -2139,7 +2142,7 @@ ACMD_FUNC(monster)
range = (int)sqrt((float)number) +2; // calculation of an odd number (+ 4 area around)
for (i = 0; i < number; i++) {
map_search_freecell(&sd->bl, 0, &mx, &my, range, range, 0);
- k = mob_once_spawn(sd, sd->bl.m, mx, my, name, mob_id, 1, eventname);
+ k = mob_once_spawn(sd, sd->bl.m, mx, my, name, mob_id, 1, eventname, size, AI_NONE);
count += (k != 0) ? 1 : 0;
}
@@ -6368,7 +6371,7 @@ ACMD_FUNC(summon)
return -1;
}
- md = mob_once_spawn_sub(&sd->bl, sd->bl.m, -1, -1, "--ja--", mob_id, "");
+ md = mob_once_spawn_sub(&sd->bl, sd->bl.m, -1, -1, "--ja--", mob_id, "", SZ_SMALL, AI_NONE);
if(!md)
return -1;