summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc18
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc83
4 files changed, 75 insertions, 41 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 3233916dd..fe72a7e13 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1330,10 +1330,10 @@ typedef void (*HPMHOOK_pre_clif_autospell) (struct map_session_data **sd, uint16
typedef void (*HPMHOOK_post_clif_autospell) (struct map_session_data *sd, uint16 skill_lv);
typedef void (*HPMHOOK_pre_clif_combo_delay) (struct block_list **bl, int *wait);
typedef void (*HPMHOOK_post_clif_combo_delay) (struct block_list *bl, int wait);
-typedef void (*HPMHOOK_pre_clif_status_change) (struct block_list **bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3);
-typedef void (*HPMHOOK_post_clif_status_change) (struct block_list *bl, int type, int flag, int total_tick, int val1, int val2, int val3);
-typedef void (*HPMHOOK_pre_clif_status_change_sub) (struct block_list **bl, int *type, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3);
-typedef void (*HPMHOOK_post_clif_status_change_sub) (struct block_list *bl, int type, int flag, int tick, int total_tick, int val1, int val2, int val3);
+typedef void (*HPMHOOK_pre_clif_status_change) (struct block_list **bl, int *relevant_bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3);
+typedef void (*HPMHOOK_post_clif_status_change) (struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3);
+typedef void (*HPMHOOK_pre_clif_status_change_sub) (struct block_list **bl, int *type, int *relevant_bl, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3);
+typedef void (*HPMHOOK_post_clif_status_change_sub) (struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3);
typedef void (*HPMHOOK_pre_clif_insert_card) (struct map_session_data **sd, int *idx_equip, int *idx_card, int *flag);
typedef void (*HPMHOOK_post_clif_insert_card) (struct map_session_data *sd, int idx_equip, int idx_card, int flag);
typedef void (*HPMHOOK_pre_clif_inventoryList) (struct map_session_data **sd);
@@ -7762,10 +7762,12 @@ typedef int (*HPMHOOK_pre_status_sc2skill) (sc_type *sc);
typedef int (*HPMHOOK_post_status_sc2skill) (int retVal___, sc_type sc);
typedef unsigned int (*HPMHOOK_pre_status_sc2scb_flag) (sc_type *sc);
typedef unsigned int (*HPMHOOK_post_status_sc2scb_flag) (unsigned int retVal___, sc_type sc);
-typedef int (*HPMHOOK_pre_status_type2relevant_bl_types) (int *type);
-typedef int (*HPMHOOK_post_status_type2relevant_bl_types) (int retVal___, int type);
+typedef int (*HPMHOOK_pre_status_get_sc_relevant_bl_types) (sc_type *type);
+typedef int (*HPMHOOK_post_status_get_sc_relevant_bl_types) (int retVal___, sc_type type);
typedef int (*HPMHOOK_pre_status_get_sc_type) (sc_type *idx);
typedef int (*HPMHOOK_post_status_get_sc_type) (int retVal___, sc_type idx);
+typedef int (*HPMHOOK_pre_status_get_sc_icon) (sc_type *type);
+typedef int (*HPMHOOK_post_status_get_sc_icon) (int retVal___, sc_type type);
typedef int (*HPMHOOK_pre_status_damage) (struct block_list **src, struct block_list **target, int64 *hp, int64 *sp, int *walkdelay, int *flag);
typedef int (*HPMHOOK_post_status_damage) (int retVal___, struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag);
typedef int (*HPMHOOK_pre_status_charge) (struct block_list **bl, int64 *hp, int64 *sp);
@@ -8000,8 +8002,8 @@ typedef void (*HPMHOOK_pre_status_read_job_db) (void);
typedef void (*HPMHOOK_post_status_read_job_db) (void);
typedef void (*HPMHOOK_pre_status_read_job_db_sub) (int *idx, const char **name, struct config_setting_t **jdb);
typedef void (*HPMHOOK_post_status_read_job_db_sub) (int idx, const char *name, struct config_setting_t *jdb);
-typedef void (*HPMHOOK_pre_status_set_sc) (uint16 *skill_id, sc_type *sc, int *icon, unsigned int *flag);
-typedef void (*HPMHOOK_post_status_set_sc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag);
+typedef void (*HPMHOOK_pre_status_set_sc) (uint16 *skill_id, sc_type *sc, unsigned int *flag);
+typedef void (*HPMHOOK_post_status_set_sc) (uint16 skill_id, sc_type sc, unsigned int flag);
typedef void (*HPMHOOK_pre_status_copy) (struct status_data **a, const struct status_data **b);
typedef void (*HPMHOOK_post_status_copy) (struct status_data *a, const struct status_data *b);
typedef int (*HPMHOOK_pre_status_base_matk_min) (const struct status_data **st);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 0eefe67ec..76dfca774 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -6284,10 +6284,12 @@ struct {
struct HPMHookPoint *HP_status_sc2skill_post;
struct HPMHookPoint *HP_status_sc2scb_flag_pre;
struct HPMHookPoint *HP_status_sc2scb_flag_post;
- struct HPMHookPoint *HP_status_type2relevant_bl_types_pre;
- struct HPMHookPoint *HP_status_type2relevant_bl_types_post;
+ struct HPMHookPoint *HP_status_get_sc_relevant_bl_types_pre;
+ struct HPMHookPoint *HP_status_get_sc_relevant_bl_types_post;
struct HPMHookPoint *HP_status_get_sc_type_pre;
struct HPMHookPoint *HP_status_get_sc_type_post;
+ struct HPMHookPoint *HP_status_get_sc_icon_pre;
+ struct HPMHookPoint *HP_status_get_sc_icon_post;
struct HPMHookPoint *HP_status_damage_pre;
struct HPMHookPoint *HP_status_damage_post;
struct HPMHookPoint *HP_status_charge_pre;
@@ -13115,10 +13117,12 @@ struct {
int HP_status_sc2skill_post;
int HP_status_sc2scb_flag_pre;
int HP_status_sc2scb_flag_post;
- int HP_status_type2relevant_bl_types_pre;
- int HP_status_type2relevant_bl_types_post;
+ int HP_status_get_sc_relevant_bl_types_pre;
+ int HP_status_get_sc_relevant_bl_types_post;
int HP_status_get_sc_type_pre;
int HP_status_get_sc_type_post;
+ int HP_status_get_sc_icon_pre;
+ int HP_status_get_sc_icon_post;
int HP_status_damage_pre;
int HP_status_damage_post;
int HP_status_charge_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 2cb061b47..e7b657082 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -3214,8 +3214,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(status->skill2sc, HP_status_skill2sc) },
{ HP_POP(status->sc2skill, HP_status_sc2skill) },
{ HP_POP(status->sc2scb_flag, HP_status_sc2scb_flag) },
- { HP_POP(status->type2relevant_bl_types, HP_status_type2relevant_bl_types) },
+ { HP_POP(status->get_sc_relevant_bl_types, HP_status_get_sc_relevant_bl_types) },
{ HP_POP(status->get_sc_type, HP_status_get_sc_type) },
+ { HP_POP(status->get_sc_icon, HP_status_get_sc_icon) },
{ HP_POP(status->damage, HP_status_damage) },
{ HP_POP(status->charge, HP_status_charge) },
{ HP_POP(status->percent_change, HP_status_percent_change) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 90b07c4e5..53d0104e3 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -11995,14 +11995,14 @@ void HP_clif_combo_delay(struct block_list *bl, int wait) {
}
return;
}
-void HP_clif_status_change(struct block_list *bl, int type, int flag, int total_tick, int val1, int val2, int val3) {
+void HP_clif_status_change(struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_status_change_pre > 0) {
- void (*preHookFunc) (struct block_list **bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3);
+ void (*preHookFunc) (struct block_list **bl, int *relevant_bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_status_change_pre[hIndex].func;
- preHookFunc(&bl, &type, &flag, &total_tick, &val1, &val2, &val3);
+ preHookFunc(&bl, &relevant_bl, &type, &flag, &total_tick, &val1, &val2, &val3);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -12010,25 +12010,25 @@ void HP_clif_status_change(struct block_list *bl, int type, int flag, int total_
}
}
{
- HPMHooks.source.clif.status_change(bl, type, flag, total_tick, val1, val2, val3);
+ HPMHooks.source.clif.status_change(bl, relevant_bl, type, flag, total_tick, val1, val2, val3);
}
if (HPMHooks.count.HP_clif_status_change_post > 0) {
- void (*postHookFunc) (struct block_list *bl, int type, int flag, int total_tick, int val1, int val2, int val3);
+ void (*postHookFunc) (struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_status_change_post[hIndex].func;
- postHookFunc(bl, type, flag, total_tick, val1, val2, val3);
+ postHookFunc(bl, relevant_bl, type, flag, total_tick, val1, val2, val3);
}
}
return;
}
-void HP_clif_status_change_sub(struct block_list *bl, int type, int flag, int tick, int total_tick, int val1, int val2, int val3) {
+void HP_clif_status_change_sub(struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_status_change_sub_pre > 0) {
- void (*preHookFunc) (struct block_list **bl, int *type, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3);
+ void (*preHookFunc) (struct block_list **bl, int *type, int *relevant_bl, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_sub_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_status_change_sub_pre[hIndex].func;
- preHookFunc(&bl, &type, &flag, &tick, &total_tick, &val1, &val2, &val3);
+ preHookFunc(&bl, &type, &relevant_bl, &flag, &tick, &total_tick, &val1, &val2, &val3);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -12036,13 +12036,13 @@ void HP_clif_status_change_sub(struct block_list *bl, int type, int flag, int ti
}
}
{
- HPMHooks.source.clif.status_change_sub(bl, type, flag, tick, total_tick, val1, val2, val3);
+ HPMHooks.source.clif.status_change_sub(bl, type, relevant_bl, flag, tick, total_tick, val1, val2, val3);
}
if (HPMHooks.count.HP_clif_status_change_sub_post > 0) {
- void (*postHookFunc) (struct block_list *bl, int type, int flag, int tick, int total_tick, int val1, int val2, int val3);
+ void (*postHookFunc) (struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_sub_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_status_change_sub_post[hIndex].func;
- postHookFunc(bl, type, flag, tick, total_tick, val1, val2, val3);
+ postHookFunc(bl, type, relevant_bl, flag, tick, total_tick, val1, val2, val3);
}
}
return;
@@ -84055,14 +84055,14 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) {
}
return retVal___;
}
-int HP_status_type2relevant_bl_types(int type) {
+int HP_status_get_sc_relevant_bl_types(sc_type type) {
int hIndex = 0;
int retVal___ = 0;
- if (HPMHooks.count.HP_status_type2relevant_bl_types_pre > 0) {
- int (*preHookFunc) (int *type);
+ if (HPMHooks.count.HP_status_get_sc_relevant_bl_types_pre > 0) {
+ int (*preHookFunc) (sc_type *type);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_relevant_bl_types_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_get_sc_relevant_bl_types_pre[hIndex].func;
retVal___ = preHookFunc(&type);
}
if (*HPMforce_return) {
@@ -84071,12 +84071,12 @@ int HP_status_type2relevant_bl_types(int type) {
}
}
{
- retVal___ = HPMHooks.source.status.type2relevant_bl_types(type);
+ retVal___ = HPMHooks.source.status.get_sc_relevant_bl_types(type);
}
- if (HPMHooks.count.HP_status_type2relevant_bl_types_post > 0) {
- int (*postHookFunc) (int retVal___, int type);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_post[hIndex].func;
+ if (HPMHooks.count.HP_status_get_sc_relevant_bl_types_post > 0) {
+ int (*postHookFunc) (int retVal___, sc_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_relevant_bl_types_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_get_sc_relevant_bl_types_post[hIndex].func;
retVal___ = postHookFunc(retVal___, type);
}
}
@@ -84109,6 +84109,33 @@ int HP_status_get_sc_type(sc_type idx) {
}
return retVal___;
}
+int HP_status_get_sc_icon(sc_type type) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_status_get_sc_icon_pre > 0) {
+ int (*preHookFunc) (sc_type *type);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_icon_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_status_get_sc_icon_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.status.get_sc_icon(type);
+ }
+ if (HPMHooks.count.HP_status_get_sc_icon_post > 0) {
+ int (*postHookFunc) (int retVal___, sc_type type);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_icon_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_status_get_sc_icon_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, type);
+ }
+ }
+ return retVal___;
+}
int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag) {
int hIndex = 0;
int retVal___ = 0;
@@ -87262,14 +87289,14 @@ void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_
}
return;
}
-void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) {
+void HP_status_set_sc(uint16 skill_id, sc_type sc, unsigned int flag) {
int hIndex = 0;
if (HPMHooks.count.HP_status_set_sc_pre > 0) {
- void (*preHookFunc) (uint16 *skill_id, sc_type *sc, int *icon, unsigned int *flag);
+ void (*preHookFunc) (uint16 *skill_id, sc_type *sc, unsigned int *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_status_set_sc_pre[hIndex].func;
- preHookFunc(&skill_id, &sc, &icon, &flag);
+ preHookFunc(&skill_id, &sc, &flag);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -87277,13 +87304,13 @@ void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag)
}
}
{
- HPMHooks.source.status.set_sc(skill_id, sc, icon, flag);
+ HPMHooks.source.status.set_sc(skill_id, sc, flag);
}
if (HPMHooks.count.HP_status_set_sc_post > 0) {
- void (*postHookFunc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag);
+ void (*postHookFunc) (uint16 skill_id, sc_type sc, unsigned int flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_status_set_sc_post[hIndex].func;
- postHookFunc(skill_id, sc, icon, flag);
+ postHookFunc(skill_id, sc, flag);
}
}
return;