Bläddra i källkod

Fix mailing special card (#7950)

Fixes #7947

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Harvin 1 år sedan
förälder
incheckning
0e9ae33f64
1 ändrade filer med 11 tillägg och 1 borttagningar
  1. 11 1
      src/map/script.cpp

+ 11 - 1
src/map/script.cpp

@@ -25809,7 +25809,17 @@ BUILDIN_FUNC(mail){
 			for( k = 0; k < num_items && start < end; k++, start++ ){
 				msg.item[k].card[i] = (t_itemid)get_val2_num( st, reference_uid( id, start ), reference_getref( data ) );
 
-				if( msg.item[k].card[i] > 0 && !item_db.exists(msg.item[k].card[i]) ){
+				if( msg.item[k].card[i] == 0 ){
+					// Continue with the next card, no further checks needed
+					continue;
+				}
+
+				if( itemdb_isspecial( msg.item[k].card[0] ) ){
+					// Continue with the next card, but do not check it against the item database
+					continue;
+				}
+
+				if( !item_db.exists( msg.item[k].card[i] ) ){
 					ShowError( "buildin_mail: invalid card id %u.\n", msg.item[k].card[i] );
 					return SCRIPT_CMD_FAILURE;
 				}