summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc14
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc45
4 files changed, 49 insertions, 15 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 76662b375..63826753d 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1276,8 +1276,8 @@ typedef void (*HPMHOOK_pre_clif_scriptclear) (struct map_session_data **sd, int
typedef void (*HPMHOOK_post_clif_scriptclear) (struct map_session_data *sd, int npcid);
typedef void (*HPMHOOK_pre_clif_viewpoint) (struct map_session_data **sd, int *npc_id, int *type, int *x, int *y, int *id, int *color);
typedef void (*HPMHOOK_post_clif_viewpoint) (struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color);
-typedef int (*HPMHOOK_pre_clif_damage) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2);
-typedef int (*HPMHOOK_post_clif_damage) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2);
+typedef int (*HPMHOOK_pre_clif_damage) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, enum battle_dmg_type *type, int64 *damage2);
+typedef int (*HPMHOOK_post_clif_damage) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type type, int64 damage2);
typedef void (*HPMHOOK_pre_clif_sitting) (struct block_list **bl);
typedef void (*HPMHOOK_post_clif_sitting) (struct block_list *bl);
typedef void (*HPMHOOK_pre_clif_standing) (struct block_list **bl);
@@ -1524,8 +1524,8 @@ typedef void (*HPMHOOK_pre_clif_divorced) (struct map_session_data **sd, const c
typedef void (*HPMHOOK_post_clif_divorced) (struct map_session_data *sd, const char *name);
typedef void (*HPMHOOK_pre_clif_callpartner) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_callpartner) (struct map_session_data *sd);
-typedef int (*HPMHOOK_pre_clif_skill_damage) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
-typedef int (*HPMHOOK_post_clif_skill_damage) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type);
+typedef int (*HPMHOOK_pre_clif_skill_damage) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, enum battle_dmg_type *type);
+typedef int (*HPMHOOK_post_clif_skill_damage) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type type);
typedef int (*HPMHOOK_pre_clif_skill_nodamage) (struct block_list **src, struct block_list **dst, uint16 *skill_id, int *heal, int *fail);
typedef int (*HPMHOOK_post_clif_skill_nodamage) (int retVal___, struct block_list *src, struct block_list *dst, uint16 skill_id, int heal, int fail);
typedef void (*HPMHOOK_pre_clif_skill_poseffect) (struct block_list **src, uint16 *skill_id, int *val, int *x, int *y, int64 *tick);
@@ -2046,8 +2046,8 @@ typedef void (*HPMHOOK_pre_clif_show_modifiers) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_show_modifiers) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_notify_bounditem) (struct map_session_data **sd, unsigned short *index);
typedef void (*HPMHOOK_post_clif_notify_bounditem) (struct map_session_data *sd, unsigned short index);
-typedef int (*HPMHOOK_pre_clif_delay_damage) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, unsigned char *type);
-typedef int (*HPMHOOK_post_clif_delay_damage) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type);
+typedef int (*HPMHOOK_pre_clif_delay_damage) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, enum battle_dmg_type *type);
+typedef int (*HPMHOOK_post_clif_delay_damage) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type);
typedef int (*HPMHOOK_pre_clif_delay_damage_sub) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_clif_delay_damage_sub) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef void (*HPMHOOK_pre_clif_npc_market_open) (struct map_session_data **sd, struct npc_data **nd);
@@ -3158,6 +3158,8 @@ typedef bool (*HPMHOOK_pre_homun_mutate) (struct homun_data **hd, int *homun_id)
typedef bool (*HPMHOOK_post_homun_mutate) (bool retVal___, struct homun_data *hd, int homun_id);
typedef int (*HPMHOOK_pre_homun_gainexp) (struct homun_data **hd, unsigned int *exp);
typedef int (*HPMHOOK_post_homun_gainexp) (int retVal___, struct homun_data *hd, unsigned int exp);
+typedef int (*HPMHOOK_pre_homun_gainexp_real) (struct homun_data **hd, unsigned int *exp);
+typedef int (*HPMHOOK_post_homun_gainexp_real) (int retVal___, struct homun_data *hd, unsigned int exp);
typedef unsigned int (*HPMHOOK_pre_homun_add_intimacy) (struct homun_data **hd, unsigned int *value);
typedef unsigned int (*HPMHOOK_post_homun_add_intimacy) (unsigned int retVal___, struct homun_data *hd, unsigned int value);
typedef unsigned int (*HPMHOOK_pre_homun_consume_intimacy) (struct homun_data **hd, unsigned int *value);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 9feb01586..adfac1a93 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -2718,6 +2718,8 @@ struct {
struct HPMHookPoint *HP_homun_mutate_post;
struct HPMHookPoint *HP_homun_gainexp_pre;
struct HPMHookPoint *HP_homun_gainexp_post;
+ struct HPMHookPoint *HP_homun_gainexp_real_pre;
+ struct HPMHookPoint *HP_homun_gainexp_real_post;
struct HPMHookPoint *HP_homun_add_intimacy_pre;
struct HPMHookPoint *HP_homun_add_intimacy_post;
struct HPMHookPoint *HP_homun_consume_intimacy_pre;
@@ -9495,6 +9497,8 @@ struct {
int HP_homun_mutate_post;
int HP_homun_gainexp_pre;
int HP_homun_gainexp_post;
+ int HP_homun_gainexp_real_pre;
+ int HP_homun_gainexp_real_post;
int HP_homun_add_intimacy_pre;
int HP_homun_add_intimacy_post;
int HP_homun_consume_intimacy_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index d591f3c56..2c7eabeff 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1394,6 +1394,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(homun->evolve, HP_homun_evolve) },
{ HP_POP(homun->mutate, HP_homun_mutate) },
{ HP_POP(homun->gainexp, HP_homun_gainexp) },
+ { HP_POP(homun->gainexp_real, HP_homun_gainexp_real) },
{ HP_POP(homun->add_intimacy, HP_homun_add_intimacy) },
{ HP_POP(homun->consume_intimacy, HP_homun_consume_intimacy) },
{ HP_POP(homun->healed, HP_homun_healed) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 005742aca..003219b47 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -11278,11 +11278,11 @@ void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x,
}
return;
}
-int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2) {
+int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type type, int64 damage2) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_clif_damage_pre > 0) {
- int (*preHookFunc) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2);
+ int (*preHookFunc) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, enum battle_dmg_type *type, int64 *damage2);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_damage_pre[hIndex].func;
@@ -11297,7 +11297,7 @@ int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, i
retVal___ = HPMHooks.source.clif.damage(src, dst, sdelay, ddelay, damage, div, type, damage2);
}
if (HPMHooks.count.HP_clif_damage_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type type, int64 damage2);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_damage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, dst, sdelay, ddelay, damage, div, type, damage2);
@@ -14532,11 +14532,11 @@ void HP_clif_callpartner(struct map_session_data *sd) {
}
return;
}
-int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type) {
+int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type type) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_clif_skill_damage_pre > 0) {
- int (*preHookFunc) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type);
+ int (*preHookFunc) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, enum battle_dmg_type *type);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_skill_damage_pre[hIndex].func;
@@ -14551,7 +14551,7 @@ int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 t
retVal___ = HPMHooks.source.clif.skill_damage(src, dst, tick, sdelay, ddelay, damage, div, skill_id, skill_lv, type);
}
if (HPMHooks.count.HP_clif_skill_damage_post > 0) {
- int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type);
+ int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type type);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_skill_damage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, src, dst, tick, sdelay, ddelay, damage, div, skill_id, skill_lv, type);
@@ -21332,11 +21332,11 @@ void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index)
}
return;
}
-int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type) {
+int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_clif_delay_damage_pre > 0) {
- int (*preHookFunc) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, unsigned char *type);
+ int (*preHookFunc) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, enum battle_dmg_type *type);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_delay_damage_pre[hIndex].func;
@@ -21351,7 +21351,7 @@ int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *
retVal___ = HPMHooks.source.clif.delay_damage(tick, src, dst, sdelay, ddelay, in_damage, div, type);
}
if (HPMHooks.count.HP_clif_delay_damage_post > 0) {
- int (*postHookFunc) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type);
+ int (*postHookFunc) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_delay_damage_post[hIndex].func;
retVal___ = postHookFunc(retVal___, tick, src, dst, sdelay, ddelay, in_damage, div, type);
@@ -35652,6 +35652,33 @@ int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) {
}
return retVal___;
}
+int HP_homun_gainexp_real(struct homun_data *hd, unsigned int exp) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_homun_gainexp_real_pre > 0) {
+ int (*preHookFunc) (struct homun_data **hd, unsigned int *exp);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_real_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_homun_gainexp_real_pre[hIndex].func;
+ retVal___ = preHookFunc(&hd, &exp);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.homun.gainexp_real(hd, exp);
+ }
+ if (HPMHooks.count.HP_homun_gainexp_real_post > 0) {
+ int (*postHookFunc) (int retVal___, struct homun_data *hd, unsigned int exp);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_real_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_homun_gainexp_real_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hd, exp);
+ }
+ }
+ return retVal___;
+}
unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) {
int hIndex = 0;
unsigned int retVal___ = 0;