summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-05-31 23:33:55 +0200
committerGitHub <noreply@github.com>2020-05-31 23:33:55 +0200
commitb3189b88eafd5a159780000845bacef79310a22c (patch)
tree6abf9ca36ce7c703c2735589e7f89cef6e5f698a /src/map/status.c
parent1cccfca3dd708354bf808068c1210ce353957f2e (diff)
parent468c81a5367c444e2e678148d556df94eaa623af (diff)
downloadhercules-b3189b88eafd5a159780000845bacef79310a22c.tar.gz
hercules-b3189b88eafd5a159780000845bacef79310a22c.tar.bz2
hercules-b3189b88eafd5a159780000845bacef79310a22c.tar.xz
hercules-b3189b88eafd5a159780000845bacef79310a22c.zip
Merge pull request #2699 from Kenpachi2k13/multi_itemskill
Enable multiple itemskill() calls per item
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index b0cb07d11..a6e6b24c0 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1596,7 +1596,7 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ
}
if( skill_id ) {
- if (src != NULL && (sd == NULL || sd->autocast.type != AUTOCAST_ITEM)) {
+ if (src != NULL && (sd == NULL || sd->auto_cast_current.type != AUTOCAST_ITEM)) {
// Items that cast skills using 'itemskill' will not be handled by map_zone_db.
int i;
@@ -1640,7 +1640,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->autocast.type != AUTOCAST_ITEM))
+ && (src->type != BL_PC || sd->auto_cast_current.type != AUTOCAST_ITEM))
return 0;
break;
default:
@@ -1719,7 +1719,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->autocast.type != AUTOCAST_ITEM)) {
+ if (skill_id != 0 /* Do not block item-casted skills.*/ && (src->type != BL_PC || sd->auto_cast_current.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] ||
@@ -1737,6 +1737,7 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ
(sc->data[SC_MARIONETTE] && skill_id == CG_MARIONETTE) || //Cannot use marionette if you are being buffed by another
(sc->data[SC_STASIS] && skill->block_check(src, SC_STASIS, skill_id)) ||
(sc->data[SC_KG_KAGEHUMI] && skill->block_check(src, SC_KG_KAGEHUMI, skill_id))
+ || sc->data[SC_ALL_RIDING] != NULL // New mounts can't attack nor use skills in the client; this check makes it cheat-safe. [Ind]
))
return 0;
@@ -1785,8 +1786,6 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ
} else if ( skill_id != ST_CHASEWALK )
return 0;
}
- if( sc->data[SC_ALL_RIDING] )
- return 0;//New mounts can't attack nor use skills in the client; this check makes it cheat-safe [Ind]
}
if (target == NULL || target == src) //No further checking needed.