From c3572cd2c80a2e6113569b9bcc787f5e8e742cb5 Mon Sep 17 00:00:00 2001 From: lemongrass3110 Date: Wed, 13 Mar 2013 14:16:40 +0000 Subject: [PATCH] Fixed duplicate message output bugreport:7349 Fixed a issue with a SQL value bugreport:7346 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17196 54d463be-8e91-2dee-dedb-b68131a5f0ec --- sql-files/item_db_re.sql | 2 +- src/map/atcommand.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 909e6bd4fd..17c0716d87 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -5856,7 +5856,7 @@ REPLACE INTO `item_db_re` VALUES (12773,'Victory_Hat_Box2','Victory Hat Box2',2, # REPLACE INTO `item_db_re` VALUES (12775,'Ancient_Spirit_Amulet','Ancient Spirit Amulet',2,20,NULL,600,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); # -REPLACE INTO `item_db_re` VALUES (12786,'Change_Slot_Card','Character Position Change Coupon',2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set CharMoves, CharMoves + 1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (12786,'Change_Slot_Card','Character Position Change Coupon',2,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set CharMoves, CharMoves + 1;',NULL,NULL); # REPLACE INTO `item_db_re` VALUES (12848,'Falcon_Flute','Falcon Flute',11,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(getskilllv("HT_FALCON")) { if(checkoption(Option_Wug)||checkoption(Option_Wugrider)) end; if(checkfalcon()==1) { setfalcon 0; } else { setfalcon 1; } }',NULL,NULL); REPLACE INTO `item_db_re` VALUES (12900,'Battle_Manual_Box','Battle Manual Box',18,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem 12208,10;',NULL,NULL); diff --git a/src/map/atcommand.c b/src/map/atcommand.c index d62b32727a..60dce68be4 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -7851,14 +7851,20 @@ ACMD_FUNC(cash) { if( value > 0 ) { if( (ret=pc_getcash(sd, value, 0)) >= 0){ - sprintf(output, msg_txt(505), ret, sd->cashPoints); - clif_disp_onlyself(sd, output, strlen(output)); + // If this option is set, the message is already sent by pc function + if( !battle_config.cashshop_show_points ){ + sprintf(output, msg_txt(505), ret, sd->cashPoints); + clif_disp_onlyself(sd, output, strlen(output)); + } } else clif_displaymessage(fd, msg_txt(149)); // Unable to decrease the number/value. } else { if( (ret=pc_paycash(sd, -value, 0)) >= 0){ - sprintf(output, msg_txt(410), ret, sd->cashPoints); - clif_disp_onlyself(sd, output, strlen(output)); + // If this option is set, the message is already sent by pc function + if( !battle_config.cashshop_show_points ){ + sprintf(output, msg_txt(410), ret, sd->cashPoints); + clif_disp_onlyself(sd, output, strlen(output)); + } } else clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value. }