summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-25 13:54:57 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-25 13:54:57 +0000
commit72f0ef105972ddbf6c98973526b287bd0ebb4eb7 (patch)
tree798b2c46a65a676d1dbb9156609a3d56b1ff8b1a /src/map/status.c
parent5d6dd428a2994e9b482dc5946ed420ae0f3ad636 (diff)
downloadhercules-72f0ef105972ddbf6c98973526b287bd0ebb4eb7.tar.gz
hercules-72f0ef105972ddbf6c98973526b287bd0ebb4eb7.tar.bz2
hercules-72f0ef105972ddbf6c98973526b287bd0ebb4eb7.tar.xz
hercules-72f0ef105972ddbf6c98973526b287bd0ebb4eb7.zip
Fixed Wall of Thorn skill, all of its conditions should now be met.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15971 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c53
1 files changed, 32 insertions, 21 deletions
diff --git a/src/map/status.c b/src/map/status.c
index ebb305fc0..e5448592f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1425,20 +1425,30 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
return 0;
}
- if (skill_num == PA_PRESSURE && flag && target) {
- //Gloria Avoids pretty much everything....
- tsc = status_get_sc(target);
- if(tsc && tsc->option&OPTION_HIDE)
- return 0;
- return 1;
+ switch( skill_num ) {
+ case PA_PRESSURE:
+ if( flag && target ) {
+ //Gloria Avoids pretty much everything....
+ tsc = status_get_sc(target);
+ if(tsc && tsc->option&OPTION_HIDE)
+ return 0;
+ }
+ break;
+ case GN_WALLOFTHORN:
+ if( target && status_isdead(target) )
+ return 0;
+ break;
+ case AL_TELEPORT:
+ //Should fail when used on top of Land Protector [Skotlex]
+ if (src && map_getcell(src->m, src->x, src->y, CELL_CHKLANDPROTECTOR)
+ && !(status->mode&MD_BOSS)
+ && (src->type != BL_PC || ((TBL_PC*)src)->skillitem != skill_num))
+ return 0;
+ break;
+ default:
+ break;
}
- //Should fail when used on top of Land Protector [Skotlex]
- if (src && skill_num == AL_TELEPORT && map_getcell(src->m, src->x, src->y, CELL_CHKLANDPROTECTOR)
- && !(status->mode&MD_BOSS)
- && (src->type != BL_PC || ((TBL_PC*)src)->skillitem != skill_num))
- return 0;
-
if ( src ) sc = status_get_sc(src);
if( sc && sc->count ) {
@@ -1486,15 +1496,16 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
skill_get_inf2(skill_num)&(INF2_SONG_DANCE|INF2_ENSEMBLE_SKILL)
)
return 0;
- } else
- switch (skill_num) {
- case BD_ADAPTATION:
- case CG_LONGINGFREEDOM:
- case BA_MUSICALSTRIKE:
- case DC_THROWARROW:
- break;
- default:
- return 0;
+ } else {
+ switch (skill_num) {
+ case BD_ADAPTATION:
+ case CG_LONGINGFREEDOM:
+ case BA_MUSICALSTRIKE:
+ case DC_THROWARROW:
+ break;
+ default:
+ return 0;
+ }
}
if ((sc->data[SC_DANCING]->val1&0xFFFF) == CG_HERMODE && skill_num == BD_ADAPTATION)
return 0; //Can't amp out of Wand of Hermode :/ [Skotlex]