Explorar o código

Corrected Reins of Mount interaction with hiding (#3621)

* Fixes #3614.
* Reins of Mount should not be applied to players who are in some sort of hidden state.
* Item delay is still applied.
Thanks to @admkakaroto and @cydh!
Aleos %!s(int64=6) %!d(string=hai) anos
pai
achega
24dca1117e
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/map/script.cpp

+ 3 - 0
src/map/script.cpp

@@ -20677,6 +20677,9 @@ BUILDIN_FUNC(setmounting) {
 	if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) ) {
 		clif_msg(sd, NEED_REINS_OF_MOUNT);
 		script_pushint(st,0); //can't mount with one of these
+	} else if (sd->sc.data[SC_CLOAKING] || sd->sc.data[SC_CHASEWALK] || sd->sc.data[SC_CLOAKINGEXCEED] || sd->sc.data[SC_CAMOUFLAGE] || sd->sc.data[SC_STEALTHFIELD] || sd->sc.data[SC__FEINTBOMB]) {
+		// SC_HIDING, SC__INVISIBILITY, SC__SHADOWFORM, SC_SUHIDE already disable item usage
+		script_pushint(st, 0); // Silent failure
 	} else {
 		if( sd->sc.data[SC_ALL_RIDING] )
 			status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); //release mount