summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-03-11 17:20:18 +0100
committerGitHub <noreply@github.com>2018-03-11 17:20:18 +0100
commit20234c126675aeb292ba1abefc0a5b27ccae1854 (patch)
tree623d012bea3b8c1def5645d97f6b89e67aa640d9 /src/map/atcommand.c
parentcd56f7302cfe7c64e5a2e15ed2f0bed745d03b9e (diff)
parent2691fcbedb580f5a8994a345b4476e95af2fc442 (diff)
downloadhercules-20234c126675aeb292ba1abefc0a5b27ccae1854.tar.gz
hercules-20234c126675aeb292ba1abefc0a5b27ccae1854.tar.bz2
hercules-20234c126675aeb292ba1abefc0a5b27ccae1854.tar.xz
hercules-20234c126675aeb292ba1abefc0a5b27ccae1854.zip
Merge pull request #1541 from Normynator/master
Changed Kafrapoints calculation.
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index b0ad24c11..9deed0098 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7872,7 +7872,6 @@ ACMD(cash)
{
char output[128];
int value;
- int ret=0;
if (!*message || (value = atoi(message)) == 0) {
clif->message(fd, msg_fd(fd,1322)); // Please enter an amount.
@@ -7880,38 +7879,38 @@ ACMD(cash)
}
if (!strcmpi(info->command,"cash")) {
- if( value > 0 ) {
- if( (ret=pc->getcash(sd, value, 0)) >= 0){
+ if (value > 0) {
+ if ((pc->getcash(sd, value, 0)) >= 0) {
// If this option is set, the message is already sent by pc function
- if( !battle_config.cashshop_show_points ){
- sprintf(output, msg_fd(fd,505), ret, sd->cashPoints);
+ if (!battle_config.cashshop_show_points) {
+ sprintf(output, msg_fd(fd,505), value, sd->cashPoints);
clif_disp_onlyself(sd, output);
clif->message(fd, output);
}
} else
clif->message(fd, msg_fd(fd,149)); // Unable to decrease the number/value.
} else {
- if( (ret=pc->paycash(sd, -value, 0)) >= 0){
- sprintf(output, msg_fd(fd,410), ret, sd->cashPoints);
+ if ((pc->paycash(sd, -value, 0)) >= 0) {
+ sprintf(output, msg_fd(fd,410), -value, sd->cashPoints);
clif_disp_onlyself(sd, output);
clif->message(fd, output);
} else
clif->message(fd, msg_fd(fd,41)); // Unable to decrease the number/value.
}
} else { // @points
- if( value > 0 ) {
- if( (ret=pc->getcash(sd, 0, value)) >= 0) {
+ if (value > 0) {
+ if ((pc->getcash(sd, 0, value)) >= 0) {
// If this option is set, the message is already sent by pc function
- if( !battle_config.cashshop_show_points ){
- sprintf(output, msg_fd(fd,506), ret, sd->kafraPoints);
+ if (!battle_config.cashshop_show_points) {
+ sprintf(output, msg_fd(fd,506), value, sd->kafraPoints);
clif_disp_onlyself(sd, output);
clif->message(fd, output);
}
} else
clif->message(fd, msg_fd(fd,149)); // Unable to decrease the number/value.
} else {
- if( (ret=pc->paycash(sd, -value, -value)) >= 0){
- sprintf(output, msg_fd(fd,411), ret, sd->kafraPoints);
+ if ((pc->paycash(sd, -value, -value)) >= 0) {
+ sprintf(output, msg_fd(fd,411), -value, sd->kafraPoints);
clif_disp_onlyself(sd, output);
clif->message(fd, output);
} else