diff options
author | shennetsind <ind@henn.et> | 2013-03-01 15:59:09 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-03-01 15:59:09 -0300 |
commit | 858e0f3d0d3e760b6b3060fe669685202bbd189c (patch) | |
tree | 4c9723f3a6e8925723f4b054dc3347aa24eba2e6 /src/map/map.c | |
parent | 0f3e2cb1cc2889d463f6595a9c922f4c037a4709 (diff) | |
download | hercules-858e0f3d0d3e760b6b3060fe669685202bbd189c.tar.gz hercules-858e0f3d0d3e760b6b3060fe669685202bbd189c.tar.bz2 hercules-858e0f3d0d3e760b6b3060fe669685202bbd189c.tar.xz hercules-858e0f3d0d3e760b6b3060fe669685202bbd189c.zip |
Hercules Renewal: battle.c
http://hercules.ws/board/topic/237-hercules-renewal/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/map/map.c b/src/map/map.c index b43fc2f1a..8cd8bee95 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -525,7 +525,7 @@ struct skill_unit* map_find_skill_unit_oncell(struct block_list* target,int16 x, unit = (struct skill_unit *) bl; if( unit == out_unit || !unit->alive || !unit->group || unit->group->skill_id != skill_id ) continue; - if( !(flag&1) || battle_check_target(&unit->bl,target,unit->group->target_flag) > 0 ) + if( !(flag&1) || battle->check_target(&unit->bl,target,unit->group->target_flag) > 0 ) return unit; } return NULL; @@ -3639,7 +3639,7 @@ void do_final(void) chrif_flush_fifo(); do_final_atcommand(); - do_final_battle(); + battle->final(); do_final_chrif(); do_final_clif(); do_final_npc(); @@ -3919,7 +3919,9 @@ int do_init(int argc, char *argv[]) chrif_setip(ip_str); } - battle_config_read(BATTLE_CONF_FILENAME); + battle_defaults(); + + battle->config_read(BATTLE_CONF_FILENAME); msg_config_read(MSG_CONF_NAME); script_config_read(SCRIPT_CONF_NAME); inter_config_read(INTER_CONF_NAME); @@ -3943,7 +3945,7 @@ int do_init(int argc, char *argv[]) mapindex_init(); if(enable_grf) grfio_init(GRF_PATH_FILENAME); - + map_readallmaps(); add_timer_func_list(map_freeblock_timer, "map_freeblock_timer"); @@ -3952,7 +3954,7 @@ int do_init(int argc, char *argv[]) add_timer_interval(gettick()+1000, map_freeblock_timer, 0, 0, 60*1000); do_init_atcommand(); - do_init_battle(); + battle->init(); do_init_instance(); do_init_chrif(); do_init_clif(); |