diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2019-11-27 02:50:08 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2020-02-09 20:19:12 +0100 |
commit | 30c175a9041a17e0d2ef1d4750163c19ab3a7959 (patch) | |
tree | 8d4accec56aa49efaf40e2e4d3b8ac40a03f0259 /src/map/map.c | |
parent | c76c63d2dddb8c7ec4461dd660b7bb0210f4db96 (diff) | |
download | hercules-30c175a9041a17e0d2ef1d4750163c19ab3a7959.tar.gz hercules-30c175a9041a17e0d2ef1d4750163c19ab3a7959.tar.bz2 hercules-30c175a9041a17e0d2ef1d4750163c19ab3a7959.tar.xz hercules-30c175a9041a17e0d2ef1d4750163c19ab3a7959.zip |
Change unload NPC behavior to kill mobs that were spawned by unloaded NPC (non-permanent monster spawns) [Issue #2530]
Mobs spawned by NPC will be removed on @reloadnpc, @unloadnpc, and @unloadnpcfile.
Additionally OnNPCUnload NPC label was added, to revert other changes made by NPC. For example set/removed mapflags or added mob drops.
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c index 9a45c4d21..8b52fc761 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -6092,7 +6092,7 @@ static int cleanup_sub(struct block_list *bl, va_list ap) map->quit(BL_UCAST(BL_PC, bl)); break; case BL_NPC: - npc->unload(BL_UCAST(BL_NPC, bl), false); + npc->unload(BL_UCAST(BL_NPC, bl), false, true); break; case BL_MOB: unit->free(bl,CLR_OUTSIGHT); |