diff options
author | sketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-06-18 10:39:20 +0000 |
---|---|---|
committer | sketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-06-18 10:39:20 +0000 |
commit | ab859094455fd375d0cb42523b13cf8367315be1 (patch) | |
tree | 684a6f660c9499bce38aff4ea3abcf468d4eb48f /src/map/npc.c | |
parent | 16d5b76a69ea16dce3460dcf3fc6d196bb628163 (diff) | |
download | hercules-ab859094455fd375d0cb42523b13cf8367315be1.tar.gz hercules-ab859094455fd375d0cb42523b13cf8367315be1.tar.bz2 hercules-ab859094455fd375d0cb42523b13cf8367315be1.tar.xz hercules-ab859094455fd375d0cb42523b13cf8367315be1.zip |
Fixed cash shop not using points to make up the cash difference when purchasing an item.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12853 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 1a888cd24..52adadf29 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1091,9 +1091,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po if( points > price ) points = price; - if( sd->cashPoints < price - points ) - return 6; - if( sd->kafraPoints < points ) + if( (sd->kafraPoints < points) || (sd->cashPoints < price - points) ) return 6; pc_paycash(sd, price, points); |