summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-04-05 21:05:27 +0200
committerGitHub <noreply@github.com>2020-04-05 21:05:27 +0200
commit024c9c48d4a1d064ac9d37d997d3983fb1bff40f (patch)
tree0eae933a4a69c220f98dacfe17b9df2cc5b877ec /src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
parent02a84aa9870422bddb7b631dd09bb45c1e5e6856 (diff)
parent876cfa678d5e9a43d1ce419bd9d8300d9c8c6b36 (diff)
downloadhercules-024c9c48d4a1d064ac9d37d997d3983fb1bff40f.tar.gz
hercules-024c9c48d4a1d064ac9d37d997d3983fb1bff40f.tar.bz2
hercules-024c9c48d4a1d064ac9d37d997d3983fb1bff40f.tar.xz
hercules-024c9c48d4a1d064ac9d37d997d3983fb1bff40f.zip
Merge pull request #2657 from Kenpachi2k13/autocast_clean_up
Clean up auto-cast related code
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc')
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc43
1 files changed, 8 insertions, 35 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index a9ed12c31..af3f355b3 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -63411,14 +63411,14 @@ int HP_pc_useitem(struct map_session_data *sd, int n) {
}
return retVal___;
}
-int HP_pc_itemskill_clear(struct map_session_data *sd) {
+int HP_pc_autocast_clear(struct map_session_data *sd) {
int hIndex = 0;
int retVal___ = 0;
- if (HPMHooks.count.HP_pc_itemskill_clear_pre > 0) {
+ if (HPMHooks.count.HP_pc_autocast_clear_pre > 0) {
int (*preHookFunc) (struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemskill_clear_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_pc_itemskill_clear_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_clear_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pc_autocast_clear_pre[hIndex].func;
retVal___ = preHookFunc(&sd);
}
if (*HPMforce_return) {
@@ -63427,12 +63427,12 @@ int HP_pc_itemskill_clear(struct map_session_data *sd) {
}
}
{
- retVal___ = HPMHooks.source.pc.itemskill_clear(sd);
+ retVal___ = HPMHooks.source.pc.autocast_clear(sd);
}
- if (HPMHooks.count.HP_pc_itemskill_clear_post > 0) {
+ if (HPMHooks.count.HP_pc_autocast_clear_post > 0) {
int (*postHookFunc) (int retVal___, struct map_session_data *sd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemskill_clear_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_pc_itemskill_clear_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_clear_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pc_autocast_clear_post[hIndex].func;
retVal___ = postHookFunc(retVal___, sd);
}
}
@@ -78215,33 +78215,6 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
}
return retVal___;
}
-bool HP_skill_is_item_skill(struct map_session_data *sd, int skill_id, int skill_lv) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_skill_is_item_skill_pre > 0) {
- bool (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *skill_lv);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_item_skill_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_skill_is_item_skill_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &skill_id, &skill_lv);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.skill.is_item_skill(sd, skill_id, skill_lv);
- }
- if (HPMHooks.count.HP_skill_is_item_skill_post > 0) {
- bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int skill_id, int skill_lv);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_item_skill_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_skill_is_item_skill_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv);
- }
- }
- return retVal___;
-}
int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
int hIndex = 0;
int retVal___ = 0;