summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc2
-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.inc27
4 files changed, 34 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 6d836a3a9..65bc2bd82 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -118,6 +118,8 @@ typedef int64 (*HPMHOOK_pre_battle_calc_bg_damage) (struct block_list **src, str
typedef int64 (*HPMHOOK_post_battle_calc_bg_damage) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 damage, int div_, uint16 skill_id, uint16 skill_lv, int flag);
typedef enum damage_lv (*HPMHOOK_pre_battle_weapon_attack) (struct block_list **bl, struct block_list **target, int64 *tick, int *flag);
typedef enum damage_lv (*HPMHOOK_post_battle_weapon_attack) (enum damage_lv retVal___, struct block_list *bl, struct block_list *target, int64 tick, int flag);
+typedef bool (*HPMHOOK_pre_battle_check_arrows) (struct map_session_data **sd);
+typedef bool (*HPMHOOK_post_battle_check_arrows) (bool retVal___, struct map_session_data *sd);
typedef struct Damage (*HPMHOOK_pre_battle_calc_weapon_attack) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *wflag);
typedef struct Damage (*HPMHOOK_post_battle_calc_weapon_attack) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int wflag);
typedef int (*HPMHOOK_pre_battle_delay_damage) (int64 *tick, int *amotion, struct block_list **src, struct block_list **target, int *attack_type, uint16 *skill_id, uint16 *skill_lv, int64 *damage, enum damage_lv *dmg_lv, int *ddelay, bool *additional_effects);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 61bf1893a..5c2ead5ef 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -114,6 +114,8 @@ struct {
struct HPMHookPoint *HP_battle_calc_bg_damage_post;
struct HPMHookPoint *HP_battle_weapon_attack_pre;
struct HPMHookPoint *HP_battle_weapon_attack_post;
+ struct HPMHookPoint *HP_battle_check_arrows_pre;
+ struct HPMHookPoint *HP_battle_check_arrows_post;
struct HPMHookPoint *HP_battle_calc_weapon_attack_pre;
struct HPMHookPoint *HP_battle_calc_weapon_attack_post;
struct HPMHookPoint *HP_battle_delay_damage_pre;
@@ -6015,6 +6017,8 @@ struct {
int HP_battle_calc_bg_damage_post;
int HP_battle_weapon_attack_pre;
int HP_battle_weapon_attack_post;
+ int HP_battle_check_arrows_pre;
+ int HP_battle_check_arrows_post;
int HP_battle_calc_weapon_attack_pre;
int HP_battle_calc_weapon_attack_post;
int HP_battle_delay_damage_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 3b45377c5..77ee32f2f 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -72,6 +72,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(battle->calc_gvg_damage, HP_battle_calc_gvg_damage) },
{ HP_POP(battle->calc_bg_damage, HP_battle_calc_bg_damage) },
{ HP_POP(battle->weapon_attack, HP_battle_weapon_attack) },
+ { HP_POP(battle->check_arrows, HP_battle_check_arrows) },
{ HP_POP(battle->calc_weapon_attack, HP_battle_calc_weapon_attack) },
{ HP_POP(battle->delay_damage, HP_battle_delay_damage) },
{ HP_POP(battle->drain, HP_battle_drain) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index b2ed7006d..48fae567f 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -1265,6 +1265,33 @@ enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list
}
return retVal___;
}
+bool HP_battle_check_arrows(struct map_session_data *sd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_battle_check_arrows_pre ) {
+ bool (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_arrows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_battle_check_arrows_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.battle.check_arrows(sd);
+ }
+ if( HPMHooks.count.HP_battle_check_arrows_post ) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_arrows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_battle_check_arrows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int wflag) {
int hIndex = 0;
struct Damage retVal___ = { 0 };