diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-03-06 10:17:21 +0100 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-03-06 10:37:22 +0100 |
commit | 6ae08c67adafd126b6046c8e38388ddd126b6766 (patch) | |
tree | 31352b9ccdf18cfed9edba0ee12a148dd1114369 /src | |
parent | f90e54575306dc6391fc3348311626942fb3e111 (diff) | |
download | hercules-6ae08c67adafd126b6046c8e38388ddd126b6766.tar.gz hercules-6ae08c67adafd126b6046c8e38388ddd126b6766.tar.bz2 hercules-6ae08c67adafd126b6046c8e38388ddd126b6766.tar.xz hercules-6ae08c67adafd126b6046c8e38388ddd126b6766.zip |
Rename itemskill_no_conditions to itemskill_check_conditions
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 2 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/script.c | 4 | ||||
-rw-r--r-- | src/map/skill.c | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index c96e957c7..a95bd0a57 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5334,7 +5334,7 @@ static int pc_itemskill_clear(struct map_session_data *sd) sd->itemskill_id = 0; sd->itemskill_lv = 0; sd->state.itemskill_conditions_checked = 0; - sd->state.itemskill_no_conditions = 0; + sd->state.itemskill_check_conditions = 0; sd->state.itemskill_no_casttime = 0; sd->state.itemskill_castonself = 0; diff --git a/src/map/pc.h b/src/map/pc.h index e940c3310..8d1ae3607 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -241,7 +241,7 @@ struct map_session_data { unsigned int npc_unloaded : 1; ///< The player is talking with an unloaded NPCs (respawned tombstones) unsigned int lapine_ui : 1; unsigned int itemskill_conditions_checked : 1; // Used by itemskill() script command, to prevent second check of conditions after target was selected. - unsigned int itemskill_no_conditions : 1; // Used by itemskill() script command, to ignore skill conditions and don't consume them. + unsigned int itemskill_check_conditions : 1; // Used by itemskill() script command, to check skill conditions and consume them. unsigned int itemskill_no_casttime : 1; // Used by itemskill() script command, to cast skill instantaneously. unsigned int itemskill_castonself : 1; // Used by itemskill() script command, to forcefully cast skill on invoking character. } state; diff --git a/src/map/script.c b/src/map/script.c index 5a8907a87..fe5502aa7 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11008,9 +11008,9 @@ static BUILDIN(itemskill) int flag = script_hasdata(st, 4) ? script_getnum(st, 4) : ISF_NONE; - sd->state.itemskill_no_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_itemskill_clear(). - if (sd->state.itemskill_no_conditions == 0) { + if (sd->state.itemskill_check_conditions == 0) { 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); diff --git a/src/map/skill.c b/src/map/skill.c index a8dbefbd7..03f52905d 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -14024,7 +14024,7 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s if (sd->chat_id != 0) return 0; - if ((sd->state.itemskill_conditions_checked == 1 || sd->state.itemskill_no_conditions == 1) + if ((sd->state.itemskill_conditions_checked == 1 || sd->state.itemskill_check_conditions == 1) && skill->is_item_skill(sd, skill_id, skill_lv)) { return 1; } @@ -15013,7 +15013,7 @@ static int skill_check_condition_castend(struct map_session_data *sd, uint16 ski if (sd->chat_id != 0) return 0; - if ((sd->state.itemskill_conditions_checked == 1 || sd->state.itemskill_no_conditions == 1) + if ((sd->state.itemskill_conditions_checked == 1 || sd->state.itemskill_check_conditions == 1) && skill->is_item_skill(sd, skill_id, skill_lv)) { return 1; } @@ -15219,7 +15219,7 @@ static int skill_consume_requirement(struct map_session_data *sd, uint16 skill_i nullpo_ret(sd); - if (sd->state.itemskill_no_conditions == 1 && skill->is_item_skill(sd, skill_id, skill_lv)) + if (sd->state.itemskill_check_conditions == 1 && skill->is_item_skill(sd, skill_id, skill_lv)) return 1; req = skill->get_requirement(sd,skill_id,skill_lv); |