@@ -51719,29 +51719,55 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) {
5171951719 }
5172051720 return retVal___;
5172151721}
51722- struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) {
51722+ void HP_mob_setdropitem_options(struct item *item, struct optdrop_group *options) {
51723+ int hIndex = 0;
51724+ if (HPMHooks.count.HP_mob_setdropitem_options_pre > 0) {
51725+ void (*preHookFunc) (struct item **item, struct optdrop_group **options);
51726+ *HPMforce_return = false;
51727+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_pre; hIndex++) {
51728+ preHookFunc = HPMHooks.list.HP_mob_setdropitem_options_pre[hIndex].func;
51729+ preHookFunc(&item, &options);
51730+ }
51731+ if (*HPMforce_return) {
51732+ *HPMforce_return = false;
51733+ return;
51734+ }
51735+ }
51736+ {
51737+ HPMHooks.source.mob.setdropitem_options(item, options);
51738+ }
51739+ if (HPMHooks.count.HP_mob_setdropitem_options_post > 0) {
51740+ void (*postHookFunc) (struct item *item, struct optdrop_group *options);
51741+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_post; hIndex++) {
51742+ postHookFunc = HPMHooks.list.HP_mob_setdropitem_options_post[hIndex].func;
51743+ postHookFunc(item, options);
51744+ }
51745+ }
51746+ return;
51747+ }
51748+ struct item_drop* HP_mob_setdropitem(int nameid, struct optdrop_group *options, int qty, struct item_data *data) {
5172351749 int hIndex = 0;
5172451750 struct item_drop* retVal___ = NULL;
5172551751 if (HPMHooks.count.HP_mob_setdropitem_pre > 0) {
51726- struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data **data);
51752+ struct item_drop* (*preHookFunc) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data);
5172751753 *HPMforce_return = false;
5172851754 for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++) {
5172951755 preHookFunc = HPMHooks.list.HP_mob_setdropitem_pre[hIndex].func;
51730- retVal___ = preHookFunc(&nameid, &qty, &data);
51756+ retVal___ = preHookFunc(&nameid, &options, & qty, &data);
5173151757 }
5173251758 if (*HPMforce_return) {
5173351759 *HPMforce_return = false;
5173451760 return retVal___;
5173551761 }
5173651762 }
5173751763 {
51738- retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data);
51764+ retVal___ = HPMHooks.source.mob.setdropitem(nameid, options, qty, data);
5173951765 }
5174051766 if (HPMHooks.count.HP_mob_setdropitem_post > 0) {
51741- struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data);
51767+ struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data);
5174251768 for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_post; hIndex++) {
5174351769 postHookFunc = HPMHooks.list.HP_mob_setdropitem_post[hIndex].func;
51744- retVal___ = postHookFunc(retVal___, nameid, qty, data);
51770+ retVal___ = postHookFunc(retVal___, nameid, options, qty, data);
5174551771 }
5174651772 }
5174751773 return retVal___;
@@ -52634,6 +52660,87 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) {
5263452660 }
5263552661 return;
5263652662}
52663+ bool HP_mob_read_optdrops_optslot(struct config_setting_t *optslot, int n, int group_id, const char *group) {
52664+ int hIndex = 0;
52665+ bool retVal___ = false;
52666+ if (HPMHooks.count.HP_mob_read_optdrops_optslot_pre > 0) {
52667+ bool (*preHookFunc) (struct config_setting_t **optslot, int *n, int *group_id, const char **group);
52668+ *HPMforce_return = false;
52669+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_pre; hIndex++) {
52670+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_pre[hIndex].func;
52671+ retVal___ = preHookFunc(&optslot, &n, &group_id, &group);
52672+ }
52673+ if (*HPMforce_return) {
52674+ *HPMforce_return = false;
52675+ return retVal___;
52676+ }
52677+ }
52678+ {
52679+ retVal___ = HPMHooks.source.mob.read_optdrops_optslot(optslot, n, group_id, group);
52680+ }
52681+ if (HPMHooks.count.HP_mob_read_optdrops_optslot_post > 0) {
52682+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group);
52683+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_post; hIndex++) {
52684+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_post[hIndex].func;
52685+ retVal___ = postHookFunc(retVal___, optslot, n, group_id, group);
52686+ }
52687+ }
52688+ return retVal___;
52689+ }
52690+ bool HP_mob_read_optdrops_group(struct config_setting_t *group, int n) {
52691+ int hIndex = 0;
52692+ bool retVal___ = false;
52693+ if (HPMHooks.count.HP_mob_read_optdrops_group_pre > 0) {
52694+ bool (*preHookFunc) (struct config_setting_t **group, int *n);
52695+ *HPMforce_return = false;
52696+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_pre; hIndex++) {
52697+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_pre[hIndex].func;
52698+ retVal___ = preHookFunc(&group, &n);
52699+ }
52700+ if (*HPMforce_return) {
52701+ *HPMforce_return = false;
52702+ return retVal___;
52703+ }
52704+ }
52705+ {
52706+ retVal___ = HPMHooks.source.mob.read_optdrops_group(group, n);
52707+ }
52708+ if (HPMHooks.count.HP_mob_read_optdrops_group_post > 0) {
52709+ bool (*postHookFunc) (bool retVal___, struct config_setting_t *group, int n);
52710+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_post; hIndex++) {
52711+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_post[hIndex].func;
52712+ retVal___ = postHookFunc(retVal___, group, n);
52713+ }
52714+ }
52715+ return retVal___;
52716+ }
52717+ bool HP_mob_read_optdrops_db(void) {
52718+ int hIndex = 0;
52719+ bool retVal___ = false;
52720+ if (HPMHooks.count.HP_mob_read_optdrops_db_pre > 0) {
52721+ bool (*preHookFunc) (void);
52722+ *HPMforce_return = false;
52723+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_pre; hIndex++) {
52724+ preHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_pre[hIndex].func;
52725+ retVal___ = preHookFunc();
52726+ }
52727+ if (*HPMforce_return) {
52728+ *HPMforce_return = false;
52729+ return retVal___;
52730+ }
52731+ }
52732+ {
52733+ retVal___ = HPMHooks.source.mob.read_optdrops_db();
52734+ }
52735+ if (HPMHooks.count.HP_mob_read_optdrops_db_post > 0) {
52736+ bool (*postHookFunc) (bool retVal___);
52737+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_post; hIndex++) {
52738+ postHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_post[hIndex].func;
52739+ retVal___ = postHookFunc(retVal___);
52740+ }
52741+ }
52742+ return retVal___;
52743+ }
5263752744void HP_mob_readdb(void) {
5263852745 int hIndex = 0;
5263952746 if (HPMHooks.count.HP_mob_readdb_pre > 0) {
@@ -52900,6 +53007,33 @@ uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t)
5290053007 }
5290153008 return retVal___;
5290253009}
53010+ struct optdrop_group* HP_mob_read_db_drops_option(struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate) {
53011+ int hIndex = 0;
53012+ struct optdrop_group* retVal___ = NULL;
53013+ if (HPMHooks.count.HP_mob_read_db_drops_option_pre > 0) {
53014+ struct optdrop_group* (*preHookFunc) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate);
53015+ *HPMforce_return = false;
53016+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_pre; hIndex++) {
53017+ preHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_pre[hIndex].func;
53018+ retVal___ = preHookFunc(&entry, &item_name, &drop, &drop_rate);
53019+ }
53020+ if (*HPMforce_return) {
53021+ *HPMforce_return = false;
53022+ return retVal___;
53023+ }
53024+ }
53025+ {
53026+ retVal___ = HPMHooks.source.mob.read_db_drops_option(entry, item_name, drop, drop_rate);
53027+ }
53028+ if (HPMHooks.count.HP_mob_read_db_drops_option_post > 0) {
53029+ struct optdrop_group* (*postHookFunc) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate);
53030+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_post; hIndex++) {
53031+ postHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_post[hIndex].func;
53032+ retVal___ = postHookFunc(retVal___, entry, item_name, drop, drop_rate);
53033+ }
53034+ }
53035+ return retVal___;
53036+ }
5290353037void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) {
5290453038 int hIndex = 0;
5290553039 if (HPMHooks.count.HP_mob_read_db_stats_sub_pre > 0) {
@@ -53303,6 +53437,32 @@ void HP_mob_destroy_mob_db(int index) {
5330353437 }
5330453438 return;
5330553439}
53440+ void HP_mob_destroy_drop_groups(void) {
53441+ int hIndex = 0;
53442+ if (HPMHooks.count.HP_mob_destroy_drop_groups_pre > 0) {
53443+ void (*preHookFunc) (void);
53444+ *HPMforce_return = false;
53445+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_pre; hIndex++) {
53446+ preHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_pre[hIndex].func;
53447+ preHookFunc();
53448+ }
53449+ if (*HPMforce_return) {
53450+ *HPMforce_return = false;
53451+ return;
53452+ }
53453+ }
53454+ {
53455+ HPMHooks.source.mob.destroy_drop_groups();
53456+ }
53457+ if (HPMHooks.count.HP_mob_destroy_drop_groups_post > 0) {
53458+ void (*postHookFunc) (void);
53459+ for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_post; hIndex++) {
53460+ postHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_post[hIndex].func;
53461+ postHookFunc();
53462+ }
53463+ }
53464+ return;
53465+ }
5330653466bool HP_mob_skill_db_libconfig(const char *filename, bool ignore_missing) {
5330753467 int hIndex = 0;
5330853468 bool retVal___ = false;
0 commit comments