Fixed free purchase from cashshop NPC exploit (#3605)
This commit is contained in:
parent
dcb6592f52
commit
180938d971
@ -564,7 +564,7 @@ bool cashshop_buylist( struct map_session_data* sd, uint32 kafrapoints, int n, u
|
||||
return false;
|
||||
}
|
||||
|
||||
if(pc_paycash( sd, totalcash, kafrapoints, LOG_TYPE_CASH ) < 0){
|
||||
if(pc_paycash( sd, totalcash, kafrapoints, LOG_TYPE_CASH ) <= 0){
|
||||
clif_cashshop_result( sd, 0, CASHSHOP_RESULT_ERROR_SHORTTAGE_CASH );
|
||||
return false;
|
||||
}
|
||||
|
@ -1420,7 +1420,9 @@ static enum e_CASHSHOP_ACK npc_cashshop_process_payment(struct npc_data *nd, int
|
||||
case NPCTYPE_CASHSHOP:
|
||||
if (cost[1] < points || cost[0] < (price - points))
|
||||
return ERROR_TYPE_MONEY;
|
||||
pc_paycash(sd, price, points, LOG_TYPE_NPC);
|
||||
if (pc_paycash(sd, price, points, LOG_TYPE_NPC) <= 0) {
|
||||
return ERROR_TYPE_MONEY;
|
||||
}
|
||||
break;
|
||||
case NPCTYPE_ITEMSHOP:
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user