diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-07-06 21:40:49 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-07-06 21:44:18 -0700 |
commit | 0b8e004a6b70834d1bcb913c704cc83071defa40 (patch) | |
tree | 2b569f01d747783633c485718111d66be15f98a2 /src | |
parent | 7a056b1c5244450523f752835f2a4d569b8b1d63 (diff) | |
download | tmwa-0b8e004a6b70834d1bcb913c704cc83071defa40.tar.gz tmwa-0b8e004a6b70834d1bcb913c704cc83071defa40.tar.bz2 tmwa-0b8e004a6b70834d1bcb913c704cc83071defa40.tar.xz tmwa-0b8e004a6b70834d1bcb913c704cc83071defa40.zip |
Make all mobs do radius-0 splash damage.
Diffstat (limited to 'src')
-rw-r--r-- | src/map/mob.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 2402245..439287e 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -893,6 +893,16 @@ static int mob_check_attack (struct mob_data *md) return 1; } +static int mob_ancillary_attack(struct block_list *bl, va_list ap) +{ + struct block_list *mdbl = va_arg(ap, struct block_list *); + struct block_list *tbl = va_arg(ap, struct block_list *); + unsigned int tick = va_arg(ap, unsigned int); + if (bl != tbl) + battle_weapon_attack(mdbl, bl, tick, 0); + return 0; +} + /*========================================== * Attack processing of mob *------------------------------------------ @@ -919,6 +929,11 @@ static int mob_attack (struct mob_data *md, unsigned int tick, int data) return 0; md->target_lv = battle_weapon_attack (&md->bl, tbl, tick, 0); + // If you are reading this, please note: + // it is highly platform-specific that this even works at all. + if (tbl->type == BL_PC) + map_foreachincell(mob_ancillary_attack, tbl->m, tbl->x, tbl->y, BL_PC, + &md->bl, tbl, tick); if (!(battle_config.monster_cloak_check_type & 2) && md->sc_data[SC_CLOAKING].timer != -1) |