diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-03-12 00:03:54 +0100 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-03-14 22:35:09 +0100 |
commit | 6f49858747acc7ee3767dd431bec32b919b81536 (patch) | |
tree | 179c03f58c6ccbad9b658da5584c9f1f255e889c /src/map/clif.c | |
parent | 12de22e7008081c94631c8730d05d487e7b0cfcc (diff) | |
download | hercules-6f49858747acc7ee3767dd431bec32b919b81536.tar.gz hercules-6f49858747acc7ee3767dd431bec32b919b81536.tar.bz2 hercules-6f49858747acc7ee3767dd431bec32b919b81536.tar.xz hercules-6f49858747acc7ee3767dd431bec32b919b81536.zip |
Use map_session_data->autocast.type instead of skillitem variable to check for auto-cast skills
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 6b5c57d46..074ca570b 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -12767,7 +12767,7 @@ static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill if (skill_id != SA_CASTCANCEL && skill_id != SO_SPELLFIST) return; } else if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) { - if (sd->skillitem != skill_id) { + if (sd->autocast.type == AUTOCAST_NONE) { clif->skill_fail(sd, skill_id, USESKILL_FAIL_SKILLINTERVAL, 0, 0); return; } @@ -12785,7 +12785,7 @@ static void clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill } else if (sd->menuskill_id != SA_AUTOSPELL) return; //Can't use skills while a menu is open. } - if (sd->skillitem == skill_id) { + if (sd->autocast.type != AUTOCAST_NONE) { if (skill_lv != sd->skillitemlv) skill_lv = sd->skillitemlv; if (!(tmp&INF_SELF_SKILL)) @@ -12905,7 +12905,7 @@ static void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uin return; if( DIFF_TICK(tick, sd->ud.canact_tick) < 0 ) { - if( sd->skillitem != skill_id ) { + if (sd->autocast.type == AUTOCAST_NONE) { clif->skill_fail(sd, skill_id, USESKILL_FAIL_SKILLINTERVAL, 0, 0); return; } @@ -12926,7 +12926,7 @@ static void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uin pc->delinvincibletimer(sd); - if( sd->skillitem == skill_id ) { + if (sd->autocast.type != AUTOCAST_NONE) { if( skill_lv != sd->skillitemlv ) skill_lv = sd->skillitemlv; unit->skilluse_pos(&sd->bl, x, y, skill_id, skill_lv); |