diff options
author | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-09 00:26:36 +0000 |
---|---|---|
committer | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-09 00:26:36 +0000 |
commit | bfb15e68b763800587fa57727fc4baaa0e5e2800 (patch) | |
tree | cc8f52cc370b811d5662c6c69fcabb1c94a1207f /src/map/atcommand.c | |
parent | 9c8991447ced838c88037dbbf76cf04a970e25dd (diff) | |
download | hercules-bfb15e68b763800587fa57727fc4baaa0e5e2800.tar.gz hercules-bfb15e68b763800587fa57727fc4baaa0e5e2800.tar.bz2 hercules-bfb15e68b763800587fa57727fc4baaa0e5e2800.tar.xz hercules-bfb15e68b763800587fa57727fc4baaa0e5e2800.zip |
- Removed backup.pl (for TXT servers) and vs9-to-vs8.php (outdated versions);
- Merged @killmonster2 with @killmonster tid:73632;
- Fixed bugreport:6764, auction code was misplaced;
- Follow up to r16753 (bugreport:6523), fixed bugreport:6673, using Gravitational Field with Safety Wall would keep the character immobilized. Blame myself, thankyou Lunar for the fix;
- Fixed bugreport:6514, @slaveclone wouldn't be targeted by monster. Thanks to zippy;
- Fixed bugreport:6837, some code was duplicated;
- Fixed bugreport:6768, removed some leftovers from TXT removal;
- Fixed bugreport:6868, Unequipping a weapon with Incantation Samurai card will not kill you if you have less than 999 hp and are on a non-pvp map;
- Fixed wrong bit field on ai field in mob_data structure. Credits to Ind.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16881 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 45f14be6f..b7b59940e 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2179,12 +2179,11 @@ static int atkillmonster_sub(struct block_list *bl, va_list ap) return 1; } -void atcommand_killmonster_sub(const int fd, struct map_session_data* sd, const char* message, const int drop) +ACMD_FUNC(killmonster) { - int map_id; + int map_id, drop_flag; char map_name[MAP_NAME_LENGTH_EXT]; - - if (!sd) return; + nullpo_retr(-1, sd); memset(map_name, '\0', sizeof(map_name)); @@ -2194,26 +2193,13 @@ void atcommand_killmonster_sub(const int fd, struct map_session_data* sd, const if ((map_id = map_mapname2mapid(map_name)) < 0) map_id = sd->bl.m; } + + drop_flag = strcmp(command+1, "killmonster2"); - map_foreachinmap(atkillmonster_sub, map_id, BL_MOB, drop); + map_foreachinmap(atkillmonster_sub, map_id, BL_MOB, -drop_flag); clif_displaymessage(fd, msg_txt(165)); // All monsters killed! - return; -} - -ACMD_FUNC(killmonster) -{ - atcommand_killmonster_sub(fd, sd, message, 1); - return 0; -} - -/*========================================== - * - *------------------------------------------*/ -ACMD_FUNC(killmonster2) -{ - atcommand_killmonster_sub(fd, sd, message, 0); return 0; } @@ -8866,7 +8852,7 @@ void atcommand_basecommands(void) { ACMD_DEF2("monstersmall", monster), ACMD_DEF2("monsterbig", monster), ACMD_DEF(killmonster), - ACMD_DEF(killmonster2), + ACMD_DEF2("killmonster2", killmonster), ACMD_DEF(refine), ACMD_DEF(produce), ACMD_DEF(memo), |