Przeglądaj źródła

Fixed mail system not notifying about new messages that were received from another map-server (bugreport:1651).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15684 54d463be-8e91-2dee-dedb-b68131a5f0ec
gepard1984 13 lat temu
rodzic
commit
ca21876adf
2 zmienionych plików z 2 dodań i 12 usunięć
  1. 2 1
      src/char/int_mail.c
  2. 0 11
      src/map/intif.c

+ 2 - 1
src/char/int_mail.c

@@ -422,7 +422,8 @@ static void mapif_parse_Mail_send(int fd)
 	if( msg.dest_id > 0 )
 		msg.id = mail_savemessage(&msg);
 
-	mapif_Mail_send(fd, &msg);
+	mapif_Mail_send(fd, &msg); // notify sender
+	mapif_Mail_new(&msg); // notify recipient
 }
 
 void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item)

+ 0 - 11
src/map/intif.c

@@ -1661,17 +1661,6 @@ static void intif_parse_Mail_send(int fd)
 				chrif_save(sd, 0);
 		}
 	}
-
-	if( fail )
-		return;
-
-	// notify recipient (if online)
-	sd = map_charid2sd(msg.dest_id);
-	if( sd != NULL )
-	{
-		sd->mail.changed = true;
-		clif_Mail_new(sd->fd, msg.id, msg.send_name, msg.title);
-	}
 }
 
 static void intif_parse_Mail_new(int fd)