summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-03-11 21:24:28 +0100
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-03-14 22:35:08 +0100
commit0a1982baa30e29431622c1a4f52668756d563214 (patch)
treeea7a6223ea80a6c09e56230d931407576dc28f41 /src
parent735b763ed55c8cf9aca3ddeb6b469ce43896bf7d (diff)
downloadhercules-0a1982baa30e29431622c1a4f52668756d563214.tar.gz
hercules-0a1982baa30e29431622c1a4f52668756d563214.tar.bz2
hercules-0a1982baa30e29431622c1a4f52668756d563214.tar.xz
hercules-0a1982baa30e29431622c1a4f52668756d563214.zip
Rename function pc_itemskill_clear() to pc_autocast_clear()
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/pc.c6
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/script.c14
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/unit.c4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc16
10 files changed, 30 insertions, 30 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c9e018f73..d7dffb293 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -12987,7 +12987,7 @@ static void clif_parse_UseSkillMap(int fd, struct map_session_data *sd)
pc->delinvincibletimer(sd);
skill->castend_map(sd,skill_id,map_name);
- pc->itemskill_clear(sd);
+ pc->autocast_clear(sd);
}
static void clif_parse_RequestMemo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
diff --git a/src/map/pc.c b/src/map/pc.c
index ebba015a2..073c16029 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5337,12 +5337,12 @@ static int pc_useitem(struct map_session_data *sd, int n)
}
/**
- * Sets state flags and helper variables, used by itemskill() script command, to 0.
+ * Unsets a character's auto-cast related data.
*
* @param sd The character's session data.
* @return 0 if parameter sd is NULL, otherwise 1.
*/
-static int pc_itemskill_clear(struct map_session_data *sd)
+static int pc_autocast_clear(struct map_session_data *sd)
{
nullpo_ret(sd);
@@ -12733,7 +12733,7 @@ void pc_defaults(void)
pc->unequipitem_pos = pc_unequipitem_pos;
pc->checkitem = pc_checkitem;
pc->useitem = pc_useitem;
- pc->itemskill_clear = pc_itemskill_clear;
+ pc->autocast_clear = pc_autocast_clear;
pc->skillatk_bonus = pc_skillatk_bonus;
pc->skillheal_bonus = pc_skillheal_bonus;
diff --git a/src/map/pc.h b/src/map/pc.h
index f069c0d66..92444aa2a 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -1046,7 +1046,7 @@ END_ZEROED_BLOCK; /* End */
void (*unequipitem_pos) (struct map_session_data *sd, int n, int pos);
int (*checkitem) (struct map_session_data *sd);
int (*useitem) (struct map_session_data *sd,int n);
- int (*itemskill_clear) (struct map_session_data *sd);
+ int (*autocast_clear) (struct map_session_data *sd);
int (*skillatk_bonus) (struct map_session_data *sd, uint16 skill_id);
int (*skillheal_bonus) (struct map_session_data *sd, uint16 skill_id);
diff --git a/src/map/script.c b/src/map/script.c
index 83c221e78..b08613ec3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11001,7 +11001,7 @@ static BUILDIN(itemskill)
if (sd == NULL || sd->ud.skilltimer != INVALID_TIMER)
return true;
- pc->itemskill_clear(sd);
+ pc->autocast_clear(sd);
sd->autocast.type = AUTOCAST_ITEM;
sd->autocast.skill_id = script_isstringtype(st, 2) ? skill->name2id(script_getstr(st, 2)) : script_getnum(st, 2);
sd->autocast.skill_lv = script_getnum(st, 3);
@@ -11011,26 +11011,26 @@ static BUILDIN(itemskill)
int flag = script_hasdata(st, 4) ? script_getnum(st, 4) : ISF_NONE;
- sd->state.itemskill_check_conditions = ((flag & ISF_CHECKCONDITIONS) == ISF_CHECKCONDITIONS) ? 1 : 0; // Unset in pc_itemskill_clear().
+ sd->state.itemskill_check_conditions = ((flag & ISF_CHECKCONDITIONS) == ISF_CHECKCONDITIONS) ? 1 : 0; // Unset in pc_autocast_clear().
sd->autocast.itemskill_check_conditions = ((flag & ISF_CHECKCONDITIONS) == ISF_CHECKCONDITIONS);
if (sd->state.itemskill_check_conditions == 1) {
if (skill->check_condition_castbegin(sd, sd->skillitem, sd->skillitemlv) == 0
|| skill->check_condition_castend(sd, sd->skillitem, sd->skillitemlv) == 0) {
- pc->itemskill_clear(sd);
+ pc->autocast_clear(sd);
return true;
}
- sd->state.itemskill_conditions_checked = 1; // Unset in pc_itemskill_clear().
+ sd->state.itemskill_conditions_checked = 1; // Unset in pc_autocast_clear().
sd->autocast.itemskill_conditions_checked = true;
}
- sd->state.itemskill_no_casttime = ((flag & ISF_INSTANTCAST) == ISF_INSTANTCAST) ? 1 : 0; // Unset in pc_itemskill_clear().
- sd->state.itemskill_castonself = ((flag & ISF_CASTONSELF) == ISF_CASTONSELF) ? 1 : 0; // Unset in pc_itemskill_clear().
+ sd->state.itemskill_no_casttime = ((flag & ISF_INSTANTCAST) == ISF_INSTANTCAST) ? 1 : 0; // Unset in pc_autocast_clear().
+ sd->state.itemskill_castonself = ((flag & ISF_CASTONSELF) == ISF_CASTONSELF) ? 1 : 0; // Unset in pc_autocast_clear().
sd->autocast.itemskill_instant_cast = ((flag & ISF_INSTANTCAST) == ISF_INSTANTCAST);
sd->autocast.itemskill_cast_on_self = ((flag & ISF_CASTONSELF) == ISF_CASTONSELF);
- // itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime/itemskill_castonself abuse prevention. Unset in pc_itemskill_clear().
+ // itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime/itemskill_castonself abuse prevention. Unset in pc_autocast_clear().
sd->itemskill_id = sd->skillitem;
sd->itemskill_lv = sd->skillitemlv;
diff --git a/src/map/skill.c b/src/map/skill.c
index 5ceff376f..f28d50c6e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4223,7 +4223,7 @@ static void skill_castend_type(int type, struct block_list *src, struct block_li
struct map_session_data *sd = BL_CAST(BL_PC, src);
if (sd != NULL)
- pc->itemskill_clear(sd);
+ pc->autocast_clear(sd);
}
/*==========================================
diff --git a/src/map/unit.c b/src/map/unit.c
index d2cfcb03d..984cc6802 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1146,7 +1146,7 @@ static int unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_
struct map_session_data *sd = BL_CAST(BL_PC, src);
if (sd != NULL && (ret == 0 || !skill->is_item_skill(sd, skill_id, skill_lv)))
- pc->itemskill_clear(sd);
+ pc->autocast_clear(sd);
return ret;
}
@@ -1783,7 +1783,7 @@ static int unit_skilluse_pos(struct block_list *src, short skill_x, short skill_
struct map_session_data *sd = BL_CAST(BL_PC, src);
if (sd != NULL && (ret == 0 || !skill->is_item_skill(sd, skill_id, skill_lv)))
- pc->itemskill_clear(sd);
+ pc->autocast_clear(sd);
return ret;
}
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 28f81b97f..edfd60fbc 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6184,8 +6184,8 @@ typedef int (*HPMHOOK_pre_pc_checkitem) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_checkitem) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_useitem) (struct map_session_data **sd, int *n);
typedef int (*HPMHOOK_post_pc_useitem) (int retVal___, struct map_session_data *sd, int n);
-typedef int (*HPMHOOK_pre_pc_itemskill_clear) (struct map_session_data **sd);
-typedef int (*HPMHOOK_post_pc_itemskill_clear) (int retVal___, struct map_session_data *sd);
+typedef int (*HPMHOOK_pre_pc_autocast_clear) (struct map_session_data **sd);
+typedef int (*HPMHOOK_post_pc_autocast_clear) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_skillatk_bonus) (struct map_session_data **sd, uint16 *skill_id);
typedef int (*HPMHOOK_post_pc_skillatk_bonus) (int retVal___, struct map_session_data *sd, uint16 skill_id);
typedef int (*HPMHOOK_pre_pc_skillheal_bonus) (struct map_session_data **sd, uint16 *skill_id);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index f94606bab..fed7e7a5e 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -4764,8 +4764,8 @@ struct {
struct HPMHookPoint *HP_pc_checkitem_post;
struct HPMHookPoint *HP_pc_useitem_pre;
struct HPMHookPoint *HP_pc_useitem_post;
- struct HPMHookPoint *HP_pc_itemskill_clear_pre;
- struct HPMHookPoint *HP_pc_itemskill_clear_post;
+ struct HPMHookPoint *HP_pc_autocast_clear_pre;
+ struct HPMHookPoint *HP_pc_autocast_clear_post;
struct HPMHookPoint *HP_pc_skillatk_bonus_pre;
struct HPMHookPoint *HP_pc_skillatk_bonus_post;
struct HPMHookPoint *HP_pc_skillheal_bonus_pre;
@@ -11639,8 +11639,8 @@ struct {
int HP_pc_checkitem_post;
int HP_pc_useitem_pre;
int HP_pc_useitem_post;
- int HP_pc_itemskill_clear_pre;
- int HP_pc_itemskill_clear_post;
+ int HP_pc_autocast_clear_pre;
+ int HP_pc_autocast_clear_post;
int HP_pc_skillatk_bonus_pre;
int HP_pc_skillatk_bonus_post;
int HP_pc_skillheal_bonus_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index a360b3f53..8b38177ae 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2440,7 +2440,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->unequipitem_pos, HP_pc_unequipitem_pos) },
{ HP_POP(pc->checkitem, HP_pc_checkitem) },
{ HP_POP(pc->useitem, HP_pc_useitem) },
- { HP_POP(pc->itemskill_clear, HP_pc_itemskill_clear) },
+ { HP_POP(pc->autocast_clear, HP_pc_autocast_clear) },
{ HP_POP(pc->skillatk_bonus, HP_pc_skillatk_bonus) },
{ HP_POP(pc->skillheal_bonus, HP_pc_skillheal_bonus) },
{ HP_POP(pc->skillheal2_bonus, HP_pc_skillheal2_bonus) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 592279cc4..4b139b322 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -63359,14 +63359,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) {
@@ -63375,12 +63375,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);
}
}