From 7d33212f95653edd621961487f5622611d62ae88 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 14 Feb 2013 21:12:18 -0200 Subject: New Mapflag adjust_unit_duration Made as a improvement of the original ADJUST_TRAP_DURATION -- special thanks to Muad_Dib! . This mapflag allows you to control the duration of unit skills in any map, for example. "prontera mapflag adjust_unit_duration PR_SANCTUARY 50" halves the duration of sanctuary in prontera Another Example: "prontera mapflag adjust_unit_duration WZ_QUAGMIRE 250" Increases duration of quagmire by 2.5 times in prontera map. Be aware that some skill units have their visual effect durations not controlled by the server (e.g. storm gust). Signed-off-by: shennetsind --- src/map/map.c | 61 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 17 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index a42d7abca..1ffffdf59 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2894,13 +2894,41 @@ int map_delmap(char* mapname) return 0; } +void map_data_clean(void) { + int i; + + for( i = 0; i < map_num; i++ ) { + + if(map[i].cell) aFree(map[i].cell); + if(map[i].block) aFree(map[i].block); + if(map[i].block_mob) aFree(map[i].block_mob); + + if(battle_config.dynamic_mobs) { //Dynamic mobs flag by [random] + int j; + if(map[i].mob_delete_timer != INVALID_TIMER) + delete_timer(map[i].mob_delete_timer, map_removemobs_timer); + for (j=0; jdestroy(map_db, map_db_final); - for (i=0; i