diff options
author | shennetsind <ind@henn.et> | 2013-02-14 23:12:19 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-02-14 23:12:19 -0200 |
commit | ef49bfc4445d464f19f84d78a2e6a1a5a3d9f0ac (patch) | |
tree | df150223d48b5379d47a365c05a143691c79cdf6 /src/map/map.c | |
parent | 7d33212f95653edd621961487f5622611d62ae88 (diff) | |
download | hercules-ef49bfc4445d464f19f84d78a2e6a1a5a3d9f0ac.tar.gz hercules-ef49bfc4445d464f19f84d78a2e6a1a5a3d9f0ac.tar.bz2 hercules-ef49bfc4445d464f19f84d78a2e6a1a5a3d9f0ac.tar.xz hercules-ef49bfc4445d464f19f84d78a2e6a1a5a3d9f0ac.zip |
New Mapflag adjust_skill_damage
Made as a improvement of the original ADJUST_SKILL_DAMAGE -- special thanks to Muad_Dib! .
This mapflag allows you to modify the damage of any skill in any map, for example
"prontera mapflag adjust_skill_damage MG_FIREBOLT 200"
doubles the damage of Firebolt in prontera
Another Example:
"prontera mapflag adjust_skill_damage MG_FIREBOLT 50"
Halves the damage of Firebolt in prontera.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/src/map/map.c b/src/map/map.c index 1ffffdf59..dde922f39 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2894,8 +2894,8 @@ int map_delmap(char* mapname) return 0; } -void map_data_clean(void) { - int i; +void do_final_maps(void) { + int i, v = 0; for( i = 0; i < map_num; i++ ) { @@ -2912,21 +2912,34 @@ void map_data_clean(void) { } if( map[i].unit_count ) { - int v; for(v = 0; v < map[i].unit_count; v++) { aFree(map[i].units[v]); } - aFree(map[i].units); + if( map[i].units ) { + aFree(map[i].units); + map[i].units = NULL; + } map[i].unit_count = 0; } + if( map[i].skill_count ) { + for(v = 0; v < map[i].skill_count; v++) { + aFree(map[i].skills[v]); + } + if( map[i].skills ) { + aFree(map[i].skills); + map[i].skills = NULL; + } + map[i].skill_count = 0; + } + } } /// Initializes map flags and adjusts them depending on configuration. void map_flags_init(void) { - int i; + int i, v = 0; for( i = 0; i < map_num; i++ ) { // mapflags @@ -2940,13 +2953,22 @@ void map_flags_init(void) { memset(map[i].drop_list, 0, sizeof(map[i].drop_list)); // pvp nightmare drop list if( map[i].unit_count ) { - int v; for(v = 0; v < map[i].unit_count; v++) { aFree(map[i].units[v]); } aFree(map[i].units); - map[i].unit_count = 0; } + map[i].units = NULL; + map[i].unit_count = 0; + + if( map[i].skill_count ) { + for(v = 0; v < map[i].skill_count; v++) { + aFree(map[i].skills[v]); + } + aFree(map[i].skills); + } + map[i].skills = NULL; + map[i].skill_count = 0; // adjustments if( battle_config.pk_mode ) @@ -3637,10 +3659,9 @@ void do_final(void) do_final_battleground(); do_final_duel(); do_final_elemental(); - + do_final_maps(); + map_db->destroy(map_db, map_db_final); - - map_data_clean(); mapindex_final(); if(enable_grf) |