|
@@ -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;
|
|
|
}
|