summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-03-12 00:03:54 +0100
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-03-14 22:35:09 +0100
commit6f49858747acc7ee3767dd431bec32b919b81536 (patch)
tree179c03f58c6ccbad9b658da5584c9f1f255e889c /src/map/status.c
parent12de22e7008081c94631c8730d05d487e7b0cfcc (diff)
downloadhercules-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/status.c')
-rw-r--r--src/map/status.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 4d798b606..a1aac8649 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1584,7 +1584,7 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ
}
if( skill_id ) {
- if (src != NULL && (sd == NULL || sd->skillitem == 0)) {
+ if (src != NULL && (sd == NULL || sd->autocast.type != AUTOCAST_ITEM)) {
// Items that cast skills using 'itemskill' will not be handled by map_zone_db.
int i;
@@ -1628,7 +1628,7 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ
if (src != NULL
&& map->getcell(src->m, src, src->x, src->y, CELL_CHKLANDPROTECTOR)
&& !(st->mode&MD_BOSS)
- && (src->type != BL_PC || sd->skillitem != skill_id))
+ && (src->type != BL_PC || sd->autocast.type != AUTOCAST_ITEM))
return 0;
break;
default:
@@ -1707,7 +1707,7 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ
return 0; //Can't amp out of Wand of Hermode :/ [Skotlex]
}
- if (skill_id != 0 /* Do not block item-casted skills.*/ && (src->type != BL_PC || sd->skillitem != skill_id)) {
+ if (skill_id != 0 /* Do not block item-casted skills.*/ && (src->type != BL_PC || sd->autocast.type != AUTOCAST_ITEM)) {
//Skills blocked through status changes...
if (!flag && ( //Blocked only from using the skill (stuff like autospell may still go through
sc->data[SC_SILENCE] ||