Skip to content

Commit ab40508

Browse files
committed
Regenerate HPM Hook
1 parent 6d38ba0 commit ab40508

File tree

5 files changed

+214
-8
lines changed

5 files changed

+214
-8
lines changed

src/common/HPMDataCheck.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,12 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
591591
{ "mob_chat", sizeof(struct mob_chat), SERVER_TYPE_MAP },
592592
{ "mob_data", sizeof(struct mob_data), SERVER_TYPE_MAP },
593593
{ "mob_db", sizeof(struct mob_db), SERVER_TYPE_MAP },
594+
{ "mob_drop", sizeof(struct mob_drop), SERVER_TYPE_MAP },
594595
{ "mob_interface", sizeof(struct mob_interface), SERVER_TYPE_MAP },
595596
{ "mob_skill", sizeof(struct mob_skill), SERVER_TYPE_MAP },
597+
{ "optdrop_group", sizeof(struct optdrop_group), SERVER_TYPE_MAP },
598+
{ "optdrop_group_option", sizeof(struct optdrop_group_option), SERVER_TYPE_MAP },
599+
{ "optdrop_group_optslot", sizeof(struct optdrop_group_optslot), SERVER_TYPE_MAP },
596600
{ "spawn_info", sizeof(struct spawn_info), SERVER_TYPE_MAP },
597601
#else
598602
#define MAP_MOB_H

src/plugins/HPMHooking/HPMHooking.Defs.inc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5326,8 +5326,10 @@ typedef int (*HPMHOOK_pre_mob_ai_lazy) (int *tid, int64 *tick, int *id, intptr_t
53265326
typedef int (*HPMHOOK_post_mob_ai_lazy) (int retVal___, int tid, int64 tick, int id, intptr_t data);
53275327
typedef int (*HPMHOOK_pre_mob_ai_hard) (int *tid, int64 *tick, int *id, intptr_t *data);
53285328
typedef int (*HPMHOOK_post_mob_ai_hard) (int retVal___, int tid, int64 tick, int id, intptr_t data);
5329-
typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, int *qty, struct item_data **data);
5330-
typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, int qty, struct item_data *data);
5329+
typedef void (*HPMHOOK_pre_mob_setdropitem_options) (struct item **item, struct optdrop_group **options);
5330+
typedef void (*HPMHOOK_post_mob_setdropitem_options) (struct item *item, struct optdrop_group *options);
5331+
typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data);
5332+
typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data);
53315333
typedef struct item_drop* (*HPMHOOK_pre_mob_setlootitem) (struct item **item);
53325334
typedef struct item_drop* (*HPMHOOK_post_mob_setlootitem) (struct item_drop* retVal___, struct item *item);
53335335
typedef int (*HPMHOOK_pre_mob_delay_item_drop) (int *tid, int64 *tick, int *id, intptr_t *data);
@@ -5392,6 +5394,12 @@ typedef unsigned int (*HPMHOOK_pre_mob_drop_adjust) (int *baserate, int *rate_ad
53925394
typedef unsigned int (*HPMHOOK_post_mob_drop_adjust) (unsigned int retVal___, int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max);
53935395
typedef void (*HPMHOOK_pre_mob_item_dropratio_adjust) (int *nameid, int *mob_id, int **rate_adjust);
53945396
typedef void (*HPMHOOK_post_mob_item_dropratio_adjust) (int nameid, int mob_id, int *rate_adjust);
5397+
typedef bool (*HPMHOOK_pre_mob_read_optdrops_optslot) (struct config_setting_t **optslot, int *n, int *group_id, const char **group);
5398+
typedef bool (*HPMHOOK_post_mob_read_optdrops_optslot) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group);
5399+
typedef bool (*HPMHOOK_pre_mob_read_optdrops_group) (struct config_setting_t **group, int *n);
5400+
typedef bool (*HPMHOOK_post_mob_read_optdrops_group) (bool retVal___, struct config_setting_t *group, int n);
5401+
typedef bool (*HPMHOOK_pre_mob_read_optdrops_db) (void);
5402+
typedef bool (*HPMHOOK_post_mob_read_optdrops_db) (bool retVal___);
53955403
typedef void (*HPMHOOK_pre_mob_readdb) (void);
53965404
typedef void (*HPMHOOK_post_mob_readdb) (void);
53975405
typedef bool (*HPMHOOK_pre_mob_lookup_const) (const struct config_setting_t **it, const char **name, int **value);
@@ -5412,6 +5420,8 @@ typedef void (*HPMHOOK_pre_mob_read_db_mvpdrops_sub) (struct mob_db **entry, str
54125420
typedef void (*HPMHOOK_post_mob_read_db_mvpdrops_sub) (struct mob_db *entry, struct config_setting_t *t);
54135421
typedef uint32 (*HPMHOOK_pre_mob_read_db_mode_sub) (struct mob_db **entry, struct config_setting_t **t);
54145422
typedef uint32 (*HPMHOOK_post_mob_read_db_mode_sub) (uint32 retVal___, struct mob_db *entry, struct config_setting_t *t);
5423+
typedef struct optdrop_group* (*HPMHOOK_pre_mob_read_db_drops_option) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate);
5424+
typedef struct optdrop_group* (*HPMHOOK_post_mob_read_db_drops_option) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate);
54155425
typedef void (*HPMHOOK_pre_mob_read_db_stats_sub) (struct mob_db **entry, struct config_setting_t **t);
54165426
typedef void (*HPMHOOK_post_mob_read_db_stats_sub) (struct mob_db *entry, struct config_setting_t *t);
54175427
typedef void (*HPMHOOK_pre_mob_name_constants) (void);
@@ -5442,6 +5452,8 @@ typedef int (*HPMHOOK_pre_mob_final_ratio_sub) (union DBKey *key, struct DBData
54425452
typedef int (*HPMHOOK_post_mob_final_ratio_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
54435453
typedef void (*HPMHOOK_pre_mob_destroy_mob_db) (int *index);
54445454
typedef void (*HPMHOOK_post_mob_destroy_mob_db) (int index);
5455+
typedef void (*HPMHOOK_pre_mob_destroy_drop_groups) (void);
5456+
typedef void (*HPMHOOK_post_mob_destroy_drop_groups) (void);
54455457
typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig) (const char **filename, bool *ignore_missing);
54465458
typedef bool (*HPMHOOK_post_mob_skill_db_libconfig) (bool retVal___, const char *filename, bool ignore_missing);
54475459
typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig_sub) (struct config_setting_t **it, int *n);

src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3902,6 +3902,8 @@ struct {
39023902
struct HPMHookPoint *HP_mob_ai_lazy_post;
39033903
struct HPMHookPoint *HP_mob_ai_hard_pre;
39043904
struct HPMHookPoint *HP_mob_ai_hard_post;
3905+
struct HPMHookPoint *HP_mob_setdropitem_options_pre;
3906+
struct HPMHookPoint *HP_mob_setdropitem_options_post;
39053907
struct HPMHookPoint *HP_mob_setdropitem_pre;
39063908
struct HPMHookPoint *HP_mob_setdropitem_post;
39073909
struct HPMHookPoint *HP_mob_setlootitem_pre;
@@ -3968,6 +3970,12 @@ struct {
39683970
struct HPMHookPoint *HP_mob_drop_adjust_post;
39693971
struct HPMHookPoint *HP_mob_item_dropratio_adjust_pre;
39703972
struct HPMHookPoint *HP_mob_item_dropratio_adjust_post;
3973+
struct HPMHookPoint *HP_mob_read_optdrops_optslot_pre;
3974+
struct HPMHookPoint *HP_mob_read_optdrops_optslot_post;
3975+
struct HPMHookPoint *HP_mob_read_optdrops_group_pre;
3976+
struct HPMHookPoint *HP_mob_read_optdrops_group_post;
3977+
struct HPMHookPoint *HP_mob_read_optdrops_db_pre;
3978+
struct HPMHookPoint *HP_mob_read_optdrops_db_post;
39713979
struct HPMHookPoint *HP_mob_readdb_pre;
39723980
struct HPMHookPoint *HP_mob_readdb_post;
39733981
struct HPMHookPoint *HP_mob_lookup_const_pre;
@@ -3988,6 +3996,8 @@ struct {
39883996
struct HPMHookPoint *HP_mob_read_db_mvpdrops_sub_post;
39893997
struct HPMHookPoint *HP_mob_read_db_mode_sub_pre;
39903998
struct HPMHookPoint *HP_mob_read_db_mode_sub_post;
3999+
struct HPMHookPoint *HP_mob_read_db_drops_option_pre;
4000+
struct HPMHookPoint *HP_mob_read_db_drops_option_post;
39914001
struct HPMHookPoint *HP_mob_read_db_stats_sub_pre;
39924002
struct HPMHookPoint *HP_mob_read_db_stats_sub_post;
39934003
struct HPMHookPoint *HP_mob_name_constants_pre;
@@ -4018,6 +4028,8 @@ struct {
40184028
struct HPMHookPoint *HP_mob_final_ratio_sub_post;
40194029
struct HPMHookPoint *HP_mob_destroy_mob_db_pre;
40204030
struct HPMHookPoint *HP_mob_destroy_mob_db_post;
4031+
struct HPMHookPoint *HP_mob_destroy_drop_groups_pre;
4032+
struct HPMHookPoint *HP_mob_destroy_drop_groups_post;
40214033
struct HPMHookPoint *HP_mob_skill_db_libconfig_pre;
40224034
struct HPMHookPoint *HP_mob_skill_db_libconfig_post;
40234035
struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_pre;
@@ -10571,6 +10583,8 @@ struct {
1057110583
int HP_mob_ai_lazy_post;
1057210584
int HP_mob_ai_hard_pre;
1057310585
int HP_mob_ai_hard_post;
10586+
int HP_mob_setdropitem_options_pre;
10587+
int HP_mob_setdropitem_options_post;
1057410588
int HP_mob_setdropitem_pre;
1057510589
int HP_mob_setdropitem_post;
1057610590
int HP_mob_setlootitem_pre;
@@ -10637,6 +10651,12 @@ struct {
1063710651
int HP_mob_drop_adjust_post;
1063810652
int HP_mob_item_dropratio_adjust_pre;
1063910653
int HP_mob_item_dropratio_adjust_post;
10654+
int HP_mob_read_optdrops_optslot_pre;
10655+
int HP_mob_read_optdrops_optslot_post;
10656+
int HP_mob_read_optdrops_group_pre;
10657+
int HP_mob_read_optdrops_group_post;
10658+
int HP_mob_read_optdrops_db_pre;
10659+
int HP_mob_read_optdrops_db_post;
1064010660
int HP_mob_readdb_pre;
1064110661
int HP_mob_readdb_post;
1064210662
int HP_mob_lookup_const_pre;
@@ -10657,6 +10677,8 @@ struct {
1065710677
int HP_mob_read_db_mvpdrops_sub_post;
1065810678
int HP_mob_read_db_mode_sub_pre;
1065910679
int HP_mob_read_db_mode_sub_post;
10680+
int HP_mob_read_db_drops_option_pre;
10681+
int HP_mob_read_db_drops_option_post;
1066010682
int HP_mob_read_db_stats_sub_pre;
1066110683
int HP_mob_read_db_stats_sub_post;
1066210684
int HP_mob_name_constants_pre;
@@ -10687,6 +10709,8 @@ struct {
1068710709
int HP_mob_final_ratio_sub_post;
1068810710
int HP_mob_destroy_mob_db_pre;
1068910711
int HP_mob_destroy_mob_db_post;
10712+
int HP_mob_destroy_drop_groups_pre;
10713+
int HP_mob_destroy_drop_groups_post;
1069010714
int HP_mob_skill_db_libconfig_pre;
1069110715
int HP_mob_skill_db_libconfig_post;
1069210716
int HP_mob_skill_db_libconfig_sub_pre;

src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,6 +2000,7 @@ struct HookingPointData HookingPoints[] = {
20002000
{ HP_POP(mob->ai_sub_lazy, HP_mob_ai_sub_lazy) },
20012001
{ HP_POP(mob->ai_lazy, HP_mob_ai_lazy) },
20022002
{ HP_POP(mob->ai_hard, HP_mob_ai_hard) },
2003+
{ HP_POP(mob->setdropitem_options, HP_mob_setdropitem_options) },
20032004
{ HP_POP(mob->setdropitem, HP_mob_setdropitem) },
20042005
{ HP_POP(mob->setlootitem, HP_mob_setlootitem) },
20052006
{ HP_POP(mob->delay_item_drop, HP_mob_delay_item_drop) },
@@ -2033,6 +2034,9 @@ struct HookingPointData HookingPoints[] = {
20332034
{ HP_POP(mob->clone_delete, HP_mob_clone_delete) },
20342035
{ HP_POP(mob->drop_adjust, HP_mob_drop_adjust) },
20352036
{ HP_POP(mob->item_dropratio_adjust, HP_mob_item_dropratio_adjust) },
2037+
{ HP_POP(mob->read_optdrops_optslot, HP_mob_read_optdrops_optslot) },
2038+
{ HP_POP(mob->read_optdrops_group, HP_mob_read_optdrops_group) },
2039+
{ HP_POP(mob->read_optdrops_db, HP_mob_read_optdrops_db) },
20362040
{ HP_POP(mob->readdb, HP_mob_readdb) },
20372041
{ HP_POP(mob->lookup_const, HP_mob_lookup_const) },
20382042
{ HP_POP(mob->get_const, HP_mob_get_const) },
@@ -2043,6 +2047,7 @@ struct HookingPointData HookingPoints[] = {
20432047
{ HP_POP(mob->read_db_drops_sub, HP_mob_read_db_drops_sub) },
20442048
{ HP_POP(mob->read_db_mvpdrops_sub, HP_mob_read_db_mvpdrops_sub) },
20452049
{ HP_POP(mob->read_db_mode_sub, HP_mob_read_db_mode_sub) },
2050+
{ HP_POP(mob->read_db_drops_option, HP_mob_read_db_drops_option) },
20462051
{ HP_POP(mob->read_db_stats_sub, HP_mob_read_db_stats_sub) },
20472052
{ HP_POP(mob->name_constants, HP_mob_name_constants) },
20482053
{ HP_POP(mob->readdb_mobavail, HP_mob_readdb_mobavail) },
@@ -2058,6 +2063,7 @@ struct HookingPointData HookingPoints[] = {
20582063
{ HP_POP(mob->set_item_drop_ratio, HP_mob_set_item_drop_ratio) },
20592064
{ HP_POP(mob->final_ratio_sub, HP_mob_final_ratio_sub) },
20602065
{ HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) },
2066+
{ HP_POP(mob->destroy_drop_groups, HP_mob_destroy_drop_groups) },
20612067
{ HP_POP(mob->skill_db_libconfig, HP_mob_skill_db_libconfig) },
20622068
{ HP_POP(mob->skill_db_libconfig_sub, HP_mob_skill_db_libconfig_sub) },
20632069
{ HP_POP(mob->skill_db_libconfig_sub_skill, HP_mob_skill_db_libconfig_sub_skill) },

src/plugins/HPMHooking/HPMHooking_map.Hooks.inc

Lines changed: 166 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
}
5263752744
void 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+
}
5290353037
void 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+
}
5330653466
bool HP_mob_skill_db_libconfig(const char *filename, bool ignore_missing) {
5330753467
int hIndex = 0;
5330853468
bool retVal___ = false;

0 commit comments

Comments
 (0)