diff options
author | Andrei Karas <akaras@inbox.ru> | 2020-06-08 13:46:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2020-06-16 05:10:55 +0300 |
commit | a496359909959ae1dca2c95e830c63aa37f714d5 (patch) | |
tree | 8b3bfaf9fe949f96b5ec952d79833ce11e9fb584 /src | |
parent | ad15a28454e81aa1258868a5002eab0c31fabf2f (diff) | |
download | hercules-a496359909959ae1dca2c95e830c63aa37f714d5.tar.gz hercules-a496359909959ae1dca2c95e830c63aa37f714d5.tar.bz2 hercules-a496359909959ae1dca2c95e830c63aa37f714d5.tar.xz hercules-a496359909959ae1dca2c95e830c63aa37f714d5.zip |
Call all plugin events even if map server running in minimal mode
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 2 | ||||
-rw-r--r-- | src/map/map.c | 8 |
2 files changed, 8 insertions, 2 deletions
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); } |