diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-02-09 00:12:13 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-02-09 00:12:13 +0000 |
commit | 09e322e394a4a40b67858f100b03897220e80048 (patch) | |
tree | 709a5d6d8a5b3e4be7eb4c933e1d95e93a289db0 /src/map/pc.c | |
parent | f960ce451bc0d3cfbb62bfad8f616f31f3aba18c (diff) | |
download | hercules-09e322e394a4a40b67858f100b03897220e80048.tar.gz hercules-09e322e394a4a40b67858f100b03897220e80048.tar.bz2 hercules-09e322e394a4a40b67858f100b03897220e80048.tar.xz hercules-09e322e394a4a40b67858f100b03897220e80048.zip |
Fixed bug that allowed a auction bid to fail (and generate zeny loss) if made while no char server is present.
Added @showzeny tracking to pc_payzeny so that it's messages are more consistent when zeny is earned/reduced. credit to gepard for his concept
both from bugreport:1138
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15550 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 50b24af99..0d0ebe4bf 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3373,7 +3373,7 @@ int pc_inventoryblank(struct map_session_data *sd) } /*========================================== - * お金を?う + * attempts to remove zeny from player (sd) *------------------------------------------*/ int pc_payzeny(struct map_session_data *sd,int zeny) { @@ -3391,6 +3391,12 @@ int pc_payzeny(struct map_session_data *sd,int zeny) sd->status.zeny -= zeny; clif_updatestatus(sd,SP_ZENY); + if( zeny > 0 && sd->state.showzeny ) { + char output[255]; + sprintf(output, "Removed %dz.", zeny); + clif_disp_onlyself(sd,output,strlen(output)); + } + return 0; } /*========================================== @@ -3482,7 +3488,7 @@ void pc_getcash(struct map_session_data *sd, int cash, int points) } /*========================================== - * お金を得る + * Attempts to give zeny to player (sd) *------------------------------------------*/ int pc_getzeny(struct map_session_data *sd,int zeny) { @@ -3500,8 +3506,7 @@ int pc_getzeny(struct map_session_data *sd,int zeny) sd->status.zeny += zeny; clif_updatestatus(sd,SP_ZENY); - if( zeny > 0 && sd->state.showzeny ) - { + if( zeny > 0 && sd->state.showzeny ) { char output[255]; sprintf(output, "Gained %dz.", zeny); clif_disp_onlyself(sd,output,strlen(output)); |