summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-07-26 00:38:42 +0200
committerGitHub <noreply@github.com>2018-07-26 00:38:42 +0200
commit40f015d43eb87a6680b4ce53b1ca88c0dec641e3 (patch)
treed1259a0cd785b04bb8a4c9e917ecdaf0ce7324c3
parent67b1035c8fc0211dcbc9569c9de0ff4a774a69d7 (diff)
parent8d17f68be174a81e267f03fbca2b60302d1ee4d7 (diff)
downloadhercules-40f015d43eb87a6680b4ce53b1ca88c0dec641e3.tar.gz
hercules-40f015d43eb87a6680b4ce53b1ca88c0dec641e3.tar.bz2
hercules-40f015d43eb87a6680b4ce53b1ca88c0dec641e3.tar.xz
hercules-40f015d43eb87a6680b4ce53b1ca88c0dec641e3.zip
Merge pull request #2143 from dastgirp/plugin/unit_layout
Added missing parameter to init_unit_layout_unknown
-rw-r--r--src/map/skill.c4
-rw-r--r--src/map/skill.h2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc12
4 files changed, 11 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 524769873..745cdb7bc 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -19430,7 +19430,7 @@ static void skill_init_unit_layout(void)
}
break;
default:
- skill->init_unit_layout_unknown(i);
+ skill->init_unit_layout_unknown(i, pos);
break;
}
if (!skill->dbs->unit_layout[pos].count)
@@ -19531,7 +19531,7 @@ static void skill_init_unit_layout(void)
}
-static void skill_init_unit_layout_unknown(int skill_idx)
+static void skill_init_unit_layout_unknown(int skill_idx, int pos)
{
Assert_retv(skill_idx >= 0 && skill_idx < MAX_SKILL_DB);
ShowError("unknown unit layout at skill %d\n", skill->dbs->db[skill_idx].nameid);
diff --git a/src/map/skill.h b/src/map/skill.h
index 736417649..97134224e 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2093,7 +2093,7 @@ struct skill_interface {
int (*unit_timer) (int tid, int64 tick, int id, intptr_t data);
int (*unit_timer_sub) (union DBKey key, struct DBData *data, va_list ap);
void (*init_unit_layout) (void);
- void (*init_unit_layout_unknown) (int skill_idx);
+ void (*init_unit_layout_unknown) (int skill_idx, int pos);
void (*validate_hittype) (struct config_setting_t *conf, struct s_skill_db *sk);
void (*validate_skilltype) (struct config_setting_t *conf, struct s_skill_db *sk);
void (*validate_attacktype) (struct config_setting_t *conf, struct s_skill_db *sk);
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index c5519001b..7f1145146 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -7066,8 +7066,8 @@ typedef int (*HPMHOOK_pre_skill_unit_timer_sub) (union DBKey *key, struct DBData
typedef int (*HPMHOOK_post_skill_unit_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap);
typedef void (*HPMHOOK_pre_skill_init_unit_layout) (void);
typedef void (*HPMHOOK_post_skill_init_unit_layout) (void);
-typedef void (*HPMHOOK_pre_skill_init_unit_layout_unknown) (int *skill_idx);
-typedef void (*HPMHOOK_post_skill_init_unit_layout_unknown) (int skill_idx);
+typedef void (*HPMHOOK_pre_skill_init_unit_layout_unknown) (int *skill_idx, int *pos);
+typedef void (*HPMHOOK_post_skill_init_unit_layout_unknown) (int skill_idx, int pos);
typedef void (*HPMHOOK_pre_skill_validate_hittype) (struct config_setting_t **conf, struct s_skill_db **sk);
typedef void (*HPMHOOK_post_skill_validate_hittype) (struct config_setting_t *conf, struct s_skill_db *sk);
typedef void (*HPMHOOK_pre_skill_validate_skilltype) (struct config_setting_t **conf, struct s_skill_db **sk);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 882be9475..ca35225c6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -75086,14 +75086,14 @@ void HP_skill_init_unit_layout(void) {
}
return;
}
-void HP_skill_init_unit_layout_unknown(int skill_idx) {
+void HP_skill_init_unit_layout_unknown(int skill_idx, int pos) {
int hIndex = 0;
if (HPMHooks.count.HP_skill_init_unit_layout_unknown_pre > 0) {
- void (*preHookFunc) (int *skill_idx);
+ void (*preHookFunc) (int *skill_idx, int *pos);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_unknown_pre[hIndex].func;
- preHookFunc(&skill_idx);
+ preHookFunc(&skill_idx, &pos);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -75101,13 +75101,13 @@ void HP_skill_init_unit_layout_unknown(int skill_idx) {
}
}
{
- HPMHooks.source.skill.init_unit_layout_unknown(skill_idx);
+ HPMHooks.source.skill.init_unit_layout_unknown(skill_idx, pos);
}
if (HPMHooks.count.HP_skill_init_unit_layout_unknown_post > 0) {
- void (*postHookFunc) (int skill_idx);
+ void (*postHookFunc) (int skill_idx, int pos);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_init_unit_layout_unknown_post[hIndex].func;
- postHookFunc(skill_idx);
+ postHookFunc(skill_idx, pos);
}
}
return;