summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcalciumkid <calciumkid@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-10 05:05:51 +0000
committercalciumkid <calciumkid@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-10 05:05:51 +0000
commit1edd5a4a11df1b529206c2e599e99effdd4d1f51 (patch)
treebb964ff5584b4b22e2c099cb5d434f2db75f2da7
parent025f33dbc64c6075b4c4d081b968cf495ff695a6 (diff)
downloadhercules-1edd5a4a11df1b529206c2e599e99effdd4d1f51.tar.gz
hercules-1edd5a4a11df1b529206c2e599e99effdd4d1f51.tar.bz2
hercules-1edd5a4a11df1b529206c2e599e99effdd4d1f51.tar.xz
hercules-1edd5a4a11df1b529206c2e599e99effdd4d1f51.zip
Added client feedback to @cash and @points
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15056 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--conf/msg_athena.conf2
-rw-r--r--src/map/atcommand.c19
2 files changed, 17 insertions, 4 deletions
diff --git a/conf/msg_athena.conf b/conf/msg_athena.conf
index c54441063..b740a2f37 100644
--- a/conf/msg_athena.conf
+++ b/conf/msg_athena.conf
@@ -427,6 +427,8 @@
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.
+410: Removed %d cash points. Total %d points.
+411: Removed %d kafra points. Total %d points.
// Trade Spoof Messages
507: This player has been banned for %d minute(s).
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index e0fb1c309..9290f844a 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8158,6 +8158,7 @@ ACMD_FUNC(reject)
*-----------------------------------*/
ACMD_FUNC(cash)
{
+ char output[128];
int value;
nullpo_retr(-1, sd);
@@ -8168,17 +8169,27 @@ ACMD_FUNC(cash)
if( !strcmpi(command+1,"cash") )
{
- if( value > 0 )
+ if( value > 0 ) {
pc_getcash(sd, value, 0);
- else
+ sprintf(output, msg_txt(505), value, sd->cashPoints);
+ clif_disp_onlyself(sd, output, strlen(output));
+ } else {
pc_paycash(sd, -value, 0);
+ sprintf(output, msg_txt(410), value, sd->cashPoints);
+ clif_disp_onlyself(sd, output, strlen(output));
+ }
}
else
{ // @points
- if( value > 0 )
+ if( value > 0 ) {
pc_getcash(sd, 0, value);
- else
+ sprintf(output, msg_txt(506), value, sd->kafraPoints);
+ clif_disp_onlyself(sd, output, strlen(output));
+ } else {
pc_paycash(sd, -value, -value);
+ sprintf(output, msg_txt(411), -value, sd->kafraPoints);
+ clif_disp_onlyself(sd, output, strlen(output));
+ }
}
return 0;