summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index f2ce1505c..d220f78fd 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -2806,6 +2806,32 @@ void HP_battle_reflect_damage(struct block_list *target, struct block_list *src,
}
return;
}
+void HP_battle_reflect_trap(struct block_list *target, struct block_list *src, struct Damage *md, uint16 skill_id) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_battle_reflect_trap_pre > 0) {
+ void (*preHookFunc) (struct block_list **target, struct block_list **src, struct Damage **md, uint16 *skill_id);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_trap_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_battle_reflect_trap_pre[hIndex].func;
+ preHookFunc(&target, &src, &md, &skill_id);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.battle.reflect_trap(target, src, md, skill_id);
+ }
+ if (HPMHooks.count.HP_battle_reflect_trap_post > 0) {
+ void (*postHookFunc) (struct block_list *target, struct block_list *src, struct Damage *md, uint16 skill_id);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_trap_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_battle_reflect_trap_post[hIndex].func;
+ postHookFunc(target, src, md, skill_id);
+ }
+ }
+ return;
+}
int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) {
int hIndex = 0;
int retVal___ = 0;