Преглед изворни кода

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!
Aleos пре 6 година
родитељ
комит
e6e0511cf7
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4 3
      src/map/clif.cpp

+ 4 - 3
src/map/clif.cpp

@@ -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) )