From 974222a8d3f189083205bf5d330de04a43226ad3 Mon Sep 17 00:00:00 2001 From: Smokexyz Date: Thu, 2 Mar 2017 19:24:48 +0800 Subject: Implementation of Item Options System. Allows the infusing of equipments with bonus item options. This feature is constrained to clients of packet versions greater than or equal to `20150226`. Item Options and their effects are defined server-side in `db/item_options.conf` and client side in `data/luafiles514/lua files/datainfo/addrandomoptionnametable.lub` The ID of the option must tally with the correct index of the description provided in the client side lua file to avoid bugs. IT_OPT_* keys and MAX_ITEM_OPTIONS macro are also exported from the source as constants. An additional flag `disable_options` has been added to sql, and as `DisableOptions: true/false (boolean, defaults to false !!for equipments only!!)` to item_db.conf files. Script commands documentation is also included. SQL file updates are included. Credits: [Smokexyz](https://github.com/Smokexyz) Style and Script Fixes by [Asheraf](https://github.com/Asheraf) Initial design Idea by [secretdataz](https://github.com/secretdataz) --- .../HPMHooking/HPMHooking_map.HPMHooksCore.inc | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc') diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index bd055cac2..cdd2386a6 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1860,8 +1860,8 @@ struct { struct HPMHookPoint *HP_clif_pNPCMarketClosed_post; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_pre; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post; - struct HPMHookPoint *HP_clif_add_random_options_pre; - struct HPMHookPoint *HP_clif_add_random_options_post; + struct HPMHookPoint *HP_clif_add_item_options_pre; + struct HPMHookPoint *HP_clif_add_item_options_post; struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre; struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; struct HPMHookPoint *HP_clif_dressroom_open_pre; @@ -2682,6 +2682,8 @@ struct { struct HPMHookPoint *HP_itemdb_read_chains_post; struct HPMHookPoint *HP_itemdb_read_packages_pre; struct HPMHookPoint *HP_itemdb_read_packages_post; + struct HPMHookPoint *HP_itemdb_read_options_pre; + struct HPMHookPoint *HP_itemdb_read_options_post; struct HPMHookPoint *HP_itemdb_write_cached_packages_pre; struct HPMHookPoint *HP_itemdb_write_cached_packages_post; struct HPMHookPoint *HP_itemdb_read_cached_packages_pre; @@ -2698,6 +2700,8 @@ struct { struct HPMHookPoint *HP_itemdb_search_post; struct HPMHookPoint *HP_itemdb_exists_pre; struct HPMHookPoint *HP_itemdb_exists_post; + struct HPMHookPoint *HP_itemdb_option_exists_pre; + struct HPMHookPoint *HP_itemdb_option_exists_post; struct HPMHookPoint *HP_itemdb_in_group_pre; struct HPMHookPoint *HP_itemdb_in_group_post; struct HPMHookPoint *HP_itemdb_group_item_pre; @@ -2762,6 +2766,8 @@ struct { struct HPMHookPoint *HP_itemdb_gendercheck_post; struct HPMHookPoint *HP_itemdb_validate_entry_pre; struct HPMHookPoint *HP_itemdb_validate_entry_post; + struct HPMHookPoint *HP_itemdb_readdb_options_additional_fields_pre; + struct HPMHookPoint *HP_itemdb_readdb_options_additional_fields_post; struct HPMHookPoint *HP_itemdb_readdb_additional_fields_pre; struct HPMHookPoint *HP_itemdb_readdb_additional_fields_post; struct HPMHookPoint *HP_itemdb_readdb_job_sub_pre; @@ -2778,6 +2784,8 @@ struct { struct HPMHookPoint *HP_itemdb_destroy_item_data_post; struct HPMHookPoint *HP_itemdb_final_sub_pre; struct HPMHookPoint *HP_itemdb_final_sub_post; + struct HPMHookPoint *HP_itemdb_options_final_sub_pre; + struct HPMHookPoint *HP_itemdb_options_final_sub_post; struct HPMHookPoint *HP_itemdb_clear_pre; struct HPMHookPoint *HP_itemdb_clear_post; struct HPMHookPoint *HP_itemdb_id2combo_pre; @@ -7899,8 +7907,8 @@ struct { int HP_clif_pNPCMarketClosed_post; int HP_clif_pNPCMarketPurchase_pre; int HP_clif_pNPCMarketPurchase_post; - int HP_clif_add_random_options_pre; - int HP_clif_add_random_options_post; + int HP_clif_add_item_options_pre; + int HP_clif_add_item_options_post; int HP_clif_pHotkeyRowShift_pre; int HP_clif_pHotkeyRowShift_post; int HP_clif_dressroom_open_pre; @@ -8721,6 +8729,8 @@ struct { int HP_itemdb_read_chains_post; int HP_itemdb_read_packages_pre; int HP_itemdb_read_packages_post; + int HP_itemdb_read_options_pre; + int HP_itemdb_read_options_post; int HP_itemdb_write_cached_packages_pre; int HP_itemdb_write_cached_packages_post; int HP_itemdb_read_cached_packages_pre; @@ -8737,6 +8747,8 @@ struct { int HP_itemdb_search_post; int HP_itemdb_exists_pre; int HP_itemdb_exists_post; + int HP_itemdb_option_exists_pre; + int HP_itemdb_option_exists_post; int HP_itemdb_in_group_pre; int HP_itemdb_in_group_post; int HP_itemdb_group_item_pre; @@ -8801,6 +8813,8 @@ struct { int HP_itemdb_gendercheck_post; int HP_itemdb_validate_entry_pre; int HP_itemdb_validate_entry_post; + int HP_itemdb_readdb_options_additional_fields_pre; + int HP_itemdb_readdb_options_additional_fields_post; int HP_itemdb_readdb_additional_fields_pre; int HP_itemdb_readdb_additional_fields_post; int HP_itemdb_readdb_job_sub_pre; @@ -8817,6 +8831,8 @@ struct { int HP_itemdb_destroy_item_data_post; int HP_itemdb_final_sub_pre; int HP_itemdb_final_sub_post; + int HP_itemdb_options_final_sub_pre; + int HP_itemdb_options_final_sub_post; int HP_itemdb_clear_pre; int HP_itemdb_clear_post; int HP_itemdb_id2combo_pre; -- cgit v1.2.3-70-g09d2