Browse Source

Fixed Hocus and Improvised Song ignoring mapflags (#4488)

* Fixed skills casted by SA_ABRACADABRA and WM_RANDOMIZESPELL ignoring critical mapflags
Daegaladh 5 years ago
parent
commit
4a1e904149
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/map/skill.cpp

+ 3 - 3
src/map/skill.cpp

@@ -791,7 +791,7 @@ bool skill_isNotOk(uint16 skill_id, struct map_session_data *sd)
 
 	struct map_data *mapdata = map_getmapdata(sd->bl.m);
 
-	if (mapdata->flag[MF_NOSKILL] && skill_id != ALL_EQSWITCH)
+	if (mapdata->flag[MF_NOSKILL] && skill_id != ALL_EQSWITCH && !sd->skillitem) //Item skills bypass noskill
 		return true;
 
 	// Epoque:
@@ -810,10 +810,10 @@ bool skill_isNotOk(uint16 skill_id, struct map_session_data *sd)
 	}
 
 	/**
-	 * It has been confirmed on a official server (thanks to Yommy) that item-cast skills bypass all the restrictions above
+	 * It has been confirmed on a official server (thanks to Yommy) that item-cast skills bypass all mapflag restrictions
 	 * Also, without this check, an exploit where an item casting + healing (or any other kind buff) isn't deleted after used on a restricted map
 	 */
-	if( sd->skillitem == skill_id && !sd->skillitem_keep_requirement )
+	if( sd->skillitem == skill_id && !sd->skillitem_keep_requirement && !sd->state.abra_flag)
 		return false;
 
 	uint32 skill_nocast = skill_get_nocast(skill_id);