summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-14 01:25:09 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-14 01:25:09 +0000
commit851f1599bd54aad53efa05863a7b5a5441972b54 (patch)
tree775a3288f673054e911aa03e7b159a436daa6d65
parent6f2e4dfb3150a1fc833e57b6a0c8c7e13469f567 (diff)
downloadhercules-851f1599bd54aad53efa05863a7b5a5441972b54.tar.gz
hercules-851f1599bd54aad53efa05863a7b5a5441972b54.tar.bz2
hercules-851f1599bd54aad53efa05863a7b5a5441972b54.tar.xz
hercules-851f1599bd54aad53efa05863a7b5a5441972b54.zip
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14812 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--conf/Changelog.txt3
-rw-r--r--conf/battle/misc.conf11
-rw-r--r--conf/msg_athena.conf5
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/intif.c2
-rw-r--r--src/map/pc.c22
7 files changed, 39 insertions, 8 deletions
diff --git a/conf/Changelog.txt b/conf/Changelog.txt
index 35e57d601..71e3b75ca 100644
--- a/conf/Changelog.txt
+++ b/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
diff --git a/conf/battle/misc.conf b/conf/battle/misc.conf
index 76d18ed0f..797295aea 100644
--- a/conf/battle/misc.conf
+++ b/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
diff --git a/conf/msg_athena.conf b/conf/msg_athena.conf
index 1d88c076a..98c20c361 100644
--- a/conf/msg_athena.conf
+++ b/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).
diff --git a/src/map/battle.c b/src/map/battle.c
index 40e59039b..11e696a7f 100644
--- a/src/map/battle.c
+++ b/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, },
diff --git a/src/map/battle.h b/src/map/battle.h
index b2f33b73b..58f622321 100644
--- a/src/map/battle.h
+++ b/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;
diff --git a/src/map/intif.c b/src/map/intif.c
index 875baa036..1b69c0837 100644
--- a/src/map/intif.c
+++ b/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);
diff --git a/src/map/pc.c b/src/map/pc.c
index e1ecc171e..db42fdeca 100644
--- a/src/map/pc.c
+++ b/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));
+ }
}
}