summaryrefslogtreecommitdiff
path: root/src/emap/init.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-02 19:06:39 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-02 19:06:39 +0300
commit1fc6228436311da0d70f14176fe47f3e37f6faa6 (patch)
tree9434c90ab44ac55200daa199f524fa11f3168678 /src/emap/init.c
parent00d1b8bf9fc3648730904b6f86696417f4445037 (diff)
downloadplugin-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.gz
plugin-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.bz2
plugin-1fc6228436311da0d70f14176fe47f3e37f6faa6.tar.xz
plugin-1fc6228436311da0d70f14176fe47f3e37f6faa6.zip
Update function hook prototypes for support new hercules.
Diffstat (limited to 'src/emap/init.c')
-rw-r--r--src/emap/init.c189
1 files changed, 94 insertions, 95 deletions
diff --git a/src/emap/init.c b/src/emap/init.c
index cdd3b34..5210524 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -171,101 +171,99 @@ HPExport void plugin_init (void)
addPacket(0xb14, 3, map_parse_homun_emote, hpClif_Parse);
addPacket(0xb15, 9, map_parse_homun_dir, hpClif_Parse);
- addHookPre("atcommand->msgfd", eatcommand_msgfd);
- addHookPre("atcommand->msgsd", eatcommand_msgsd);
+ addHookPre(atcommand, msgfd, eatcommand_msgfd_pre);
+ addHookPre(atcommand, msgsd, eatcommand_msgsd_pre);
+ addHookPre(bg, team_warp, ebg_team_warp_pre);
+ addHookPre(pc, can_Adopt, epc_can_Adopt_pre);
+ addHookPre(pc, adoption, epc_adoption_pre);
+ addHookPre(pc, readparam, epc_readparam_pre);
+ addHookPre(pc, setregistry, epc_setregistry_pre);
+ addHookPre(pc, equipitem_pos, epc_equipitem_pos_pre);
+ addHookPre(pc, unequipitem_pos, epc_unequipitem_pos_pre);
+ addHookPre(pc, can_attack, epc_can_attack_pre);
+ addHookPre(pc, takeitem, epc_takeitem_pre);
+ addHookPre(pc, validate_levels, epc_validate_levels_pre);
+ addHookPre(pc, check_job_name, epc_check_job_name_pre);
+ addHookPre(pc, delitem, epc_delitem_pre);
+ addHookPre(pc, dropitem, epc_dropitem_pre);
+ addHookPre(pc, insert_card, epc_insert_card_pre);
+ addHookPre(pc, process_chat_message, epc_process_chat_message_pre);
+ addHookPre(mob, deleteslave_sub, emob_deleteslave_sub_pre);
+ addHookPre(mob, read_db_additional_fields, emob_read_db_additional_fields_pre);
+ addHookPre(npc, parse_unknown_mapflag, enpc_parse_unknown_mapflag_pre);
+ addHookPre(npc, buysellsel, enpc_buysellsel_pre);
+ addHookPre(npc, db_checkid, enpc_db_checkid_pre);
+ addHookPre(clif, quest_send_list, eclif_quest_send_list_pre);
+ addHookPre(clif, quest_add, eclif_quest_add_pre);
+ addHookPre(clif, charnameack, eclif_charnameack_pre);
+ addHookPre(clif, getareachar_item, eclif_getareachar_item_pre);
+ addHookPre(clif, dropflooritem, eclif_dropflooritem_pre);
+ addHookPre(clif, disp_message, eclif_disp_message_pre);
+ addHookPre(clif, sendlook, eclif_sendlook_pre);
+ addHookPre(clif, send, eclif_send_pre);
+ addHookPre(clif, sendbgemblem_area, eclif_sendbgemblem_area_pre);
+ addHookPre(clif, sendbgemblem_single, eclif_sendbgemblem_single_pre);
+ addHookPre(clif, set_unit_idle, eclif_set_unit_idle_pre);
+ addHookPre(clif, set_unit_walking, eclif_set_unit_walking_pre);
+ addHookPre(clif, send_actual, eclif_send_actual_pre);
+ addHookPre(clif, pLoadEndAck, eclif_parse_LoadEndAck_pre);
+ addHookPre(clif, spawn_unit, eclif_spawn_unit_pre);
+ addHookPre(itemdb, is_item_usable, eitemdb_is_item_usable_pre);
+ addHookPre(itemdb, readdb_additional_fields, eitemdb_readdb_additional_fields_pre);
+ addHookPre(itemdb, destroy_item_data, edestroy_item_data_pre);
+ addHookPre(unit, can_move, eunit_can_move_pre);
+ addHookPre(unit, walktoxy, eunit_walktoxy_pre);
+ addHookPre(mail, invalid_operation, email_invalid_operation_pre);
+ addHookPre(map, list_final, edo_final_maps_pre);
+ addHookPre(map, cell2gat, emap_cell2gat_pre);
+ addHookPre(map, gat2cell, emap_gat2cell_pre);
+ addHookPre(map, getcellp, emap_getcellp_pre);
+ addHookPre(map, setgatcell, emap_setgatcell_pre);
+ addHookPre(map, iwall_set, emap_iwall_set_pre);
+ addHookPre(map, iwall_get, emap_iwall_get_pre);
+ addHookPre(map, iwall_remove, emap_iwall_remove_pre);
+ addHookPre(script, get_val_npc_num, eget_val_npcscope_num_pre);
+ addHookPre(script, get_val_ref_num, eget_val_npcscope_num_pre);
+ addHookPre(script, get_val_npc_str, eget_val_npcscope_str_pre);
+ addHookPre(script, get_val_ref_str, eget_val_npcscope_str_pre);
+ addHookPre(script, set_reg_npc_num, eset_reg_npcscope_num_pre);
+ addHookPre(script, set_reg_ref_num, eset_reg_npcscope_num_pre);
+ addHookPre(script, set_reg_npc_str, eset_reg_npcscope_str_pre);
+ addHookPre(script, set_reg_ref_str, eset_reg_npcscope_str_pre);
+ addHookPre(script, reload, escript_reload_pre);
+ addHookPre(script, load_translations, escript_load_translations_pre);
+ addHookPre(script, load_parameters, escript_load_parameters_pre);
+ addHookPre(status, calc_pc_additional, estatus_calc_pc_additional_pre);
- addHookPre("bg->team_warp", ebg_team_warp);
- addHookPre("pc->can_Adopt", epc_can_Adopt_pre);
- addHookPre("pc->adoption", epc_adoption_pre);
- addHookPre("pc->readparam", epc_readparam_pre);
- addHookPre("pc->setregistry", epc_setregistry);
- addHookPre("pc->equipitem_pos", epc_equipitem_pos);
- addHookPre("pc->unequipitem_pos", epc_unequipitem_pos);
- addHookPre("pc->can_attack", epc_can_attack);
- addHookPre("pc->takeitem", epc_takeitem);
- addHookPre("pc->validate_levels", epc_validate_levels);
- addHookPre("pc->check_job_name", epc_check_job_name);
- addHookPre("pc->delitem", epc_delitem_pre);
- addHookPre("pc->dropitem", epc_dropitem_pre);
- addHookPre("pc->takeitem", epc_takeitem_pre);
- addHookPre("pc->insert_card", epc_insert_card_pre);
- addHookPre("pc->process_chat_message", epc_process_chat_message_pre);
- addHookPre("mob->deleteslave_sub", emob_deleteslave_sub);
- addHookPre("mob->read_db_additional_fields", emob_read_db_additional_fields);
- addHookPre("npc->parse_unknown_mapflag", enpc_parse_unknown_mapflag);
- addHookPre("npc->buysellsel", enpc_buysellsel);
- addHookPre("npc->db_checkid", enpc_db_checkid);
- addHookPre("clif->quest_send_list", eclif_quest_send_list);
- addHookPre("clif->quest_add", eclif_quest_add);
- addHookPre("clif->charnameack", eclif_charnameack);
- addHookPre("clif->getareachar_item", eclif_getareachar_item);
- addHookPre("clif->dropflooritem", eclif_dropflooritem);
- addHookPre("clif->disp_message", eclif_disp_message);
- addHookPre("clif->sendlook", eclif_sendlook);
- addHookPre("clif->send", eclif_send);
- addHookPre("clif->sendbgemblem_area", eclif_sendbgemblem_area);
- addHookPre("clif->sendbgemblem_single", eclif_sendbgemblem_single);
- addHookPre("clif->set_unit_idle", eclif_set_unit_idle);
- addHookPre("clif->set_unit_walking", eclif_set_unit_walking_pre);
- addHookPre("clif->send_actual", eclif_send_actual);
- addHookPre("clif->pLoadEndAck", eclif_parse_LoadEndAck_pre);
- addHookPre("clif->spawn_unit", eclif_spawn_unit_pre);
- addHookPre("itemdb->is_item_usable", eitemdb_is_item_usable);
- addHookPre("itemdb->readdb_additional_fields", eitemdb_readdb_additional_fields);
- addHookPre("itemdb->destroy_item_data", edestroy_item_data);
- addHookPre("unit->can_move", eunit_can_move);
- addHookPre("unit->walktoxy", eunit_walktoxy);
- addHookPre("mail->invalid_operation", email_invalid_operation);
- addHookPre("map->list_final", edo_final_maps);
- addHookPre("map->cell2gat", emap_cell2gat);
- addHookPre("map->gat2cell", emap_gat2cell);
- addHookPre("map->getcellp", emap_getcellp);
- addHookPre("map->setgatcell", emap_setgatcell);
- addHookPre("map->iwall_set", emap_iwall_set);
- addHookPre("map->iwall_get", emap_iwall_get);
- addHookPre("map->iwall_remove", emap_iwall_remove);
- addHookPre("script->get_val_npc_num", eget_val_npcscope_num);
- addHookPre("script->get_val_ref_num", eget_val_npcscope_num);
- addHookPre("script->get_val_npc_str", eget_val_npcscope_str);
- addHookPre("script->get_val_ref_str", eget_val_npcscope_str);
- addHookPre("script->set_reg_npc_num", eset_reg_npcscope_num);
- addHookPre("script->set_reg_ref_num", eset_reg_npcscope_num);
- addHookPre("script->set_reg_npc_str", eset_reg_npcscope_str);
- addHookPre("script->set_reg_ref_str", eset_reg_npcscope_str);
- addHookPre("script->reload", escript_reload);
- addHookPre("script->load_translations", escript_load_translations);
- addHookPre("script->load_parameters", escript_load_parameters);
- addHookPre("status->calc_pc_additional", estatus_calc_pc_additional);
-
- addHookPost("clif->getareachar_unit", eclif_getareachar_unit_post);
- addHookPost("clif->authok", eclif_authok_post);
- addHookPost("clif->changemap", eclif_changemap_post);
- addHookPost("clif->set_unit_idle", eclif_set_unit_idle_post);
- addHookPost("clif->pLoadEndAck", eclif_parse_LoadEndAck_post);
- addHookPost("clif->spawn", eclif_spawn_post);
- addHookPost("clif->damage", eclif_damage_post);
- addHookPost("status->set_viewdata", estatus_set_viewdata_post);
- addHookPost("status->read_job_db_sub", estatus_read_job_db_sub);
- addHookPost("status->calc_pc_", estatus_calc_pc__post);
- addHookPost("status->calc_speed", estatus_calc_speed_post);
- addHookPost("clif->set_unit_walking", eclif_set_unit_walking_post);
- addHookPost("clif->move", eclif_move);
- addHookPost("map->addflooritem", emap_addflooritem_post);
- addHookPost("mob->read_db_mode_sub", emob_read_db_mode_sub_post);
- addHookPost("skill->check_condition_castend", eskill_check_condition_castend_post);
- addHookPost("pc->additem", epc_additem_post);
- addHookPost("pc->isequip", epc_isequip_post);
- addHookPost("pc->isUseitem", epc_isequip_post);
- addHookPost("pc->useitem", epc_useitem_post);
- addHookPost("pc->equipitem", epc_equipitem_post);
- addHookPost("pc->unequipitem", epc_unequipitem_post);
- addHookPost("pc->setnewpc", epc_setnewpc_post);
- addHookPost("pc->dead", epc_dead_post);
- addHookPost("pc->delitem", epc_delitem_post);
- addHookPost("pc->dropitem", epc_dropitem_post);
- addHookPost("pc->takeitem", epc_takeitem_post);
- addHookPost("pc->can_insert_card_into", epc_can_insert_card_into_post);
- addHookPost("pc->insert_card", epc_insert_card_post);
+ addHookPost(clif, getareachar_unit, eclif_getareachar_unit_post);
+ addHookPost(clif, authok, eclif_authok_post);
+ addHookPost(clif, changemap, eclif_changemap_post);
+ addHookPost(clif, set_unit_idle, eclif_set_unit_idle_post);
+ addHookPost(clif, pLoadEndAck, eclif_parse_LoadEndAck_post);
+ addHookPost(clif, spawn, eclif_spawn_post);
+ addHookPost(clif, damage, eclif_damage_post);
+ addHookPost(clif, set_unit_walking, eclif_set_unit_walking_post);
+ addHookPost(clif, move, eclif_move_post);
+ addHookPost(status, set_viewdata, estatus_set_viewdata_post);
+ addHookPost(status, read_job_db_sub, estatus_read_job_db_sub_post);
+ addHookPost(status, calc_pc_, estatus_calc_pc__post);
+ addHookPost(status, calc_speed, estatus_calc_speed_post);
+ addHookPost(map, addflooritem, emap_addflooritem_post);
+ addHookPost(mob, read_db_mode_sub, emob_read_db_mode_sub_post);
+ addHookPost(skill, check_condition_castend, eskill_check_condition_castend_post);
+ addHookPost(pc, additem, epc_additem_post);
+ addHookPost(pc, isequip, epc_isequip_post);
+ addHookPost(pc, isUseitem, epc_isequip_post);
+ addHookPost(pc, useitem, epc_useitem_post);
+ addHookPost(pc, equipitem, epc_equipitem_post);
+ addHookPost(pc, unequipitem, epc_unequipitem_post);
+ addHookPost(pc, setnewpc, epc_setnewpc_post);
+ addHookPost(pc, dead, epc_dead_post);
+ addHookPost(pc, delitem, epc_delitem_post);
+ addHookPost(pc, dropitem, epc_dropitem_post);
+ addHookPost(pc, takeitem, epc_takeitem_post);
+ addHookPost(pc, can_insert_card_into, epc_can_insert_card_into_post);
+ addHookPost(pc, insert_card, epc_insert_card_post);
langScriptId = script->add_str("Lang");
mountScriptId = script->add_str("mount");
@@ -283,7 +281,8 @@ HPExport void server_preinit (void)
addMapInterConf("default_y", config_default_y);
addMapInterConf("warn_missing_translation", config_warn_missing_translation);
- addHookPre("quest->read_db_sub", equest_read_db_sub);
+ addHookPre(quest, read_db_sub, equest_read_db_sub_pre);
+
addGroupPermission("send_gm", permission_send_gm_flag);
addGroupPermission("show_client_version", permission_show_client_version_flag);
}