summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c4
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);