Browse Source

Add support for new cart design (#5811)

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Balfear 4 years ago
parent
commit
1f8e600c16
2 changed files with 7 additions and 2 deletions
  1. 3 1
      src/common/mmo.hpp
  2. 4 1
      src/map/clif.cpp

+ 3 - 1
src/common/mmo.hpp

@@ -1081,7 +1081,9 @@ struct clan{
 	#ifndef ENABLE_SC_SAVING
 	#warning "Cart won't be able to be saved for relog"
 	#endif
-#if PACKETVER >= 20150826
+#if PACKETVER >= 20191106
+	#define MAX_CARTS 13		// used for another new cart design
+#elif PACKETVER >= 20150826
 	#define MAX_CARTS 12		// used for 3 new cart design
 #else
 	#define MAX_CARTS 9

+ 4 - 1
src/map/clif.cpp

@@ -12360,7 +12360,7 @@ void clif_parse_SelectCart(int fd,struct map_session_data *sd) {
 	type = (int)RFIFOB(fd,6);
 
 	// Check type
-	if( type < 10 || type > MAX_CARTS ) 
+	if( type < 10 || type > 12 ) 
 		return;
 
 	pc_setcart(sd, type);
@@ -12388,6 +12388,9 @@ void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
 
 	if( 
 #ifdef NEW_CARTS
+#if PACKETVER >= 20191106
+		(type == 13 && sd->status.base_level > 100) ||
+#endif
 		(type == 9 && sd->status.base_level > 130) ||
 		(type == 8 && sd->status.base_level > 120) ||
 		(type == 7 && sd->status.base_level > 110) ||