From a496359909959ae1dca2c95e830c63aa37f714d5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 13:46:52 +0300 Subject: Call all plugin events even if map server running in minimal mode --- src/map/battle.c | 2 ++ src/map/map.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 611154953..d8c1be83e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7681,6 +7681,8 @@ static void do_init_battle(bool minimal) static void do_final_battle(void) { + if (map->minimal) + return; ers_destroy(battle->delay_damage_ers); } diff --git a/src/map/map.c b/src/map/map.c index 644994c09..3312680da 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -6743,8 +6743,8 @@ int do_init(int argc, char *argv[]) timer->add_func_list(map->removemobs_timer, "map_removemobs_timer"); timer->add_interval(timer->gettick()+1000, map->freeblock_timer, 0, 0, 60*1000); - HPM->event(HPET_INIT); } + HPM->event(HPET_INIT); atcommand->init(minimal); battle->init(minimal); @@ -6791,8 +6791,12 @@ int do_init(int argc, char *argv[]) exit(EXIT_SUCCESS); } - if( minimal ) { + if (minimal) { HPM->event(HPET_READY); + HPM->event(HPET_FINAL); + battle->final(); + HPM_map_do_final(); + HPM->event(HPET_POST_FINAL); exit(EXIT_SUCCESS); } -- cgit v1.2.3-70-g09d2