ソースを参照

Fixed cart data for older cart types
* Follow up to c0bd422.
* Resolves older carts that don't use the SC_PUSH_CART status to update their weight and item data properly.
* Moved to pc_scdata_received so that it will hit both versions just fine.
Thanks to @Lemongrass3110!

aleos89 8 年 前
コミット
a0caaa1036
2 ファイル変更5 行追加7 行削除
  1. 5 0
      src/map/pc.c
  2. 0 7
      src/map/status.c

+ 5 - 0
src/map/pc.c

@@ -11453,6 +11453,11 @@ void pc_damage_log_clear(struct map_session_data *sd, int id)
  */
 void pc_scdata_received(struct map_session_data *sd) {
 	pc_inventory_rentals(sd); // Needed here to remove rentals that have Status Changes after chrif_load_scdata has finished
+
+	if (pc_iscarton(sd)) {
+		sd->cart_weight_max = 0; // Force a client refesh
+		status_calc_cart_weight(sd, 1|2|4);
+	}
 }
 
 /**

+ 0 - 7
src/map/status.c

@@ -8480,13 +8480,6 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			return 0;
 		break;
 
-	case SC_PUSH_CART:
-	if (sd) {
-		sd->cart_weight_max = 0; // Force a client refesh
-		status_calc_cart_weight(sd, 1|2|4);
-	}
-	break;
-
 	case SC_WEDDING:
 	case SC_XMAS:
 	case SC_SUMMER: