Corrected a check for skill usage restrictions (#3472)

* Resolves an issue where the usage of self skills while a storage is open was causing the entire check to fail.
Thanks to @Tokeiburu!
This commit is contained in:
Aleos 2018-09-12 11:03:14 -04:00 committed by GitHub
parent 3ac7781c9d
commit e6e0511cf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12205,9 +12205,10 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
}
}
if( (pc_cant_act2(sd) || sd->chatID) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE &&
(sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) &&
sd->state.storage_flag && !(inf&INF_SELF_SKILL) ) //SELF skills can be used with the storage open, issue: 8027
if ((pc_cant_act2(sd) || sd->chatID) &&
skill_id != RK_REFRESH &&
!(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) &&
!(sd->state.storage_flag && (inf&INF_SELF_SKILL))) //SELF skills can be used with the storage open, issue: 8027
return;
if( pc_issit(sd) )