summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-24 08:50:59 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-24 08:50:59 +0000
commit913fd65ef9a5fa55ebbd5ac4502f72895879fc84 (patch)
tree0241f5c639284276a216f86a964c8ff64bb0532b /src/map/atcommand.c
parenteef34512a2f465f7b2b5453fadfcc0e61c097e01 (diff)
downloadhercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.gz
hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.bz2
hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.xz
hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.zip
-Fix bugreport:6751 allow noseige to be casted while under status.
-Upd athena-start, save pid to not kill all other process with same name (annoying when multiple server) -Harmonize setmapflag and @mapflag, flag value is always an int, and could be superior to 1 for some mapflag -Fix bugreport:6923 for Windows -Upd @zeny to remove rest of zeny if not enough money as requested git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16959 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index ebdd7353b..394f4fb11 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2538,8 +2538,10 @@ ACMD_FUNC(zeny)
if((ret=pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL)) == 1)
clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
}
- else if((ret=pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL)) == 1){
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ else {
+ if( sd->status.zeny < -zeny ) zeny = -sd->status.zeny;
+ if((ret=pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL)) == 1)
+ clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
}
if(!ret) clif_displaymessage(fd, msg_txt(176)); //ret=0 mean cmd success
return 0;
@@ -7585,14 +7587,14 @@ ACMD_FUNC(fakename)
ACMD_FUNC(mapflag) {
#define checkflag( cmd ) if ( map[ sd->bl.m ].flag.cmd ) clif_displaymessage(sd->fd,#cmd)
#define setflag( cmd ) \
- if ( strcmp( flag_name , #cmd ) == 0 && ( flag == 0 || flag == 1 ) ){\
+ if ( strcmp( flag_name , #cmd ) == 0 ){\
map[ sd->bl.m ].flag.cmd = flag;\
sprintf(atcmd_output,"[ @mapflag ] %s flag has been set to %s",#cmd,flag?"On":"Off");\
clif_displaymessage(sd->fd,atcmd_output);\
return 0;\
}
unsigned char flag_name[100];
- int flag=9,i;
+ int flag=0,i;
nullpo_retr(-1, sd);
memset(flag_name, '\0', sizeof(flag_name));
@@ -7935,7 +7937,7 @@ ACMD_FUNC(clone)
if(pc_isdead(sd)){
clif_displaymessage(fd, msg_txt(129+flag*2));
return 0;
- }
+ }
master = sd->bl.id;
if (battle_config.atc_slave_clone_limit
&& mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) {