summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c2
-rw-r--r--src/map/skill.c8
-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.inc17
5 files changed, 18 insertions, 15 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 39552a441..8a3744f27 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -23882,7 +23882,7 @@ bool rodex_sendmail_sub(struct script_state* st, struct rodex_message *msg)
{
const char *sender_name, *title, *body;
- if (!strcmp(script->getfuncname(st), "rodex_sendmail_acc2"))
+ if (strcmp(script->getfuncname(st), "rodex_sendmail_acc") == 0 || strcmp(script->getfuncname(st), "rodex_sendmail_acc2") == 0)
msg->receiver_accountid = script_getnum(st, 2);
else
msg->receiver_id = script_getnum(st, 2);
diff --git a/src/map/skill.c b/src/map/skill.c
index 6eacde897..34c36d7f3 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -15027,8 +15027,9 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
}
break;
default:
- skill->check_condition_castend_unknown(sd, &skill_id, &skill_lv);
- break;
+ if (!skill->check_condition_castend_unknown(sd, &skill_id, &skill_lv))
+ break;
+ return 0;
}
st = &sd->battle_status;
@@ -15115,8 +15116,9 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
return 1;
}
-void skill_check_condition_castend_unknown(struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv)
+bool skill_check_condition_castend_unknown(struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv)
{
+ return false;
}
// type&2: consume items (after skill was used)
diff --git a/src/map/skill.h b/src/map/skill.h
index e16094eae..bd1dc3344 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2172,7 +2172,7 @@ struct skill_interface {
int (*check_condition_castbegin_mount_unknown) (struct status_change *sc, uint16 *skill_id);
int (*check_condition_castbegin_madogear_unknown) (struct status_change *sc, uint16 *skill_id);
int (*check_condition_castbegin_unknown) (struct status_change *sc, uint16 *skill_id);
- void (*check_condition_castend_unknown) (struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv);
+ bool (*check_condition_castend_unknown) (struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv);
bool (*get_requirement_off_unknown) (struct status_change *sc, uint16 *skill_id);
bool (*get_requirement_item_unknown) (struct status_change *sc, struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i);
void (*get_requirement_unknown) (struct status_change *sc, struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req);
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 7c609f0bf..9ae123779 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -7102,8 +7102,8 @@ typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_madogear_unknown) (str
typedef int (*HPMHOOK_post_skill_check_condition_castbegin_madogear_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id);
typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_unknown) (struct status_change **sc, uint16 **skill_id);
typedef int (*HPMHOOK_post_skill_check_condition_castbegin_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id);
-typedef void (*HPMHOOK_pre_skill_check_condition_castend_unknown) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv);
-typedef void (*HPMHOOK_post_skill_check_condition_castend_unknown) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+typedef bool (*HPMHOOK_pre_skill_check_condition_castend_unknown) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv);
+typedef bool (*HPMHOOK_post_skill_check_condition_castend_unknown) (bool retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
typedef bool (*HPMHOOK_pre_skill_get_requirement_off_unknown) (struct status_change **sc, uint16 **skill_id);
typedef bool (*HPMHOOK_post_skill_get_requirement_off_unknown) (bool retVal___, struct status_change *sc, uint16 *skill_id);
typedef bool (*HPMHOOK_pre_skill_get_requirement_item_unknown) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, uint16 **idx, int **i);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index bd2ef870f..a74fc4edb 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -76386,31 +76386,32 @@ int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16
}
return retVal___;
}
-void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) {
+bool HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) {
int hIndex = 0;
+ bool retVal___ = false;
if (HPMHooks.count.HP_skill_check_condition_castend_unknown_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv);
+ bool (*preHookFunc) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_pre[hIndex].func;
- preHookFunc(&sd, &skill_id, &skill_lv);
+ retVal___ = preHookFunc(&sd, &skill_id, &skill_lv);
}
if (*HPMforce_return) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv);
+ retVal___ = HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv);
}
if (HPMHooks.count.HP_skill_check_condition_castend_unknown_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv);
for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_post[hIndex].func;
- postHookFunc(sd, skill_id, skill_lv);
+ retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv);
}
}
- return;
+ return retVal___;
}
bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skill_id) {
int hIndex = 0;