Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 17288)
+++ src/map/skill.c (working copy)
@@ -12706,14 +12753,9 @@
if( sc && ( sc->data[SC__SHADOWFORM] || sc->data[SC__IGNORANCE] ) )
return 0;
- switch( skill_id ) { // Turn off check.
- case BS_MAXIMIZE: case NV_TRICKDEAD: case TF_HIDING: case AS_CLOAKING: case CR_AUTOGUARD:
- case ML_AUTOGUARD: case CR_DEFENDER: case ML_DEFENDER: case ST_CHASEWALK: case PA_GOSPEL:
- case CR_SHRINK: case TK_RUN: case GS_GATLINGFEVER: case TK_READYCOUNTER: case TK_READYDOWN:
- case TK_READYSTORM: case TK_READYTURN: case SG_FUSION: case RA_WUGDASH: case KO_YAMIKUMO:
- if( sc && sc->data[status_skill2sc(skill_id)] )
- return 1;
- }
+ //Checks if disabling skill - in which case no SP requirements are necessary
+ if( sc && skill_disable_check(sc,skill_id) )
+ return 1;
// Check the skills that can be used while mounted on a warg
if( pc_isridingwug(sd) ) {
@@ -13709,15 +13774,9 @@
if( !sc->count )
sc = NULL;
- switch( skill_id )
- { // Turn off check.
- case BS_MAXIMIZE: case NV_TRICKDEAD: case TF_HIDING: case AS_CLOAKING: case CR_AUTOGUARD:
- case ML_AUTOGUARD: case CR_DEFENDER: case ML_DEFENDER: case ST_CHASEWALK: case PA_GOSPEL:
- case CR_SHRINK: case TK_RUN: case GS_GATLINGFEVER: case TK_READYCOUNTER: case TK_READYDOWN:
- case TK_READYSTORM: case TK_READYTURN: case SG_FUSION: case KO_YAMIKUMO:
- if( sc && sc->data[status_skill2sc(skill_id)] )
- return req;
- }
+ //Checks if disabling skill - in which case no SP requirements are necessary
+ if( sc && skill_disable_check(sc,skill_id))
+ return req;
idx = skill_get_index(skill_id);
if( idx == 0 ) // invalid skill id
@@ -17658,6 +17709,38 @@
return 0;
}
+int skill_disable_check(struct status_change *sc, uint16 skill_id)
+{
+ switch( skill_id ){ // HP & SP Consumption Check
+ case BS_MAXIMIZE:
+ case NV_TRICKDEAD:
+ case TF_HIDING:
+ case AS_CLOAKING:
+ case GC_CLOAKINGEXCEED:
+ case ST_CHASEWALK:
+ case CR_DEFENDER:
+ case CR_SHRINK:
+ case CR_AUTOGUARD:
+ case ML_DEFENDER:
+ case ML_AUTOGUARD:
+ case PA_GOSPEL:
+ case GS_GATLINGFEVER:
+ case TK_READYCOUNTER:
+ case TK_READYDOWN:
+ case TK_READYSTORM:
+ case TK_READYTURN:
+ case TK_RUN:
+ case SG_FUSION:
+ case KO_YAMIKUMO:
+ case RA_WUGDASH:
+ case RA_CAMOUFLAGE:
+ if( sc && sc->data[status_skill2sc(skill_id)] )
+ return 1;
+ }
+
+ return 0;
+}
+
int skill_get_elemental_type( uint16 skill_id , uint16 skill_lv ) {
int type = 0;
Index: src/map/skill.h
===================================================================
--- src/map/skill.h (revision 17288)
+++ src/map/skill.h (working copy)
@@ -314,6 +314,7 @@
int skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
int skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type);
struct skill_condition skill_get_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
+int skill_disable_check(struct status_change *sc, uint16 skill_id);
int skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, short* skill_lv, int range, int cast_flag);
// -- moonsoul (added skill_check_unit_cell)