diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 12 |
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) { |