diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 6 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/script.c | 14 | ||||
-rw-r--r-- | src/map/skill.c | 2 | ||||
-rw-r--r-- | src/map/unit.c | 4 |
6 files changed, 15 insertions, 15 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; } |