summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-05-17 00:28:35 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-01 02:01:54 +0200
commit29a544a23092e6b1703905f4719ebca412e9558b (patch)
tree2fac491ec23738ea79e8c9c88574e6b5977c6681 /src/plugins/HPMHooking
parentad3be6ffd674983f9d3123ee7558a689eb16c416 (diff)
downloadhercules-29a544a23092e6b1703905f4719ebca412e9558b.tar.gz
hercules-29a544a23092e6b1703905f4719ebca412e9558b.tar.bz2
hercules-29a544a23092e6b1703905f4719ebca412e9558b.tar.xz
hercules-29a544a23092e6b1703905f4719ebca412e9558b.zip
Make AttackType can be grouped by levels
Diffstat (limited to 'src/plugins/HPMHooking')
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc36
2 files changed, 24 insertions, 24 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 4f7c82092..5f789a9b1 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -7230,8 +7230,8 @@ typedef void (*HPMHOOK_pre_skill_read_db) (bool *minimal);
typedef void (*HPMHOOK_post_skill_read_db) (bool minimal);
typedef int (*HPMHOOK_pre_skill_get_index) (int *skill_id);
typedef int (*HPMHOOK_post_skill_get_index) (int retVal___, int skill_id);
-typedef int (*HPMHOOK_pre_skill_get_type) (int *skill_id);
-typedef int (*HPMHOOK_post_skill_get_type) (int retVal___, int skill_id);
+typedef int (*HPMHOOK_pre_skill_get_type) (int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_get_type) (int retVal___, int skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_skill_get_hit) (int *skill_id, int *skill_lv);
typedef int (*HPMHOOK_post_skill_get_hit) (int retVal___, int skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_skill_get_inf) (int *skill_id);
@@ -7330,8 +7330,8 @@ typedef bool (*HPMHOOK_pre_skill_is_combo) (int *skill_id);
typedef bool (*HPMHOOK_post_skill_is_combo) (bool retVal___, int skill_id);
typedef int (*HPMHOOK_pre_skill_name2id) (const char **name);
typedef int (*HPMHOOK_post_skill_name2id) (int retVal___, const char *name);
-typedef int (*HPMHOOK_pre_skill_isammotype) (struct map_session_data **sd, int *skill_id);
-typedef int (*HPMHOOK_post_skill_isammotype) (int retVal___, struct map_session_data *sd, int skill_id);
+typedef int (*HPMHOOK_pre_skill_isammotype) (struct map_session_data **sd, int *skill_id, int *skill_lv);
+typedef int (*HPMHOOK_post_skill_isammotype) (int retVal___, struct map_session_data *sd, int skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_skill_castend_id) (int *tid, int64 *tick, int *id, intptr_t *data);
typedef int (*HPMHOOK_post_skill_castend_id) (int retVal___, int tid, int64 tick, int id, intptr_t data);
typedef int (*HPMHOOK_pre_skill_castend_pos) (int *tid, int64 *tick, int *id, intptr_t *data);
@@ -7470,8 +7470,8 @@ typedef int (*HPMHOOK_pre_skill_check_unit_range2) (struct block_list **bl, int
typedef int (*HPMHOOK_post_skill_check_unit_range2) (int retVal___, struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv);
typedef int (*HPMHOOK_pre_skill_check_unit_range2_sub) (struct block_list **bl, va_list ap);
typedef int (*HPMHOOK_post_skill_check_unit_range2_sub) (int retVal___, struct block_list *bl, va_list ap);
-typedef void (*HPMHOOK_pre_skill_toggle_magicpower) (struct block_list **bl, uint16 *skill_id);
-typedef void (*HPMHOOK_post_skill_toggle_magicpower) (struct block_list *bl, uint16 skill_id);
+typedef void (*HPMHOOK_pre_skill_toggle_magicpower) (struct block_list **bl, uint16 *skill_id, int *skill_lv);
+typedef void (*HPMHOOK_post_skill_toggle_magicpower) (struct block_list *bl, uint16 skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_skill_magic_reflect) (struct block_list **src, struct block_list **bl, int *type);
typedef int (*HPMHOOK_post_skill_magic_reflect) (int retVal___, struct block_list *src, struct block_list *bl, int type);
typedef int (*HPMHOOK_pre_skill_onskillusage) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_id, int64 *tick);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 268051ec8..2f38a5a3d 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -76769,15 +76769,15 @@ int HP_skill_get_index(int skill_id) {
}
return retVal___;
}
-int HP_skill_get_type(int skill_id) {
+int HP_skill_get_type(int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_get_type_pre > 0) {
- int (*preHookFunc) (int *skill_id);
+ int (*preHookFunc) (int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_get_type_pre[hIndex].func;
- retVal___ = preHookFunc(&skill_id);
+ retVal___ = preHookFunc(&skill_id, &skill_lv);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -76785,13 +76785,13 @@ int HP_skill_get_type(int skill_id) {
}
}
{
- retVal___ = HPMHooks.source.skill.get_type(skill_id);
+ retVal___ = HPMHooks.source.skill.get_type(skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_get_type_post > 0) {
- int (*postHookFunc) (int retVal___, int skill_id);
+ int (*postHookFunc) (int retVal___, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_get_type_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, skill_id);
+ retVal___ = postHookFunc(retVal___, skill_id, skill_lv);
}
}
return retVal___;
@@ -78119,15 +78119,15 @@ int HP_skill_name2id(const char *name) {
}
return retVal___;
}
-int HP_skill_isammotype(struct map_session_data *sd, int skill_id) {
+int HP_skill_isammotype(struct map_session_data *sd, int skill_id, int skill_lv) {
int hIndex = 0;
int retVal___ = 0;
if (HPMHooks.count.HP_skill_isammotype_pre > 0) {
- int (*preHookFunc) (struct map_session_data **sd, int *skill_id);
+ int (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func;
- retVal___ = preHookFunc(&sd, &skill_id);
+ retVal___ = preHookFunc(&sd, &skill_id, &skill_lv);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -78135,13 +78135,13 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill_id) {
}
}
{
- retVal___ = HPMHooks.source.skill.isammotype(sd, skill_id);
+ retVal___ = HPMHooks.source.skill.isammotype(sd, skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_isammotype_post > 0) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, int skill_id);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, int skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_isammotype_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, skill_id);
+ retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv);
}
}
return retVal___;
@@ -80039,14 +80039,14 @@ int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) {
}
return retVal___;
}
-void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) {
+void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id, int skill_lv) {
int hIndex = 0;
if (HPMHooks.count.HP_skill_toggle_magicpower_pre > 0) {
- void (*preHookFunc) (struct block_list **bl, uint16 *skill_id);
+ void (*preHookFunc) (struct block_list **bl, uint16 *skill_id, int *skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_pre[hIndex].func;
- preHookFunc(&bl, &skill_id);
+ preHookFunc(&bl, &skill_id, &skill_lv);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -80054,13 +80054,13 @@ void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) {
}
}
{
- HPMHooks.source.skill.toggle_magicpower(bl, skill_id);
+ HPMHooks.source.skill.toggle_magicpower(bl, skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_toggle_magicpower_post > 0) {
- void (*postHookFunc) (struct block_list *bl, uint16 skill_id);
+ void (*postHookFunc) (struct block_list *bl, uint16 skill_id, int skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_toggle_magicpower_post[hIndex].func;
- postHookFunc(bl, skill_id);
+ postHookFunc(bl, skill_id, skill_lv);
}
}
return;