diff options
author | Haru <haru@dotalux.com> | 2020-04-05 21:05:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 21:05:27 +0200 |
commit | 024c9c48d4a1d064ac9d37d997d3983fb1bff40f (patch) | |
tree | 0eae933a4a69c220f98dacfe17b9df2cc5b877ec /src/map/status.c | |
parent | 02a84aa9870422bddb7b631dd09bb45c1e5e6856 (diff) | |
parent | 876cfa678d5e9a43d1ce419bd9d8300d9c8c6b36 (diff) | |
download | hercules-024c9c48d4a1d064ac9d37d997d3983fb1bff40f.tar.gz hercules-024c9c48d4a1d064ac9d37d997d3983fb1bff40f.tar.bz2 hercules-024c9c48d4a1d064ac9d37d997d3983fb1bff40f.tar.xz hercules-024c9c48d4a1d064ac9d37d997d3983fb1bff40f.zip |
Merge pull request #2657 from Kenpachi2k13/autocast_clean_up
Clean up auto-cast related code
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c index 3b7658769..4e7094569 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1591,7 +1591,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; @@ -1635,7 +1635,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: @@ -1714,7 +1714,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] || |