Переглянути джерело

Fixed an issue with mail (#7518)

* mail should accept card with ID 0 (no card) when the parameter card is provided
Atemo 2 роки тому
батько
коміт
d0b51d91a0
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/map/script.cpp

+ 1 - 1
src/map/script.cpp

@@ -25778,7 +25778,7 @@ 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( !item_db.exists(msg.item[k].card[i]) ){
+				if( msg.item[k].card[i] > 0 && !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;
 				}