Explorar o código

Fixed AL_HOLYWATER behavior (#2860)

* Fixes #2853.
* Holy Water should not cast or consume SP when the player has no empty bottles, both in water (and water skills) and outside water.
Thanks to @Daegaladh!
Daegaladh %!s(int64=7) %!d(string=hai) anos
pai
achega
2ecb30abb2
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/map/skill.cpp

+ 6 - 0
src/map/skill.cpp

@@ -14967,6 +14967,12 @@ bool skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_i
 				return false;
 			}
 			break;
+		case AL_HOLYWATER:
+			if(pc_search_inventory(sd,ITEMID_EMPTY_BOTTLE) < 0) {
+				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+				return false;
+			}
+			break;
 		case MO_CALLSPIRITS:
 			if(sc && sc->data[SC_RAISINGDRAGON])
 				skill_lv += sc->data[SC_RAISINGDRAGON]->val1;