diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-14 01:25:09 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-14 01:25:09 +0000 |
commit | 851f1599bd54aad53efa05863a7b5a5441972b54 (patch) | |
tree | 775a3288f673054e911aa03e7b159a436daa6d65 /src | |
parent | 6f2e4dfb3150a1fc833e57b6a0c8c7e13469f567 (diff) | |
download | hercules-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
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 2 | ||||
-rw-r--r-- | src/map/battle.h | 2 | ||||
-rw-r--r-- | src/map/intif.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 22 |
4 files changed, 21 insertions, 7 deletions
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)); + } } } |