Bläddra i källkod

* Added settings 'cashshop_show_points' and 'mail_show_status', both disabled by default, as the messages they control are custom (follow up to r11548 and r12264).
- Moved custom cash point update messages to 'msg_athena.conf' (IDs 504~506).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14812 54d463be-8e91-2dee-dedb-b68131a5f0ec

ai4rei 14 år sedan
förälder
incheckning
88785ac802
7 ändrade filer med 39 tillägg och 8 borttagningar
  1. 3 0
      conf/Changelog.txt
  2. 11 0
      conf/battle/misc.conf
  3. 4 1
      conf/msg_athena.conf
  4. 2 0
      src/map/battle.c
  5. 2 0
      src/map/battle.h
  6. 1 1
      src/map/intif.c
  7. 16 6
      src/map/pc.c

+ 3 - 0
conf/Changelog.txt

@@ -1,5 +1,8 @@
 Date	Added
 
+2011/05/13
+	* Rev. 14812 Added settings 'cashshop_show_points' and 'mail_show_status', both disabled by default, as the messages they control are custom (follow up to r11548 and r12264). [Ai4rei]
+	- Moved custom cash point update messages to 'msg_athena.conf' (IDs 504~506).
 2011/03/15
 	* Rev. 14744 Fixed option 'monster_ai' referring to setting 'mob_npc_warp' rather than 'mob_warp' (follow up to r8135). [Ai4rei]
 2011/03/06

+ 11 - 0
conf/battle/misc.conf

@@ -128,3 +128,14 @@ searchstore_querydelay: 10
 // Maximum amount of results a store search query may yield, before
 // it is canceled.
 searchstore_maxresults: 30
+
+// Whether or not gaining and loosing of cash points is displayed (Note 1).
+// Default: no
+cashshop_show_points: no
+
+// Whether or not mail box status is displayed upon login.
+// Default: 0
+// 0 = No
+// 1 = Yes
+// 2 = Yes, when there are unread mails
+mail_show_status: 0

+ 4 - 1
conf/msg_athena.conf

@@ -423,7 +423,10 @@
 502: Day Mode is activated
 503: Night Mode is activated
 
-// 504~506 are not used (previously super novice's guardian angel prayer)
+// Cash point change messages
+504: Used %d kafra points and %d cash points. %d kafra and %d cash points remaining.
+505: Gained %d cash points. Total %d points.
+506: Gained %d kafra points. Total %d points.
 
 // Trade Spoof Messages
 507: This player has been banned for %d minute(s).

+ 2 - 0
src/map/battle.c

@@ -4012,6 +4012,8 @@ static const struct _battle_data {
 	{ "searchstore_querydelay",             &battle_config.searchstore_querydelay,         10,      0,      INT_MAX,        },
 	{ "searchstore_maxresults",             &battle_config.searchstore_maxresults,         30,      1,      INT_MAX,        },
 	{ "display_party_name",                 &battle_config.display_party_name,              0,      0,      1,              },
+	{ "cashshop_show_points",               &battle_config.cashshop_show_points,            0,      0,      1,              },
+	{ "mail_show_status",                   &battle_config.mail_show_status,                0,      0,      2,              },
 // BattleGround Settings
 	{ "bg_update_interval",                 &battle_config.bg_update_interval,              1000,   100,    INT_MAX,        },
 	{ "bg_short_attack_damage_rate",        &battle_config.bg_short_damage_rate,            80,     0,      INT_MAX,        },

+ 2 - 0
src/map/battle.h

@@ -486,6 +486,8 @@ extern struct Battle_Config
 	int searchstore_querydelay;
 	int searchstore_maxresults;
 	int display_party_name;
+	int cashshop_show_points;
+	int mail_show_status;
 
 	// [BattleGround Settings]
 	int bg_update_interval;

+ 1 - 1
src/map/intif.c

@@ -1465,7 +1465,7 @@ int intif_parse_Mail_inboxreceived(int fd)
 
 	if (flag)
 		clif_Mail_refreshinbox(sd);
-	else
+	else if( battle_config.mail_show_status && ( battle_config.mail_show_status == 1 || sd->mail.inbox.unread ) )
 	{
 		char output[128];
 		sprintf(output, msg_txt(510), sd->mail.inbox.unchecked, sd->mail.inbox.unread + sd->mail.inbox.unchecked);

+ 16 - 6
src/map/pc.c

@@ -3268,8 +3268,12 @@ void pc_paycash(struct map_session_data *sd, int price, int points)
 
 	pc_setaccountreg(sd,"#CASHPOINTS",sd->cashPoints - cash);
 	pc_setaccountreg(sd,"#KAFRAPOINTS",sd->kafraPoints - points);
-	sprintf(output, "Used %d kafra points and %d cash points. %d kafra and %d cash points remaining.", points, cash, sd->kafraPoints, sd->cashPoints);
-	clif_disp_onlyself(sd, output, strlen(output));
+
+	if( battle_config.cashshop_show_points )
+	{
+		sprintf(output, msg_txt(504), points, cash, sd->kafraPoints, sd->cashPoints);
+		clif_disp_onlyself(sd, output, strlen(output));
+	}
 }
 
 void pc_getcash(struct map_session_data *sd, int cash, int points)
@@ -3281,16 +3285,22 @@ void pc_getcash(struct map_session_data *sd, int cash, int points)
 	{
 		pc_setaccountreg(sd,"#CASHPOINTS",sd->cashPoints + cash);
 
-		sprintf(output, "Gained %d cash points. Total %d points", cash, sd->cashPoints);
-		clif_disp_onlyself(sd, output, strlen(output));
+		if( battle_config.cashshop_show_points )
+		{
+			sprintf(output, msg_txt(505), cash, sd->cashPoints);
+			clif_disp_onlyself(sd, output, strlen(output));
+		}
 	}
 
 	if( points > 0 )
 	{
 		pc_setaccountreg(sd,"#KAFRAPOINTS",sd->kafraPoints + points);
 
-		sprintf(output, "Gained %d kafra points. Total %d points", points, sd->kafraPoints);
-		clif_disp_onlyself(sd, output, strlen(output));
+		if( battle_config.cashshop_show_points )
+		{
+			sprintf(output, msg_txt(506), points, sd->kafraPoints);
+			clif_disp_onlyself(sd, output, strlen(output));
+		}
 	}
 }