viewing paste Unknown #5405 | Diff

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /home/lighta/Documents/Myscript/RO/Servs/rathena/src/char
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: conf/msg_athena.conf
--- conf/msg_athena.conf Base (BASE)
+++ conf/msg_athena.conf Locally Modified (Based On LOCAL)
@@ -463,9 +463,13 @@
 508: This player hasn't been banned (Ban option is disabled).
 //509 Available....
 
-// mail system
+// mail system /auction
 //----------------------
 510: You have %d new emails (%d unread)
+520: Thanks, you won the auction!.
+521: Payment for your auction!.
+522: No buyers have been fo
 
Index: src/char/int_auction.c
--- src/char/int_auction.c Base (BASE)
+++ src/char/int_auction.c Locally Modified (Based On LOCAL)
@@ -145,12 +145,12 @@
        {
                if( auction->buyer_id )
                {
-                       mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "Thanks, you won the auction!.", 0, &auction->item);
+                       mail_sendmail(0, msg_txt(523), auction->buyer_id, auction->buyer_name, "Auction", msg_txt(520), 0, &auction->item);
                        mapif_Auction_message(auction->buyer_id, 6); // You have won the auction
-                       mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Payment for your auction!.", auction->price, NULL);
+                       mail_sendmail(0, msg_txt(523), auction->seller_id, auction->seller_name, "Auction", msg_txt(521), auction->price, NULL);
                }
                else
-                       mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "No buyers have been found for your auction.", 0, &auction->item);
+                       mail_sendmail(0, msg_txt(523), auction->seller_id, auction->seller_name, "Auction", msg_txt(522), 0, &auction->item);
 
                ShowInfo("Auction End: id %u.\n", auction->auction_id);
 
Index: src/char/inter.c
--- src/char/inter.c Base (BASE)
+++ src/char/inter.c Locally Modified (Based On LOCAL)
@@ -67,12 +67,14 @@
 static DBMap* wis_db = NULL; // int wis_id -> struct WisData*
 static int wis_dellist[WISDELLIST_MAX], wis_delnum;
 
-#define MAX_JOB_NAMES 106
-static char* msg_table[MAX_JOB_NAMES]; //  messages 550 ~ 655 are job names
+#define MIN_AUCTION_MSG        520
+#define MAX_JOB_NAME 655
+#define NUM_MSG (MAX_JOB_NAME-MIN_AUCTION_MSG+1)
+static char* msg_table[NUM_MSG]; //  messages 550 ~ 655 are job names
 
 const char* msg_txt(int msg_number) {
-       msg_number -= 550;
-       if (msg_number >= 0 && msg_number < MAX_JOB_NAMES &&
+       msg_number -= MIN_AUCTION_MSG;
+       if (msg_number >= 0 && msg_number < (NUM_MSG) &&
            msg_table[msg_number] != NULL && msg_table[msg_number][0] != '\0')
                return msg_table[msg_number];
 
@@ -94,7 +96,7 @@
        }
 
        if ((--called) == 0)
-               memset(msg_table, 0, sizeof(msg_table[0]) * MAX_JOB_NAMES);
+               memset(msg_table, 0, sizeof(msg_table[0]) * NUM_MSG);
 
        while(fgets(line, sizeof(line), fp) ) {
                if (line[0] == '/' && line[1] == '/')
@@ -106,10 +108,10 @@
                        msg_config_read(w2);
                else {
                        msg_number = atoi(w1);
-                       if( msg_number < 550 || msg_number > (550+MAX_JOB_NAMES) )
+                       if( msg_number < MIN_AUCTION_MSG || msg_number > MAX_JOB_NAME ) // ]520;656[
                                continue;
-                       msg_number -= 550;
-                       if (msg_number >= 0 && msg_number < MAX_JOB_NAMES) {
+                       msg_number -= MIN_AUCTION_MSG;
+                       if (msg_number >= 0 && msg_number < NUM_MSG) {
                                if (msg_table[msg_number] != NULL)
                                        aFree(msg_table[msg_number]);
                                msg_table[msg_number] = (char *)aMalloc((strlen(w2) + 1)*sizeof (char));
Viewed 455 times, submitted by lighta.