From b31a3a784d7a2150f063eb5259479022dc8aff27 Mon Sep 17 00:00:00 2001 From: Emistry Haoyan Date: Sat, 18 May 2019 03:08:49 +0800 Subject: Fix *failedremovecards script command. - only `type == 1` will remove the card. - fixes #2469 --- src/map/script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index 5843ac292..a916db009 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -13915,7 +13915,8 @@ static BUILDIN(failedremovecards) if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) { cardflag = 1; - sd->status.inventory[i].card[c] = 0; + if (typefail == 1) + sd->status.inventory[i].card[c] = 0; if (typefail == 2) { // add cards to inventory, clear int flag; -- cgit v1.2.3-60-g2f50