Fixed free purchase from cashshop NPC exploit (#3605)

This commit is contained in:
Jittapan Pluemsumran
2018-10-23 01:13:41 +07:00
committed by GitHub
parent dcb6592f52
commit 180938d971
2 changed files with 4 additions and 2 deletions

View File

@@ -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:
{